summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2017-04-14 17:16:10 -0400
committerDaniel Watkins <daniel.watkins@canonical.com>2017-04-14 17:16:10 -0400
commit169a7105a25a27ee894af63cd8b5bcc3ded6fd2e (patch)
tree39f896b13b1ca65ef9f45c1b0d3d0250f9062656 /tools
parent41f93a6000406ca974a5b9f5dc5e29f97bb59edb (diff)
downloadvyos-cloud-init-169a7105a25a27ee894af63cd8b5bcc3ded6fd2e.tar.gz
vyos-cloud-init-169a7105a25a27ee894af63cd8b5bcc3ded6fd2e.zip
ds-identify: Check correct path for "latest" config drive
We were checking /var/lib/cloud/openstack/latest/meta_data.json instead of /var/lib/cloud/seed/config_drive/openstack/latest/meta_data.json. LP: #1673637
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ds-identify5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index 5d390ef7..a40b14d4 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -552,13 +552,14 @@ check_configdrive_v2() {
# look in /config-drive <vlc>/seed/config_drive for a directory
# openstack/YYYY-MM-DD format with a file meta_data.json
local d=""
- for d in /config-drive "${PATH_VAR_LIB_CLOUD}/seed/config_drive"; do
+ local vlc_config_drive_path="${PATH_VAR_LIB_CLOUD}/seed/config_drive"
+ for d in /config-drive $vlc_config_drive_path; do
set +f; set -- "$d/openstack/"2???-??-??/meta_data.json; set -f;
[ -f "$1" ] && return ${DS_FOUND}
done
# at least one cloud (softlayer) seeds config drive with only 'latest'.
local lpath="openstack/latest/meta_data.json"
- if [ -e "${PATH_VAR_LIB_CLOUD}/$lpath" ]; then
+ if [ -e "$vlc_config_drive_path/$lpath" ]; then
debug 1 "config drive seeded directory had only 'latest'"
return ${DS_FOUND}
fi