summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-04-17 16:27:17 -0700
committerJhon Honce <jhonce@redhat.com>2020-04-17 16:39:59 -0700
commit4e0326241b35d2549fdba5666f343c31279e18e4 (patch)
tree2d8b1e2a46ff4b5db3bb4d102667cae43854dbdb /cmd
parentaa97cb5f42a35de02d520f6c3006600505a3d6d9 (diff)
downloadpodman-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 'cmd')
-rw-r--r--cmd/podman/system/service.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index fa1a33faa..6522a45f8 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -57,7 +57,7 @@ func service(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- logrus.Infof("using API endpoint: \"%s\"", apiURI)
+ logrus.Infof("using API endpoint: '%s'", apiURI)
opts := entities.ServiceOptions{
URI: apiURI,
@@ -75,7 +75,6 @@ func service(cmd *cobra.Command, args []string) error {
}
func resolveApiURI(_url []string) (string, error) {
-
// When determining _*THE*_ listening endpoint --
// 1) User input wins always
// 2) systemd socket activation
@@ -83,14 +82,15 @@ func resolveApiURI(_url []string) (string, error) {
// 4) if varlink -- adapter.DefaultVarlinkAddress
// 5) lastly adapter.DefaultAPIAddress
- if _url == nil {
+ if len(_url) == 0 {
if v, found := os.LookupEnv("PODMAN_SOCKET"); found {
+ logrus.Debugf("PODMAN_SOCKET='%s' used to determine API endpoint", v)
_url = []string{v}
}
}
switch {
- case len(_url) > 0:
+ case len(_url) > 0 && _url[0] != "":
return _url[0], nil
case systemd.SocketActivated():
logrus.Info("using systemd socket activation to determine API endpoint")