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

Conversation

corhere
Copy link
Contributor

@corhere corhere commented Feb 6, 2023

- What I did
IPVLAN networks created on Moby v20.10 do not have the IpvlanFlag configuration value persisted in the libnetwork database as that config value did not exist before v23.0.0. Gracefully migrate configurations on unmarshal to prevent type-assertion panics at daemon start after upgrade.

- How I did it

- How to verify it

  1. Create an IPVLAN network with Moby v20.10.x
  2. Upgrade dockerd, or copy /var/lib/docker/network/files/local-kv.db into an upgraded installation
  3. Start the upgraded daemon and inspect the aforementioned network

- Description for the changelog

  • Fixed an issue which prevented the daemon from starting upon upgrade from v20.10 or earlier when an IPVLAN network is configured.

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@neersighted
Copy link
Member

This will need a rebase in light of #44938; or we could go ahead and merge without validate/ tasks.

@thaJeztah
Copy link
Member

#44938 was merged

@corhere
Copy link
Contributor Author

corhere commented Feb 6, 2023

@thaJeztah @neersighted I'll rebase

IPVLAN networks created on Moby v20.10 do not have the IpvlanFlag
configuration value persisted in the libnetwork database as that config
value did not exist before v23.0.0. Gracefully migrate configurations on
unmarshal to prevent type-assertion panics at daemon start after upgrade.

Fixes moby#44925

Signed-off-by: Cory Snider <csnider@mirantis.com>
(cherry picked from commit 91725dd)
Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the backport-23.0/fix-44925-ipvlan-panic branch from 0579575 to 427101f Compare February 6, 2023 23:16
@neersighted neersighted merged commit fc5d6c9 into moby:23.0 Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants