From 76b7b381497af9e4a6197606fd4d5fd5269b180b Mon Sep 17 00:00:00 2001 From: Chris Patterson Date: Tue, 12 Sep 2023 10:51:14 -0400 Subject: [PATCH] sources: do not override datasource detection if None is in list (#4426) 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 --- cloudinit/sources/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index 74937c57098..98b7b8696b8 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -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 )