-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ds-identify: exit 2 on disabled state from marker or cmdline
The cloud-init-generator no longer checks disabled state of cloud-init from the kernel command line or marker file in /etc/cloud/cloud-init.disabled. This means ds-identify will be called during systemd generator even in disabled cases. Given that ds-identify parses the kernel commandline for datasource discovery, allow it to check whether cloud-init=disabled is present in kernel command line, KERNEL_CMDLINE or /etc/cloud/cloud-init.disabled. Add a new exit code(2) from ds-identify to allow cloud-init-generator to allow differentation of disabled state due to environment artifacts versus disabled due to no detected datasources. Additionally, factor the minimum operations needed for detecting if cloud-init is disabled to earlier in ds-identify to allow an early exit before more costly DMI read operations in collect_info. There is no need to perform all collect_info in ds-identify when cloud-init is fully disabled by commandline or /etc/cloud/cloud-init.disabled.
- Loading branch information
1 parent
07965a6
commit 1b5d9b4
Showing
3 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters