summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md17
-rw-r--r--cmd/podman/common/specgen.go4
-rw-r--r--cmd/podman/containers/cp.go26
-rw-r--r--cmd/podman/containers/init.go33
-rw-r--r--cmd/podman/containers/mount.go3
-rw-r--r--cmd/podman/pods/create.go4
-rw-r--r--cmd/podman/registry/config.go29
-rw-r--r--cmd/podman/registry/config_abi.go7
-rw-r--r--cmd/podman/registry/config_tunnel.go7
-rw-r--r--cmd/podman/registry/registry.go20
-rw-r--r--cmd/podman/root.go2
-rw-r--r--cmd/podman/system/service.go2
-rw-r--r--cmd/podman/system/unshare.go50
-rw-r--r--docs/source/markdown/podman-create.1.md12
-rw-r--r--docs/source/markdown/podman-run.1.md5
-rw-r--r--go.mod2
-rw-r--r--go.sum4
-rw-r--r--pkg/domain/entities/engine_container.go1
-rw-r--r--pkg/domain/infra/abi/system.go16
-rw-r--r--pkg/domain/infra/tunnel/system.go4
-rw-r--r--pkg/specgen/generate/oci.go18
-rw-r--r--pkg/specgen/generate/pod_create.go9
-rw-r--r--pkg/specgen/pod_validate.go12
-rw-r--r--troubleshooting.md2
-rw-r--r--vendor/github.com/uber/jaeger-client-go/CHANGELOG.md12
-rw-r--r--vendor/github.com/uber/jaeger-client-go/Gopkg.lock13
-rw-r--r--vendor/github.com/uber/jaeger-client-go/README.md22
-rw-r--r--vendor/github.com/uber/jaeger-client-go/constants.go2
-rw-r--r--vendor/github.com/uber/jaeger-client-go/glide.lock2
-rw-r--r--vendor/github.com/uber/jaeger-client-go/glide.yaml1
-rw-r--r--vendor/github.com/uber/jaeger-client-go/log/logger.go55
-rw-r--r--vendor/github.com/uber/jaeger-client-go/reporter.go2
-rw-r--r--vendor/github.com/uber/jaeger-client-go/reporter_options.go6
-rw-r--r--vendor/github.com/uber/jaeger-client-go/sampler.go24
-rw-r--r--vendor/github.com/uber/jaeger-client-go/sampler_remote.go4
-rw-r--r--vendor/github.com/uber/jaeger-client-go/sampler_remote_options.go4
-rw-r--r--vendor/github.com/uber/jaeger-client-go/tracer.go3
-rw-r--r--vendor/github.com/uber/jaeger-client-go/tracer_options.go3
-rw-r--r--vendor/modules.txt2
39 files changed, 356 insertions, 88 deletions
diff --git a/README.md b/README.md
index 8d9447e51..194733cee 100644
--- a/README.md
+++ b/README.md
@@ -24,12 +24,14 @@ At a high level, the scope of libpod and Podman is the following:
* Support for pods to manage groups of containers together.
* Resource isolation of containers and pods.
* Support for a Docker-compatible CLI interface through Podman.
+* Support for a REST API providing both a Docker-compatible interface and an improved interface exposing advanced Podman functionality.
* Integration with CRI-O to share containers and backend code.
-This project tests all builds against each supported version of Fedora, the latest released version of Red Hat Enterprise Linux, and the latest Ubuntu Long Term Support release. The community has also reported success with other Linux flavors.
+Podman presently only supports running containers on Linux. However, we are building a remote client which can run on Windows and OS X and manage Podman containers on a Linux system via the REST API using SSH tunneling.
## Roadmap
+1. Complete the Podman REST API and Podman v2, which will be able to connect to remote Podman instances via this API
1. Integrate libpod into CRI-O to replace its existing container management backend
1. Further work on the podman pod command
1. Further improvements on rootless containers
@@ -81,7 +83,8 @@ A little configuration by an administrator is required before rootless Podman ca
there are other third-party tools that support the docker-compose format such as
[kompose](https://github.com/kubernetes/kompose/) and
[podman-compose](https://github.com/muayyad-alsadi/podman-compose)
- that might be appropriate for your environment.
+ that might be appropriate for your environment. This situation may change with
+ the addition of the REST API.
## OCI Projects Plans
@@ -103,8 +106,8 @@ Information on how to install Podman in your environment.
**[OCI Hooks Support](pkg/hooks/README.md)**
Information on how Podman configures [OCI Hooks][spec-hooks] to run when launching a container.
-**[Podman API](API.md)**
-Documentation on the Podman API using [Varlink](https://www.varlink.org/).
+**[Podman API](http://docs.podman.io/en/latest/_static/api.html)**
+Documentation on the Podman REST API. Please note that the API is still in its early stages and not yet stable.
**[Podman Commands](https://podman.readthedocs.io/en/latest/Commands.html)**
A list of the Podman commands with links to their man pages and in many cases videos
@@ -171,3 +174,9 @@ In short, Buildah is an efficient way to create OCI images while Podman allows
you to manage and maintain those images and containers in a production environment using
familiar container cli commands. For more details, see the
[Container Tools Guide](https://github.com/containers/buildah/tree/master/docs/containertools).
+
+## Podman Legacy API (Varlink)
+Podman offers a Varlink-based API for remote management of containers.
+However, this API has been deprecated by the REST API.
+Varlink support is in maintenance mode, and will be removed in a future release.
+For more details, you can see [this blog](https://podman.io/blogs/2020/01/17/podman-new-api.html).
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index ff7c39de2..664e66df8 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -519,6 +519,10 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
}
s.Sysctl = sysmap
+ if c.CIDFile != "" {
+ s.Annotations[define.InspectAnnotationCIDFile] = c.CIDFile
+ }
+
for _, opt := range c.SecurityOpt {
if opt == "no-new-privileges" {
s.ContainerSecurityConfig.NoNewPrivileges = true
diff --git a/cmd/podman/containers/cp.go b/cmd/podman/containers/cp.go
index f0f9a158d..ac7037621 100644
--- a/cmd/podman/containers/cp.go
+++ b/cmd/podman/containers/cp.go
@@ -7,6 +7,7 @@ import (
"github.com/containers/libpod/pkg/rootless"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
+ "github.com/spf13/pflag"
)
var (
@@ -22,20 +23,41 @@ var (
RunE: cp,
Example: "podman cp [CONTAINER:]SRC_PATH [CONTAINER:]DEST_PATH",
}
+
+ containerCpCommand = &cobra.Command{
+ Use: cpCommand.Use,
+ Short: cpCommand.Short,
+ Long: cpCommand.Long,
+ Args: cpCommand.Args,
+ RunE: cpCommand.RunE,
+ Example: "podman container cp [CONTAINER:]SRC_PATH [CONTAINER:]DEST_PATH",
+ }
)
var (
cpOpts entities.ContainerCpOptions
)
+func cpFlags(flags *pflag.FlagSet) {
+ flags.BoolVar(&cpOpts.Extract, "extract", false, "Extract the tar file into the destination directory.")
+ flags.BoolVar(&cpOpts.Pause, "pause", copyPause(), "Pause the container while copying")
+}
+
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
Mode: []entities.EngineMode{entities.ABIMode},
Command: cpCommand,
})
flags := cpCommand.Flags()
- flags.BoolVar(&cpOpts.Extract, "extract", false, "Extract the tar file into the destination directory.")
- flags.BoolVar(&cpOpts.Pause, "pause", copyPause(), "Pause the container while copying")
+ cpFlags(flags)
+
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode},
+ Command: containerCpCommand,
+ Parent: containerCmd,
+ })
+ containerCpFlags := containerCpCommand.Flags()
+ cpFlags(containerCpFlags)
}
func cp(cmd *cobra.Command, args []string) error {
diff --git a/cmd/podman/containers/init.go b/cmd/podman/containers/init.go
index bb02f22fd..417f170c3 100644
--- a/cmd/podman/containers/init.go
+++ b/cmd/podman/containers/init.go
@@ -8,6 +8,7 @@ import (
"github.com/containers/libpod/cmd/podman/utils"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/spf13/cobra"
+ "github.com/spf13/pflag"
)
var (
@@ -25,21 +26,47 @@ var (
podman init 3c45ef19d893
podman init test1`,
}
+
+ containerInitCommand = &cobra.Command{
+ Use: initCommand.Use,
+ Short: initCommand.Short,
+ Long: initCommand.Long,
+ RunE: initCommand.RunE,
+ Args: initCommand.Args,
+ Example: `podman container init --latest
+ podman container init 3c45ef19d893
+ podman container init test1`,
+ }
)
var (
initOptions entities.ContainerInitOptions
)
+func initFlags(flags *pflag.FlagSet) {
+ flags.BoolVarP(&initOptions.All, "all", "a", false, "Initialize all containers")
+ flags.BoolVarP(&initOptions.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
+ if registry.IsRemote() {
+ _ = flags.MarkHidden("latest")
+ }
+}
+
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: initCommand,
})
flags := initCommand.Flags()
- flags.BoolVarP(&initOptions.All, "all", "a", false, "Initialize all containers")
- flags.BoolVarP(&initOptions.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
- _ = flags.MarkHidden("latest")
+ initFlags(flags)
+
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
+ Parent: containerCmd,
+ Command: containerInitCommand,
+ })
+
+ containerInitFlags := containerInitCommand.Flags()
+ initFlags(containerInitFlags)
}
func initContainer(cmd *cobra.Command, args []string) error {
diff --git a/cmd/podman/containers/mount.go b/cmd/podman/containers/mount.go
index 0bdac72cb..af4d52caa 100644
--- a/cmd/podman/containers/mount.go
+++ b/cmd/podman/containers/mount.go
@@ -30,9 +30,6 @@ var (
Args: func(cmd *cobra.Command, args []string) error {
return parse.CheckAllLatestAndCIDFile(cmd, args, true, false)
},
- Annotations: map[string]string{
- registry.ParentNSRequired: "",
- },
}
containerMountCommmand = &cobra.Command{
diff --git a/cmd/podman/pods/create.go b/cmd/podman/pods/create.go
index f97fa836a..e24cdef98 100644
--- a/cmd/podman/pods/create.go
+++ b/cmd/podman/pods/create.go
@@ -16,6 +16,7 @@ import (
"github.com/containers/libpod/pkg/specgen"
"github.com/containers/libpod/pkg/util"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
@@ -81,6 +82,7 @@ func create(cmd *cobra.Command, args []string) error {
}
if !createOptions.Infra {
+ logrus.Debugf("Not creating an infra container")
if cmd.Flag("infra-command").Changed {
return errors.New("cannot set infra-command without an infra container")
}
@@ -114,6 +116,7 @@ func create(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
+ createOptions.Net.Network = specgen.Namespace{}
if cmd.Flag("network").Changed {
netInput, err := cmd.Flags().GetString("network")
if err != nil {
@@ -132,6 +135,7 @@ func create(cmd *cobra.Command, args []string) error {
n.NSMode = specgen.Bridge
createOptions.Net.CNINetworks = strings.Split(netInput, ",")
}
+ createOptions.Net.Network = n
}
if len(createOptions.Net.PublishPorts) > 0 {
if !createOptions.Infra {
diff --git a/cmd/podman/registry/config.go b/cmd/podman/registry/config.go
index fc6eb538e..49d5bca74 100644
--- a/cmd/podman/registry/config.go
+++ b/cmd/podman/registry/config.go
@@ -22,6 +22,7 @@ const (
var (
podmanOptions entities.PodmanConfig
podmanSync sync.Once
+ abiSupport = false
)
// PodmanConfig returns an entities.PodmanConfig built up from
@@ -39,23 +40,31 @@ func newPodmanConfig() {
var mode entities.EngineMode
switch runtime.GOOS {
- case "darwin":
- fallthrough
- case "windows":
+ case "darwin", "windows":
mode = entities.TunnelMode
case "linux":
- mode = entities.ABIMode
+ // Some linux clients might only be compiled without ABI
+ // support (e.g., podman-remote).
+ if abiSupport {
+ mode = entities.ABIMode
+ } else {
+ mode = entities.TunnelMode
+ }
default:
fmt.Fprintf(os.Stderr, "%s is not a supported OS", runtime.GOOS)
os.Exit(1)
}
- // cobra.Execute() may not be called yet, so we peek at os.Args.
- for _, v := range os.Args {
- // Prefix checking works because of how default EngineMode's
- // have been defined.
- if strings.HasPrefix(v, "--remote") {
- mode = entities.TunnelMode
+ // Check if need to fallback to the tunnel mode if --remote is used.
+ if abiSupport && mode == entities.ABIMode {
+ // cobra.Execute() may not be called yet, so we peek at os.Args.
+ for _, v := range os.Args {
+ // Prefix checking works because of how default EngineMode's
+ // have been defined.
+ if strings.HasPrefix(v, "--remote") {
+ mode = entities.TunnelMode
+ break
+ }
}
}
diff --git a/cmd/podman/registry/config_abi.go b/cmd/podman/registry/config_abi.go
new file mode 100644
index 000000000..55430e1bf
--- /dev/null
+++ b/cmd/podman/registry/config_abi.go
@@ -0,0 +1,7 @@
+// +build ABISupport
+
+package registry
+
+func init() {
+ abiSupport = true
+}
diff --git a/cmd/podman/registry/config_tunnel.go b/cmd/podman/registry/config_tunnel.go
new file mode 100644
index 000000000..29e744dac
--- /dev/null
+++ b/cmd/podman/registry/config_tunnel.go
@@ -0,0 +1,7 @@
+// +build !ABISupport
+
+package registry
+
+func init() {
+ abiSupport = false
+}
diff --git a/cmd/podman/registry/registry.go b/cmd/podman/registry/registry.go
index 69e2babfc..71ee2bed0 100644
--- a/cmd/podman/registry/registry.go
+++ b/cmd/podman/registry/registry.go
@@ -2,14 +2,18 @@ package registry
import (
"context"
+ "path/filepath"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/containers/libpod/pkg/domain/infra"
+ "github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/pkg/util"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
)
-// DefaultAPIAddress is the default address of the REST socket
-const DefaultAPIAddress = "unix:/run/podman/podman.sock"
+// DefaultRootAPIAddress is the default address of the REST socket
+const DefaultRootAPIAddress = "unix:/run/podman/podman.sock"
// DefaultVarlinkAddress is the default address of the varlink socket
const DefaultVarlinkAddress = "unix:/run/podman/io.podman"
@@ -98,3 +102,15 @@ func GetContextWithOptions() context.Context {
func GetContext() context.Context {
return Context()
}
+
+func DefaultAPIAddress() string {
+ if rootless.IsRootless() {
+ xdg, err := util.GetRuntimeDir()
+ if err != nil {
+ logrus.Warnf("Failed to get rootless runtime dir for DefaultAPIAddress: %s", err)
+ return DefaultRootAPIAddress
+ }
+ return "unix:" + filepath.Join(xdg, "podman", "podman.sock")
+ }
+ return DefaultRootAPIAddress
+}
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index 502b6c03c..7d6f6f823 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -208,7 +208,7 @@ func syslogHook() {
func rootFlags(opts *entities.PodmanConfig, flags *pflag.FlagSet) {
// V2 flags
- flags.StringVarP(&opts.Uri, "remote", "r", "", "URL to access Podman service")
+ flags.StringVarP(&opts.Uri, "remote", "r", registry.DefaultAPIAddress(), "URL to access Podman service")
flags.StringSliceVar(&opts.Identities, "identity", []string{}, "path to SSH identity file")
cfg := opts.Config
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index f4b91dd78..552c72f79 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -139,6 +139,6 @@ func resolveApiURI(_url []string) (string, error) {
case srvArgs.Varlink:
return registry.DefaultVarlinkAddress, nil
default:
- return registry.DefaultAPIAddress, nil
+ return registry.DefaultRootAPIAddress, nil
}
}
diff --git a/cmd/podman/system/unshare.go b/cmd/podman/system/unshare.go
new file mode 100644
index 000000000..7db5d36d2
--- /dev/null
+++ b/cmd/podman/system/unshare.go
@@ -0,0 +1,50 @@
+package system
+
+import (
+ "os"
+
+ "github.com/containers/libpod/cmd/podman/registry"
+ "github.com/containers/libpod/pkg/domain/entities"
+ "github.com/containers/libpod/pkg/rootless"
+ "github.com/pkg/errors"
+ "github.com/spf13/cobra"
+)
+
+var (
+ unshareDescription = "Runs a command in a modified user namespace."
+ unshareCommand = &cobra.Command{
+ Use: "unshare [flags] [COMMAND [ARG]]",
+ Short: "Run a command in a modified user namespace",
+ Long: unshareDescription,
+ RunE: unshare,
+ Example: `podman unshare id
+ podman unshare cat /proc/self/uid_map,
+ podman unshare podman-script.sh`,
+ }
+)
+
+func init() {
+ registry.Commands = append(registry.Commands, registry.CliCommand{
+ Mode: []entities.EngineMode{entities.ABIMode},
+ Command: unshareCommand,
+ })
+ flags := unshareCommand.Flags()
+ flags.SetInterspersed(false)
+}
+
+func unshare(cmd *cobra.Command, args []string) error {
+ if isRootless := rootless.IsRootless(); !isRootless {
+ return errors.Errorf("please use unshare with rootless")
+ }
+ // exec the specified command, if there is one
+ if len(args) < 1 {
+ // try to exec the shell, if one's set
+ shell, shellSet := os.LookupEnv("SHELL")
+ if !shellSet {
+ return errors.Errorf("no command specified and no $SHELL specified")
+ }
+ args = []string{shell}
+ }
+
+ return registry.ContainerEngine().Unshare(registry.Context(), args)
+}
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md
index 2fd8512a6..475634fde 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -358,12 +358,12 @@ Defaults to `true`
**--image-volume**, **builtin-volume**=*bind|tmpfs|ignore*
-Tells Podman how to handle the builtin image volumes. The options are: 'bind', 'tmpfs', or 'ignore' (default 'bind').
-bind: A directory is created inside the container state directory and bind mounted into
-the container for the volumes.
-tmpfs: The volume is mounted onto the container as a tmpfs, which allows the users to create
+Tells Podman how to handle the builtin image volumes. Default is **bind**.
+
+- **bind**: An anonymous named volume will be created and mounted into the container.
+- **tmpfs**: The volume is mounted onto the container as a tmpfs, which allows the users to create
content that disappears when the container is stopped.
-ignore: All volumes are just ignored and no action is taken.
+- **ignore**: All volumes are just ignored and no action is taken.
**--init**
@@ -445,8 +445,6 @@ Remember that the MAC address in an Ethernet network must be unique.
The IPv6 link-local address will be based on the device's MAC address
according to RFC4862.
-Not currently supported
-
**--memory**, **-m**=*limit*
Memory limit (format: <number>[<unit>], where unit = b (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index dd221590d..4c236b520 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -371,8 +371,7 @@ Defaults to **true**.
Tells Podman how to handle the builtin image volumes. Default is **bind**.
-- **bind**: A directory is created inside the container state directory and bind mounted into
-the container for the volumes.
+- **bind**: An anonymous named volume will be created and mounted into the container.
- **tmpfs**: The volume is mounted onto the container as a tmpfs, which allows the users to create
content that disappears when the container is stopped.
- **ignore**: All volumes are just ignored and no action is taken.
@@ -454,8 +453,6 @@ Remember that the MAC address in an Ethernet network must be unique.
The IPv6 link-local address will be based on the device's MAC address
according to RFC4862.
-Not currently supported
-
**--memory**, **-m**=_number_[_unit_]
Memory limit. A _unit_ can be **b** (bytes), **k** (kilobytes), **m** (megabytes), or **g** (gigabytes).
diff --git a/go.mod b/go.mod
index 83fd19706..aeb9e3110 100644
--- a/go.mod
+++ b/go.mod
@@ -52,7 +52,7 @@ require (
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.5.1
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2
- github.com/uber/jaeger-client-go v2.22.1+incompatible
+ github.com/uber/jaeger-client-go v2.23.1+incompatible
github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
github.com/varlink/go v0.0.0-20190502142041-0f1d566d194b
github.com/vishvananda/netlink v1.1.0
diff --git a/go.sum b/go.sum
index 489f17bf6..6beb950ab 100644
--- a/go.sum
+++ b/go.sum
@@ -454,8 +454,8 @@ github.com/tchap/go-patricia v2.3.0+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ
github.com/theckman/go-flock v0.7.1/go.mod h1:kjuth3y9VJ2aNlkNEO99G/8lp9fMIKaGyBmh84IBheM=
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/u-root/u-root v6.0.0+incompatible/go.mod h1:RYkpo8pTHrNjW08opNd/U6p/RJE7K0D8fXO0d47+3YY=
-github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM=
-github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
+github.com/uber/jaeger-client-go v2.23.1+incompatible h1:uArBYHQR0HqLFFAypI7RsWTzPSj/bDpmZZuQjMLSg1A=
+github.com/uber/jaeger-client-go v2.23.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw=
github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go
index 7c93e6802..bb13794bd 100644
--- a/pkg/domain/entities/engine_container.go
+++ b/pkg/domain/entities/engine_container.go
@@ -71,6 +71,7 @@ type ContainerEngine interface {
SetupRootless(ctx context.Context, cmd *cobra.Command) error
Shutdown(ctx context.Context)
SystemDf(ctx context.Context, options SystemDfOptions) (*SystemDfReport, error)
+ Unshare(ctx context.Context, args []string) error
VarlinkService(ctx context.Context, opts ServiceOptions) error
VolumeCreate(ctx context.Context, opts VolumeCreateOptions) (*IdOrNameResponse, error)
VolumeInspect(ctx context.Context, namesOrIds []string, opts VolumeInspectOptions) ([]*VolumeInspectReport, error)
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index 24c62465f..fc92da1b2 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"os"
+ "os/exec"
"path/filepath"
"strconv"
"syscall"
@@ -391,3 +392,18 @@ func (s SystemEngine) Shutdown(ctx context.Context) {
logrus.Error(err)
}
}
+
+func unshareEnv(graphroot, runroot string) []string {
+ return append(os.Environ(), "_CONTAINERS_USERNS_CONFIGURED=done",
+ fmt.Sprintf("CONTAINERS_GRAPHROOT=%s", graphroot),
+ fmt.Sprintf("CONTAINERS_RUNROOT=%s", runroot))
+}
+
+func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error {
+ cmd := exec.Command(args[0], args[1:]...)
+ cmd.Env = unshareEnv(ic.Libpod.StorageConfig().GraphRoot, ic.Libpod.StorageConfig().RunRoot)
+ cmd.Stdin = os.Stdin
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stderr
+ return cmd.Run()
+}
diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go
index 448fbed1f..d00795741 100644
--- a/pkg/domain/infra/tunnel/system.go
+++ b/pkg/domain/infra/tunnel/system.go
@@ -30,3 +30,7 @@ func (ic *ContainerEngine) SystemPrune(ctx context.Context, options entities.Sys
func (ic *ContainerEngine) SystemDf(ctx context.Context, options entities.SystemDfOptions) (*entities.SystemDfReport, error) {
panic(errors.New("system df is not supported on remote clients"))
}
+
+func (ic *ContainerEngine) Unshare(ctx context.Context, args []string) error {
+ return errors.New("unshare is not supported on remote clients")
+}
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index a2bb66a44..11b18e2d0 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -321,12 +321,6 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
configSpec.Annotations = make(map[string]string)
}
- // TODO cidfile is not in specgen; when wiring up cli, we will need to move this out of here
- // leaving as a reminder
- //if config.CidFile != "" {
- // configSpec.Annotations[libpod.InspectAnnotationCIDFile] = config.CidFile
- //}
-
if s.Remove {
configSpec.Annotations[define.InspectAnnotationAutoremove] = define.InspectResponseTrue
} else {
@@ -343,13 +337,11 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
configSpec.Annotations[define.InspectAnnotationPrivileged] = define.InspectResponseFalse
}
- // TODO Init might not make it into the specgen and therefore is not available here. We should deal
- // with this when we wire up the CLI; leaving as a reminder
- //if s.Init {
- // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseTrue
- //} else {
- // configSpec.Annotations[libpod.InspectAnnotationInit] = libpod.InspectResponseFalse
- //}
+ if s.Init {
+ configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseTrue
+ } else {
+ configSpec.Annotations[define.InspectAnnotationInit] = define.InspectResponseFalse
+ }
return configSpec, nil
}
diff --git a/pkg/specgen/generate/pod_create.go b/pkg/specgen/generate/pod_create.go
index df5775f8b..cd2d69cfb 100644
--- a/pkg/specgen/generate/pod_create.go
+++ b/pkg/specgen/generate/pod_create.go
@@ -5,6 +5,7 @@ import (
"github.com/containers/libpod/libpod"
"github.com/containers/libpod/pkg/specgen"
+ "github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
@@ -68,15 +69,17 @@ func createPodOptions(p *specgen.PodSpecGenerator) ([]libpod.PodCreateOption, er
if p.NoManageResolvConf {
options = append(options, libpod.WithPodUseImageResolvConf())
}
+ if len(p.CNINetworks) > 0 {
+ options = append(options, libpod.WithPodNetworks(p.CNINetworks))
+ }
switch p.NetNS.NSMode {
- case specgen.Bridge:
+ case specgen.Bridge, specgen.Default, "":
logrus.Debugf("Pod using default network mode")
case specgen.Host:
logrus.Debugf("Pod will use host networking")
options = append(options, libpod.WithPodHostNetwork())
default:
- logrus.Debugf("Pod joining CNI networks: %v", p.CNINetworks)
- options = append(options, libpod.WithPodNetworks(p.CNINetworks))
+ return nil, errors.Errorf("pods presently do not support network mode %s", p.NetNS.NSMode)
}
if p.NoManageHosts {
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go
index 08f1c0300..640447e71 100644
--- a/pkg/specgen/pod_validate.go
+++ b/pkg/specgen/pod_validate.go
@@ -1,7 +1,6 @@
package specgen
import (
- "github.com/containers/libpod/pkg/rootless"
"github.com/containers/libpod/pkg/util"
"github.com/pkg/errors"
)
@@ -37,8 +36,8 @@ func (p *PodSpecGenerator) Validate() error {
return err
}
if p.NoInfra {
- if p.NetNS.NSMode == NoNetwork {
- return errors.New("NoInfra and a none network cannot be used toegther")
+ if p.NetNS.NSMode != Default && p.NetNS.NSMode != "" {
+ return errors.New("NoInfra and network modes cannot be used toegther")
}
if p.StaticIP != nil {
return exclusivePodOptions("NoInfra", "StaticIP")
@@ -86,13 +85,6 @@ func (p *PodSpecGenerator) Validate() error {
}
// Set Defaults
- if p.NetNS.Value == "" {
- if rootless.IsRootless() {
- p.NetNS.NSMode = Slirp
- } else {
- p.NetNS.NSMode = Bridge
- }
- }
if len(p.InfraImage) < 1 {
p.InfraImage = containerConfig.Engine.InfraImage
}
diff --git a/troubleshooting.md b/troubleshooting.md
index 14d1a867e..f04d9e9fa 100644
--- a/troubleshooting.md
+++ b/troubleshooting.md
@@ -320,7 +320,7 @@ under `/var/lib/containers/storage`.
```
semanage fcontext -a -e /var/lib/containers /srv/containers
-restorecon -R -v /src/containers
+restorecon -R -v /srv/containers
```
The semanage command above tells SELinux to setup the default labeling of
diff --git a/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md b/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md
index 818568b28..944feb2c8 100644
--- a/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md
+++ b/vendor/github.com/uber/jaeger-client-go/CHANGELOG.md
@@ -1,6 +1,18 @@
Changes by Version
==================
+2.23.1 (2020-04-28)
+-------------------
+- Fix regression by handling nil logger correctly ([#507](https://github.com/jaegertracing/jaeger-client-go/pull/507)) -- Prithvi Raj
+
+
+2.23.0 (2020-04-22)
+-------------------
+
+- Add the ability to log all span interactions at a new debug log level([#502](https://github.com/jaegertracing/jaeger-client-go/pull/502), [#503](https://github.com/jaegertracing/jaeger-client-go/pull/503), [#504](https://github.com/jaegertracing/jaeger-client-go/pull/504)) -- Prithvi Raj
+- Chore (docs): fix typos ([#496](https://github.com/jaegertracing/jaeger-client-go/pull/496), [#498](https://github.com/jaegertracing/jaeger-client-go/pull/498)) -- Febrian Setianto and Ivan Babrou
+- Unset highest bit of traceID in probabilistic sampler ([#490](https://github.com/jaegertracing/jaeger-client-go/pull/490)) -- Sokolov Yura
+
2.22.1 (2020-01-16)
-------------------
diff --git a/vendor/github.com/uber/jaeger-client-go/Gopkg.lock b/vendor/github.com/uber/jaeger-client-go/Gopkg.lock
index 5a42ebf16..2a5215a50 100644
--- a/vendor/github.com/uber/jaeger-client-go/Gopkg.lock
+++ b/vendor/github.com/uber/jaeger-client-go/Gopkg.lock
@@ -46,6 +46,14 @@
version = "v1.1.1"
[[projects]]
+ digest = "1:7ae311278f7ccaa724de8f2cdec0a507ba3ee6dea8c77237e8157bcf64b0f28b"
+ name = "github.com/golang/mock"
+ packages = ["gomock"]
+ pruneopts = "UT"
+ revision = "3a35fb6e3e18b9dbfee291262260dee7372d2a92"
+ version = "v1.4.3"
+
+[[projects]]
digest = "1:573ca21d3669500ff845bdebee890eb7fc7f0f50c59f2132f2a0c6b03d85086a"
name = "github.com/golang/protobuf"
packages = ["proto"]
@@ -182,7 +190,7 @@
revision = "2cfd321de3ee5d5f8a5fda2521d1703478334d98"
[[projects]]
- digest = "1:6be13632ab4bd5842a097abb3aabac045a8601e19a10da4239e7d8bd83d4b83c"
+ digest = "1:98a70115729234dc73ee7bb83973cb39cb8fedf278d17df77264382bad0183ec"
name = "go.uber.org/zap"
packages = [
".",
@@ -191,6 +199,7 @@
"internal/color",
"internal/exit",
"zapcore",
+ "zaptest/observer",
]
pruneopts = "UT"
revision = "a6015e13fab9b744d96085308ce4e8f11bad1996"
@@ -297,6 +306,7 @@
analyzer-version = 1
input-imports = [
"github.com/crossdock/crossdock-go",
+ "github.com/golang/mock/gomock",
"github.com/opentracing/opentracing-go",
"github.com/opentracing/opentracing-go/ext",
"github.com/opentracing/opentracing-go/harness",
@@ -312,6 +322,7 @@
"go.uber.org/atomic",
"go.uber.org/zap",
"go.uber.org/zap/zapcore",
+ "go.uber.org/zap/zaptest/observer",
]
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/vendor/github.com/uber/jaeger-client-go/README.md b/vendor/github.com/uber/jaeger-client-go/README.md
index 0e4d9fc0b..7c348e73a 100644
--- a/vendor/github.com/uber/jaeger-client-go/README.md
+++ b/vendor/github.com/uber/jaeger-client-go/README.md
@@ -87,7 +87,7 @@ defer closer.Close()
This is especially useful for command-line tools that enable tracing, as well as
for the long-running apps that support graceful shutdown. For example, if your deployment
system sends SIGTERM instead of killing the process and you trap that signal to do a graceful
-exit, then having `defer closer.Closer()` ensures that all buffered spans are flushed.
+exit, then having `defer closer.Close()` ensures that all buffered spans are flushed.
### Metrics & Monitoring
@@ -279,20 +279,25 @@ However it is not the default propagation format, see [here](zipkin/README.md#Ne
## SelfRef
-Jaeger Tracer supports an additional [reference](https://github.com/opentracing/specification/blob/1.1/specification.md#references-between-spans)
-type call `Self`. This allows a caller to provide an already established `SpanContext`.
-This allows loading and continuing spans/traces from offline (ie log-based) storage. The `Self` reference
-bypasses trace and span id generation.
+Jaeger Tracer supports an additional [span reference][] type call `Self`, which was proposed
+to the OpenTracing Specification (https://github.com/opentracing/specification/issues/81)
+but not yet accepted. This allows the caller to provide an already created `SpanContext`
+when starting a new span. The `Self` reference bypasses trace and span id generation,
+as well as sampling decisions (i.e. the sampling bit in the `SpanContext.flags` must be
+set appropriately by the caller).
+The `Self` reference supports the following use cases:
+ * the ability to provide externally generated trace and span IDs
+ * appending data to the same span from different processes, such as loading and continuing spans/traces from offline (ie log-based) storage
-Usage requires passing in a `SpanContext` and the jaeger `Self` reference type:
+Usage requires passing in a `SpanContext` and the `jaeger.Self` reference type:
```
span := tracer.StartSpan(
"continued_span",
- SelfRef(yourSpanContext),
+ jaeger.SelfRef(yourSpanContext),
)
...
-defer span.finish()
+defer span.Finish()
```
## License
@@ -310,3 +315,4 @@ defer span.finish()
[ot-url]: http://opentracing.io
[baggage]: https://github.com/opentracing/specification/blob/master/specification.md#set-a-baggage-item
[timeunits]: https://golang.org/pkg/time/#ParseDuration
+[span reference]: https://github.com/opentracing/specification/blob/1.1/specification.md#references-between-spans
diff --git a/vendor/github.com/uber/jaeger-client-go/constants.go b/vendor/github.com/uber/jaeger-client-go/constants.go
index 1702c7de4..1f8578fbd 100644
--- a/vendor/github.com/uber/jaeger-client-go/constants.go
+++ b/vendor/github.com/uber/jaeger-client-go/constants.go
@@ -22,7 +22,7 @@ import (
const (
// JaegerClientVersion is the version of the client library reported as Span tag.
- JaegerClientVersion = "Go-2.22.1"
+ JaegerClientVersion = "Go-2.23.1"
// JaegerClientVersionTagKey is the name of the tag used to report client version.
JaegerClientVersionTagKey = "jaeger.version"
diff --git a/vendor/github.com/uber/jaeger-client-go/glide.lock b/vendor/github.com/uber/jaeger-client-go/glide.lock
index c16d6d43f..f4c05b2db 100644
--- a/vendor/github.com/uber/jaeger-client-go/glide.lock
+++ b/vendor/github.com/uber/jaeger-client-go/glide.lock
@@ -93,4 +93,6 @@ imports:
- windows
- name: gopkg.in/yaml.v2
version: 51d6538a90f86fe93ac480b35f37b2be17fef232
+- name: github.com/golang/mock
+ version: 3a35fb6e3e18b9dbfee291262260dee7372d2a92
testImports: []
diff --git a/vendor/github.com/uber/jaeger-client-go/glide.yaml b/vendor/github.com/uber/jaeger-client-go/glide.yaml
index 3c7b5c379..eb58c67ff 100644
--- a/vendor/github.com/uber/jaeger-client-go/glide.yaml
+++ b/vendor/github.com/uber/jaeger-client-go/glide.yaml
@@ -25,3 +25,4 @@ testImport:
- assert
- require
- suite
+- package: github.com/golang/mock
diff --git a/vendor/github.com/uber/jaeger-client-go/log/logger.go b/vendor/github.com/uber/jaeger-client-go/log/logger.go
index 894bb3dbf..ced6e0ce9 100644
--- a/vendor/github.com/uber/jaeger-client-go/log/logger.go
+++ b/vendor/github.com/uber/jaeger-client-go/log/logger.go
@@ -47,13 +47,19 @@ func (l *stdLogger) Infof(msg string, args ...interface{}) {
log.Printf(msg, args...)
}
+// Debugf logs a message at debug priority
+func (l *stdLogger) Debugf(msg string, args ...interface{}) {
+ log.Printf(fmt.Sprintf("DEBUG: %s", msg), args...)
+}
+
// NullLogger is implementation of the Logger interface that is no-op
var NullLogger = &nullLogger{}
type nullLogger struct{}
-func (l *nullLogger) Error(msg string) {}
-func (l *nullLogger) Infof(msg string, args ...interface{}) {}
+func (l *nullLogger) Error(msg string) {}
+func (l *nullLogger) Infof(msg string, args ...interface{}) {}
+func (l *nullLogger) Debugf(msg string, args ...interface{}) {}
// BytesBufferLogger implements Logger backed by a bytes.Buffer.
type BytesBufferLogger struct {
@@ -75,6 +81,13 @@ func (l *BytesBufferLogger) Infof(msg string, args ...interface{}) {
l.mux.Unlock()
}
+// Debugf implements Logger.
+func (l *BytesBufferLogger) Debugf(msg string, args ...interface{}) {
+ l.mux.Lock()
+ l.buf.WriteString("DEBUG: " + fmt.Sprintf(msg, args...) + "\n")
+ l.mux.Unlock()
+}
+
// String returns string representation of the underlying buffer.
func (l *BytesBufferLogger) String() string {
l.mux.Lock()
@@ -88,3 +101,41 @@ func (l *BytesBufferLogger) Flush() {
defer l.mux.Unlock()
l.buf.Reset()
}
+
+// DebugLogger is an interface which adds a debug logging level
+type DebugLogger interface {
+ Logger
+
+ // Debugf logs a message at debug priority
+ Debugf(msg string, args ...interface{})
+}
+
+// DebugLogAdapter is a log adapter that converts a Logger into a DebugLogger
+// If the provided Logger doesn't satisfy the interface, a logger with debug
+// disabled is returned
+func DebugLogAdapter(logger Logger) DebugLogger {
+ if logger == nil {
+ return nil
+ }
+ if debugLogger, ok := logger.(DebugLogger); ok {
+ return debugLogger
+ }
+ logger.Infof("debug logging disabled")
+ return debugDisabledLogAdapter{logger: logger}
+}
+
+type debugDisabledLogAdapter struct {
+ logger Logger
+}
+
+func (d debugDisabledLogAdapter) Error(msg string) {
+ d.logger.Error(msg)
+}
+
+func (d debugDisabledLogAdapter) Infof(msg string, args ...interface{}) {
+ d.logger.Infof(msg, args...)
+}
+
+// Debugf is a nop
+func (d debugDisabledLogAdapter) Debugf(msg string, args ...interface{}) {
+}
diff --git a/vendor/github.com/uber/jaeger-client-go/reporter.go b/vendor/github.com/uber/jaeger-client-go/reporter.go
index 830b5a4bb..a71a92c3e 100644
--- a/vendor/github.com/uber/jaeger-client-go/reporter.go
+++ b/vendor/github.com/uber/jaeger-client-go/reporter.go
@@ -257,6 +257,7 @@ func (r *remoteReporter) Report(span *Span) {
// Close implements Close() method of Reporter by waiting for the queue to be drained.
func (r *remoteReporter) Close() {
+ r.logger.Debugf("closing reporter")
if swapped := atomic.CompareAndSwapInt64(&r.closed, 0, 1); !swapped {
r.logger.Error("Repeated attempt to close the reporter is ignored")
return
@@ -307,6 +308,7 @@ func (r *remoteReporter) processQueue() {
r.metrics.ReporterSuccess.Inc(int64(flushed))
// to reduce the number of gauge stats, we only emit queue length on flush
r.metrics.ReporterQueueLength.Update(atomic.LoadInt64(&r.queueLength))
+ r.logger.Debugf("flushed %d spans", flushed)
}
span.Release()
case reporterQueueItemClose:
diff --git a/vendor/github.com/uber/jaeger-client-go/reporter_options.go b/vendor/github.com/uber/jaeger-client-go/reporter_options.go
index 65012d701..2fc030547 100644
--- a/vendor/github.com/uber/jaeger-client-go/reporter_options.go
+++ b/vendor/github.com/uber/jaeger-client-go/reporter_options.go
@@ -16,6 +16,8 @@ package jaeger
import (
"time"
+
+ "github.com/uber/jaeger-client-go/log"
)
// ReporterOption is a function that sets some option on the reporter.
@@ -31,7 +33,7 @@ type reporterOptions struct {
// bufferFlushInterval is how often the buffer is force-flushed, even if it's not full
bufferFlushInterval time.Duration
// logger is used to log errors of span submissions
- logger Logger
+ logger log.DebugLogger
// metrics is used to record runtime stats
metrics *Metrics
}
@@ -64,6 +66,6 @@ func (reporterOptions) BufferFlushInterval(bufferFlushInterval time.Duration) Re
// errors of span submissions.
func (reporterOptions) Logger(logger Logger) ReporterOption {
return func(r *reporterOptions) {
- r.logger = logger
+ r.logger = log.DebugLogAdapter(logger)
}
}
diff --git a/vendor/github.com/uber/jaeger-client-go/sampler.go b/vendor/github.com/uber/jaeger-client-go/sampler.go
index f47004b1f..d0be8ad50 100644
--- a/vendor/github.com/uber/jaeger-client-go/sampler.go
+++ b/vendor/github.com/uber/jaeger-client-go/sampler.go
@@ -17,6 +17,7 @@ package jaeger
import (
"fmt"
"math"
+ "strings"
"sync"
"github.com/uber/jaeger-client-go/thrift-gen/sampling"
@@ -141,7 +142,7 @@ func (s *ProbabilisticSampler) SamplingRate() float64 {
// IsSampled implements IsSampled() of Sampler.
func (s *ProbabilisticSampler) IsSampled(id TraceID, operation string) (bool, []Tag) {
- return s.samplingBoundary >= id.Low, s.tags
+ return s.samplingBoundary >= id.Low&maxRandomNumber, s.tags
}
// Close implements Close() of Sampler.
@@ -319,6 +320,10 @@ func (s *GuaranteedThroughputProbabilisticSampler) update(lowerBound, samplingRa
}
}
+func (s GuaranteedThroughputProbabilisticSampler) String() string {
+ return fmt.Sprintf("GuaranteedThroughputProbabilisticSampler(lowerBound=%f, samplingRate=%f)", s.lowerBound, s.samplingRate)
+}
+
// -----------------------
// PerOperationSampler is a delegating sampler that applies GuaranteedThroughputProbabilisticSampler
@@ -456,6 +461,23 @@ func (s *PerOperationSampler) Close() {
s.defaultSampler.Close()
}
+func (s *PerOperationSampler) String() string {
+ var sb strings.Builder
+
+ fmt.Fprintf(&sb, "PerOperationSampler(defaultSampler=%v, ", s.defaultSampler)
+ fmt.Fprintf(&sb, "lowerBound=%f, ", s.lowerBound)
+ fmt.Fprintf(&sb, "maxOperations=%d, ", s.maxOperations)
+ fmt.Fprintf(&sb, "operationNameLateBinding=%t, ", s.operationNameLateBinding)
+ fmt.Fprintf(&sb, "numOperations=%d,\n", len(s.samplers))
+ fmt.Fprintf(&sb, "samplers=[")
+ for operationName, sampler := range s.samplers {
+ fmt.Fprintf(&sb, "\n(operationName=%s, sampler=%v)", operationName, sampler)
+ }
+ fmt.Fprintf(&sb, "])")
+
+ return sb.String()
+}
+
// Equal is not used.
// TODO (breaking change) remove this in the future
func (s *PerOperationSampler) Equal(other Sampler) bool {
diff --git a/vendor/github.com/uber/jaeger-client-go/sampler_remote.go b/vendor/github.com/uber/jaeger-client-go/sampler_remote.go
index 4448b8f64..112e3e1cb 100644
--- a/vendor/github.com/uber/jaeger-client-go/sampler_remote.go
+++ b/vendor/github.com/uber/jaeger-client-go/sampler_remote.go
@@ -24,6 +24,7 @@ import (
"sync/atomic"
"time"
+ "github.com/uber/jaeger-client-go/log"
"github.com/uber/jaeger-client-go/thrift-gen/sampling"
)
@@ -199,6 +200,7 @@ func (s *RemotelyControlledSampler) updateSamplerViaUpdaters(strategy interface{
return err
}
if sampler != nil {
+ s.logger.Debugf("sampler updated: %+v", sampler)
s.sampler = sampler
return nil
}
@@ -290,7 +292,7 @@ func (u *AdaptiveSamplerUpdater) Update(sampler SamplerV2, strategy interface{})
type httpSamplingStrategyFetcher struct {
serverURL string
- logger Logger
+ logger log.DebugLogger
}
func (f *httpSamplingStrategyFetcher) Fetch(serviceName string) ([]byte, error) {
diff --git a/vendor/github.com/uber/jaeger-client-go/sampler_remote_options.go b/vendor/github.com/uber/jaeger-client-go/sampler_remote_options.go
index 3b5c6aa9c..e4a6108b7 100644
--- a/vendor/github.com/uber/jaeger-client-go/sampler_remote_options.go
+++ b/vendor/github.com/uber/jaeger-client-go/sampler_remote_options.go
@@ -35,7 +35,7 @@ type SamplerOptionsFactory struct{}
type samplerOptions struct {
metrics *Metrics
sampler SamplerV2
- logger Logger
+ logger log.DebugLogger
samplingServerURL string
samplingRefreshInterval time.Duration
samplingFetcher SamplingStrategyFetcher
@@ -79,7 +79,7 @@ func (SamplerOptionsFactory) InitialSampler(sampler Sampler) SamplerOption {
// Logger creates a SamplerOption that sets the logger used by the sampler.
func (SamplerOptionsFactory) Logger(logger Logger) SamplerOption {
return func(o *samplerOptions) {
- o.logger = logger
+ o.logger = log.DebugLogAdapter(logger)
}
}
diff --git a/vendor/github.com/uber/jaeger-client-go/tracer.go b/vendor/github.com/uber/jaeger-client-go/tracer.go
index da43ec6db..8a3fc97ab 100644
--- a/vendor/github.com/uber/jaeger-client-go/tracer.go
+++ b/vendor/github.com/uber/jaeger-client-go/tracer.go
@@ -41,7 +41,7 @@ type Tracer struct {
sampler SamplerV2
reporter Reporter
metrics Metrics
- logger log.Logger
+ logger log.DebugLogger
timeNow func() time.Time
randomNumber func() uint64
@@ -366,6 +366,7 @@ func (t *Tracer) Extract(
// Close releases all resources used by the Tracer and flushes any remaining buffered spans.
func (t *Tracer) Close() error {
+ t.logger.Debugf("closing tracer")
t.reporter.Close()
t.sampler.Close()
if mgr, ok := t.baggageRestrictionManager.(io.Closer); ok {
diff --git a/vendor/github.com/uber/jaeger-client-go/tracer_options.go b/vendor/github.com/uber/jaeger-client-go/tracer_options.go
index f016484b9..f0734b772 100644
--- a/vendor/github.com/uber/jaeger-client-go/tracer_options.go
+++ b/vendor/github.com/uber/jaeger-client-go/tracer_options.go
@@ -21,6 +21,7 @@ import (
"github.com/uber/jaeger-client-go/internal/baggage"
"github.com/uber/jaeger-client-go/internal/throttler"
+ "github.com/uber/jaeger-client-go/log"
)
// TracerOption is a function that sets some option on the tracer
@@ -42,7 +43,7 @@ func (tracerOptions) Metrics(m *Metrics) TracerOption {
// Logger creates a TracerOption that gives the tracer a Logger.
func (tracerOptions) Logger(logger Logger) TracerOption {
return func(tracer *Tracer) {
- tracer.logger = logger
+ tracer.logger = log.DebugLogAdapter(logger)
}
}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b638d1ad0..fac8238c6 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -486,7 +486,7 @@ github.com/stretchr/testify/require
github.com/syndtr/gocapability/capability
# github.com/tchap/go-patricia v2.3.0+incompatible
github.com/tchap/go-patricia/patricia
-# github.com/uber/jaeger-client-go v2.22.1+incompatible
+# github.com/uber/jaeger-client-go v2.23.1+incompatible
github.com/uber/jaeger-client-go
github.com/uber/jaeger-client-go/config
github.com/uber/jaeger-client-go/internal/baggage