mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
Remove BoltDB state support
This also includes a number of significant changes to the SQLite state made possible by removal of the legacy DB. 1. Enable database unit tests for SQLite state, with numerous tweaks to get tests passing. Most notable changes are to container removal - where we previously didn't return an error if there was no container to remove - and RemovePodContainers, which I don't think ever worked properly from my reading of the failures. 2. Removal of AddContainerToPod/RemoveContainerToPod. On SQLite, these functions are identical to AddContainer/RemoveContainer and there is no reason to retain duplicates. 3. Removal of SafeRewriteContainerConfig - it's identical to RewriteContainerConfig in SQLite, no reason to have duplicate entrypoints. As an exciting side-note, this removes Podman's requirement that containers and pods cannot share a name, which was a BoltDB restriction only. Signed-off-by: Matt Heon <matthew.heon@pm.me>
This commit is contained in:
@@ -1458,16 +1458,6 @@ func (c *Container) networks() (map[string]types.PerNetworkOptions, error) {
|
||||
return c.runtime.state.GetNetworks(c)
|
||||
}
|
||||
|
||||
// getInterfaceByName returns a formatted interface name for a given
|
||||
// network along with a bool as to whether the network existed
|
||||
func (d ContainerNetworkDescriptions) getInterfaceByName(networkName string) (string, bool) {
|
||||
val, exists := d[networkName]
|
||||
if !exists {
|
||||
return "", exists
|
||||
}
|
||||
return fmt.Sprintf("eth%d", val), exists
|
||||
}
|
||||
|
||||
// GetNetworkStatus returns the current network status for this container.
|
||||
// This returns a map without deep copying which means this should only ever
|
||||
// be used as read only access, do not modify this status.
|
||||
|
||||
Reference in New Issue
Block a user