Skip to content

Commit

Permalink
sources: do not override datasource detection if None is in list
Browse files Browse the repository at this point in the history
Users with datasource_list = [Azure, None] started failing to boot
properly outside of Azure with the changes to override datasource detection.

If the fallback "None" is included in the datasource_list, do not treat
the system as configured with a single datasource.

If users want to force a single datasource regardless of detection,
they can do so by removing None from the list.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
  • Loading branch information
cjp256 committed Sep 11, 2023
1 parent efcd006 commit 35988cc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cloudinit/sources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,7 @@ def override_ds_detect(self) -> bool:
self,
)
return True
elif self.sys_cfg.get("datasource_list", []) in (
[self.dsname],
[self.dsname, "None"],
):
elif self.sys_cfg.get("datasource_list", []) == [self.dsname]:
LOG.debug(
"Machine is configured to run on single datasource %s.", self
)
Expand Down

0 comments on commit 35988cc

Please sign in to comment.