summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-04-02 15:58:23 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-07 19:22:10 -0700
commite0847f5457edfdeb17dad259f1cd06b1d4cec93e (patch)
tree157f89a3172892a83b7c8515b0991d806f4c159e /cmd/podman
parentb4840ec0d34bd679faefe06ce52ee6cebcb8f0b5 (diff)
downloadpodman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.tar.gz
podman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.tar.bz2
podman-e0847f5457edfdeb17dad259f1cd06b1d4cec93e.zip
V2 podman system service
* Added support for system service * Enabled linting on the varlinkapi source, needed to support V2 service command * Added support for PODMAN_SOCKET Skip linting deprecated code Rather than introduce bugs by correcting deprecated code, linting the code is being skipped. Code that is being ported into V2 is being checked. Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/commands_remoteclient.go6
-rw-r--r--cmd/podman/main.go4
-rw-r--r--cmd/podman/service.go6
-rw-r--r--cmd/podman/service_dummy.go1
-rw-r--r--cmd/podman/varlink.go2
-rw-r--r--cmd/podman/varlink_dummy.go1
6 files changed, 11 insertions, 9 deletions
diff --git a/cmd/podman/commands_remoteclient.go b/cmd/podman/commands_remoteclient.go
index ef523ffb1..11baeb4ae 100644
--- a/cmd/podman/commands_remoteclient.go
+++ b/cmd/podman/commands_remoteclient.go
@@ -14,7 +14,7 @@ func getMainCommands() []*cobra.Command {
}
// commands that only the remoteclient implements
-func getAppCommands() []*cobra.Command {
+func getAppCommands() []*cobra.Command { // nolint:varcheck,deadcode,unused
return []*cobra.Command{}
}
@@ -29,7 +29,7 @@ func getContainerSubCommands() []*cobra.Command {
}
// commands that only the remoteclient implements
-func getGenerateSubCommands() []*cobra.Command {
+func getGenerateSubCommands() []*cobra.Command { // nolint:varcheck,deadcode,unused
return []*cobra.Command{}
}
@@ -126,7 +126,7 @@ func getDefaultPidsDescription() string {
return "Tune container pids limit (set 0 for unlimited, -1 for server defaults)"
}
-func getDefaultShareNetwork() string {
+func getDefaultShareNetwork() string { // nolint:varcheck,deadcode,unused
return ""
}
diff --git a/cmd/podman/main.go b/cmd/podman/main.go
index 5134448da..4435b036e 100644
--- a/cmd/podman/main.go
+++ b/cmd/podman/main.go
@@ -24,8 +24,8 @@ import (
var (
exitCode = define.ExecErrorCodeGeneric
Ctx context.Context
- span opentracing.Span
- closer io.Closer
+ span opentracing.Span // nolint:varcheck,deadcode,unused
+ closer io.Closer // nolint:varcheck,deadcode,unused
)
// Commands that the remote and local client have
diff --git a/cmd/podman/service.go b/cmd/podman/service.go
index bcb37eac5..41ec499a1 100644
--- a/cmd/podman/service.go
+++ b/cmd/podman/service.go
@@ -91,7 +91,7 @@ func resolveApiURI(c *cliconfig.ServiceValues) (string, error) {
if len(c.InputArgs) > 0 {
apiURI = c.InputArgs[0]
- } else if ok := systemd.SocketActivated(); ok {
+ } else if ok := systemd.SocketActivated(); ok { // nolint: gocritic
apiURI = ""
} else if rootless.IsRootless() {
xdg, err := util.GetRuntimeDir()
@@ -161,7 +161,7 @@ func runREST(r *libpod.Runtime, uri string, timeout time.Duration) error {
}
func runVarlink(r *libpod.Runtime, uri string, timeout time.Duration, c *cliconfig.ServiceValues) error {
- var varlinkInterfaces = []*iopodman.VarlinkInterface{varlinkapi.New(&c.PodmanCommand, r)}
+ var varlinkInterfaces = []*iopodman.VarlinkInterface{varlinkapi.New(c.PodmanCommand.Command, r)}
service, err := varlink.NewService(
"Atomic",
"podman",
@@ -182,7 +182,7 @@ func runVarlink(r *libpod.Runtime, uri string, timeout time.Duration, c *cliconf
if err = service.Listen(uri, timeout); err != nil {
switch err.(type) {
case varlink.ServiceTimeoutError:
- logrus.Infof("varlink service expired (use --timeout to increase session time beyond %d ms, 0 means never timeout)", timeout.String())
+ logrus.Infof("varlink service expired (use --timeout to increase session time beyond %s ms, 0 means never timeout)", timeout.String())
return nil
default:
return errors.Wrapf(err, "unable to start varlink service")
diff --git a/cmd/podman/service_dummy.go b/cmd/podman/service_dummy.go
index a774c34de..a726f21c1 100644
--- a/cmd/podman/service_dummy.go
+++ b/cmd/podman/service_dummy.go
@@ -5,6 +5,7 @@ package main
import "github.com/spf13/cobra"
var (
+ // nolint:varcheck,deadcode,unused
_serviceCommand = &cobra.Command{
Use: "",
}
diff --git a/cmd/podman/varlink.go b/cmd/podman/varlink.go
index 20334ec96..be882d497 100644
--- a/cmd/podman/varlink.go
+++ b/cmd/podman/varlink.go
@@ -85,7 +85,7 @@ func varlinkCmd(c *cliconfig.VarlinkValues) error {
}
defer runtime.DeferredShutdown(false)
- var varlinkInterfaces = []*iopodman.VarlinkInterface{varlinkapi.New(&c.PodmanCommand, runtime)}
+ var varlinkInterfaces = []*iopodman.VarlinkInterface{varlinkapi.New(c.PodmanCommand.Command, runtime)}
// Register varlink service. The metadata can be retrieved with:
// $ varlink info [varlink address URI]
service, err := varlink.NewService(
diff --git a/cmd/podman/varlink_dummy.go b/cmd/podman/varlink_dummy.go
index 430511d72..0c7981f1a 100644
--- a/cmd/podman/varlink_dummy.go
+++ b/cmd/podman/varlink_dummy.go
@@ -5,6 +5,7 @@ package main
import "github.com/spf13/cobra"
var (
+ // nolint:varcheck,deadcode,unused
_varlinkCommand = &cobra.Command{
Use: "",
}