Skip to content

Commit

Permalink
bug(maas): register the correct DatasourceMAASLocal in init-local
Browse files Browse the repository at this point in the history
Incorrectly registering DataSourceMAAS for init-local DEP_FILESYSTEM
inadvertently short-circuits the _get_dat checks on network setup
from initramfs. This results in a 2 minute timeout on physical system
reboots. Correct this registration to do the proper checks and avoid
trying to perform GETs against the IMDS in init-local timeframe when
we know network is not yet available.

Fixes GH-5064
  • Loading branch information
blackboxsw committed Mar 18, 2024
1 parent 18daab5 commit 10ab82d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cloudinit/sources/DataSourceMAAS.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class MAASSeedDirMalformed(Exception):

# Used to match classes to dependencies
datasources = [
(DataSourceMAAS, (sources.DEP_FILESYSTEM,)),
(DataSourceMAASLocal, (sources.DEP_FILESYSTEM,)),
(DataSourceMAAS, (sources.DEP_FILESYSTEM, sources.DEP_NETWORK)),
]

Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/sources/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Hetzner.DataSourceHetzner,
IBMCloud.DataSourceIBMCloud,
LXD.DataSourceLXD,
MAAS.DataSourceMAAS,
MAAS.DataSourceMAASLocal,
NoCloud.DataSourceNoCloud,
OpenNebula.DataSourceOpenNebula,
Oracle.DataSourceOracle,
Expand Down

0 comments on commit 10ab82d

Please sign in to comment.