diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-04-17 16:27:17 -0700 |
---|---|---|
committer | Jhon Honce <jhonce@redhat.com> | 2020-04-17 16:39:59 -0700 |
commit | 4e0326241b35d2549fdba5666f343c31279e18e4 (patch) | |
tree | 2d8b1e2a46ff4b5db3bb4d102667cae43854dbdb /pkg/api/server | |
parent | aa97cb5f42a35de02d520f6c3006600505a3d6d9 (diff) | |
download | podman-4e0326241b35d2549fdba5666f343c31279e18e4.tar.gz podman-4e0326241b35d2549fdba5666f343c31279e18e4.tar.bz2 podman-4e0326241b35d2549fdba5666f343c31279e18e4.zip |
V2 Fix support for tcp://[::]<port> connections
* Fix support for socket activation, on remote and service
$ systemd-socket-activate -l 8083 --fdname=podman bin/podman system service --log-level=debug --time=30
$ bin/podman-remote --remote=tcp://[::]:8083 image ls
Or, use the podman.{socket,service} unit files
$ bin/podman-remote --remote=unix:///run/podman/podman.sock image ls
Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/server')
-rw-r--r-- | pkg/api/server/server.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/server/server.go b/pkg/api/server/server.go index 5f1a86183..9576fd437 100644 --- a/pkg/api/server/server.go +++ b/pkg/api/server/server.go @@ -51,7 +51,7 @@ func NewServerWithSettings(runtime *libpod.Runtime, duration time.Duration, list func newServer(runtime *libpod.Runtime, duration time.Duration, listener *net.Listener) (*APIServer, error) { // If listener not provided try socket activation protocol if listener == nil { - if _, found := os.LookupEnv("LISTEN_FDS"); !found { + if _, found := os.LookupEnv("LISTEN_PID"); !found { return nil, errors.Errorf("Cannot create API Server, no listener provided and socket activation protocol is not active.") } @@ -125,7 +125,7 @@ func newServer(runtime *libpod.Runtime, duration time.Duration, listener *net.Li if err != nil { methods = []string{"<N/A>"} } - logrus.Debugf("Methods: %s Path: %s", strings.Join(methods, ", "), path) + logrus.Debugf("Methods: %6s Path: %s", strings.Join(methods, ", "), path) return nil }) } @@ -179,6 +179,7 @@ func (s *APIServer) Shutdown() error { } // Gracefully shutdown server, duration of wait same as idle window + // TODO: Should we really wait the idle window for shutdown? ctx, cancel := context.WithTimeout(context.Background(), s.idleTracker.Duration) defer cancel() go func() { |