podman/libpod/container_internal_unsupported.go
Matthew Heon b0286d6b43 Implement pod-network-reload
This adds a new command, 'podman network reload', to reload the
networks of existing containers, forcing recreation of firewall
rules after e.g. `firewall-cmd --reload` wipes them out.

Under the hood, this works by calling CNI to tear down the
existing network, then recreate it using identical settings. We
request that CNI preserve the old IP and MAC address in most
cases (where the container only had 1 IP/MAC), but there will be
some downtime inherent to the teardown/bring-up approach. The
architecture of CNI doesn't really make doing this without
downtime easy (or maybe even possible...).

At present, this only works for root Podman, and only locally.
I don't think there is much of a point to adding remote support
(this is very much a local debugging command), but I think adding
rootless support (to kill/recreate slirp4netns) could be
valuable.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
2020-12-07 19:26:23 +01:00

60 lines
1.3 KiB
Go

// +build !linux
package libpod
import (
"context"
"github.com/containers/podman/v2/libpod/define"
"github.com/containers/podman/v2/pkg/lookup"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
func (c *Container) mountSHM(shmOptions string) error {
return define.ErrNotImplemented
}
func (c *Container) unmountSHM(mount string) error {
return define.ErrNotImplemented
}
func (c *Container) prepare() error {
return define.ErrNotImplemented
}
func (c *Container) cleanupNetwork() error {
return define.ErrNotImplemented
}
func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
return nil, define.ErrNotImplemented
}
func (c *Container) checkpoint(ctx context.Context, options ContainerCheckpointOptions) error {
return define.ErrNotImplemented
}
func (c *Container) restore(ctx context.Context, options ContainerCheckpointOptions) error {
return define.ErrNotImplemented
}
func (c *Container) copyOwnerAndPerms(source, dest string) error {
return nil
}
func (c *Container) getOCICgroupPath() (string, error) {
return "", define.ErrNotImplemented
}
func (c *Container) cleanupOverlayMounts() error {
return nil
}
func (c *Container) reloadNetwork() error {
return define.ErrNotImplemented
}
func (c *Container) getUserOverrides() *lookup.Overrides {
return nil
}