Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[23.0 backport] libnet/d/ipvlan: gracefully migrate from older dbs #44937

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion libnetwork/drivers/ipvlan/ipvlan_store.go
Expand Up @@ -193,7 +193,12 @@ func (config *configuration) UnmarshalJSON(b []byte) error {
config.Mtu = int(nMap["Mtu"].(float64))
config.Parent = nMap["Parent"].(string)
config.IpvlanMode = nMap["IpvlanMode"].(string)
config.IpvlanFlag = nMap["IpvlanFlag"].(string)
if v, ok := nMap["IpvlanFlag"]; ok {
config.IpvlanFlag = v.(string)
} else {
// Migrate config from an older daemon which did not have the flag configurable.
config.IpvlanFlag = flagBridge
}
config.Internal = nMap["Internal"].(bool)
config.CreatedSlaveLink = nMap["CreatedSubIface"].(bool)
if v, ok := nMap["Ipv4Subnets"]; ok {
Expand Down