diff options
author | baude <bbaude@redhat.com> | 2020-11-11 09:45:07 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-11-17 14:22:39 -0600 |
commit | d3e794bda39167b15c5dc14d83333d1306316b11 (patch) | |
tree | 734cda964a2d46316f6aeb279be28fea541b32f5 /cmd/podman/system/service_abi.go | |
parent | 3a172c5999706e4493824c436bd7e2e8ea7b3d59 (diff) | |
download | podman-d3e794bda39167b15c5dc14d83333d1306316b11.tar.gz podman-d3e794bda39167b15c5dc14d83333d1306316b11.tar.bz2 podman-d3e794bda39167b15c5dc14d83333d1306316b11.zip |
add network connect|disconnect compat endpoints
this enables the ability to connect and disconnect a container from a
given network. it is only for the compatibility layer. some code had to
be refactored to avoid circular imports.
additionally, tests are being deferred temporarily due to some
incompatibility/bug in either docker-py or our stack.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/system/service_abi.go')
-rw-r--r-- | cmd/podman/system/service_abi.go | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go index 84f9293d4..8c52616be 100644 --- a/cmd/podman/system/service_abi.go +++ b/cmd/podman/system/service_abi.go @@ -5,12 +5,8 @@ package system import ( "context" "net" - "os" - "os/signal" "strings" - "github.com/containers/podman/v2/cmd/podman/utils" - "github.com/containers/podman/v2/libpod" api "github.com/containers/podman/v2/pkg/api/server" "github.com/containers/podman/v2/pkg/domain/entities" "github.com/containers/podman/v2/pkg/domain/infra" @@ -43,7 +39,7 @@ func restService(opts entities.ServiceOptions, flags *pflag.FlagSet, cfg *entiti return err } - startWatcher(rt) + infra.StartWatcher(rt) server, err := api.NewServerWithSettings(rt, opts.Timeout, listener) if err != nil { return err @@ -60,24 +56,3 @@ func restService(opts entities.ServiceOptions, flags *pflag.FlagSet, cfg *entiti } return err } - -// startWatcher starts a new SIGHUP go routine for the current config. -func startWatcher(rt *libpod.Runtime) { - // Setup the signal notifier - ch := make(chan os.Signal, 1) - signal.Notify(ch, utils.SIGHUP) - - go func() { - for { - // Block until the signal is received - logrus.Debugf("waiting for SIGHUP to reload configuration") - <-ch - if err := rt.Reload(); err != nil { - logrus.Errorf("unable to reload configuration: %v", err) - continue - } - } - }() - - logrus.Debugf("registered SIGHUP watcher for config") -} |