diff options
author | Scott Moser <smoser@brickies.net> | 2017-03-16 11:20:02 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-03-24 15:30:28 -0400 |
commit | 443095f4d4b6feba30c7011b7ab48adb2a40fcf5 (patch) | |
tree | ac22adfa49afc7acc3620361089421dceaf0cb60 /tools | |
parent | 20a628c122583e159782c88547128fec1983376c (diff) | |
download | vyos-cloud-init-443095f4d4b6feba30c7011b7ab48adb2a40fcf5.tar.gz vyos-cloud-init-443095f4d4b6feba30c7011b7ab48adb2a40fcf5.zip |
ConfigDrive: support reading config drive data from /config-drive.
This is thie cloud-init part of a fix to allow nova-lxd to provide
config drive data. The other part will be done in nova-lxd.
The agreement here is that nova-lxd will copy the contents of the
config drive to /config-drive in the container.
LP: #1673411
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/ds-identify | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/ds-identify b/tools/ds-identify index b3220c1f..bf09a3ad 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -538,6 +538,19 @@ check_configdrive_v2() { if has_fs_with_label "config-2"; then return ${DS_FOUND} fi + # 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 + 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 + debug 1 "config drive seeded directory had only 'latest'" + return ${DS_FOUND} + fi return ${DS_NOT_FOUND} } |