cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #04808
[Merge] ~smoser/cloud-init:cleanup/ds-identify-not-call-is_ds_enabled-twice into cloud-init:master
Scott Moser has proposed merging ~smoser/cloud-init:cleanup/ds-identify-not-call-is_ds_enabled-twice into cloud-init:master.
Commit message:
ds-identify: Remove dupe call to is_ds_enabled, improve debug message.
We had two calls to is_ds_enabled, and the debug message looked
something like this:
is_ds_enabled returned 1: ConfigDrive NoCloud
Now instead we have just one call, and the debug message like:
is_ds_enabled(IBMCloud) = true
Requested reviews:
cloud-init commiters (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/345109
see commit message
--
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:cleanup/ds-identify-not-call-is_ds_enabled-twice into cloud-init:master.
diff --git a/tools/ds-identify b/tools/ds-identify
index 9f0d96f..895d1c5 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -632,9 +632,11 @@ check_configdrive_v2() {
return ${DS_FOUND}
fi
- is_ds_enabled "IBMCloud"
- debug 1 "is_ds_enabled returned $?: $DI_DSLIST"
- is_ds_enabled "IBMCloud" && is_ibm_cloud && return ${DS_NOT_FOUND}
+ local ibm_enabled=false
+ is_ds_enabled "IBMCloud" && ibm_enabled=true
+ debug 1 "is_ds_enabled(IBMCloud) = $ibm_enabled."
+ [ "$ibm_enabled" = "true" ] && is_ibm_cloud && return ${DS_NOT_FOUND}
+
if has_fs_with_label CONFIG-2 config-2; then
return ${DS_FOUND}
fi
Follow ups