summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceConfigDrive.py
diff options
context:
space:
mode:
authorJames Penick <penick@yahoo-inc.com>2018-01-23 14:22:54 -0700
committerChad Smith <chad.smith@canonical.com>2018-01-23 14:22:54 -0700
commiteb70975eaf37cf9549949f72e7647addb81a52ac (patch)
treefeb34168c0e896509f088ee81b017ca47aea823a /cloudinit/sources/DataSourceConfigDrive.py
parent5cc0b19b851a42f6a5edb0cc9d49dd76891b1bcb (diff)
downloadvyos-cloud-init-eb70975eaf37cf9549949f72e7647addb81a52ac.tar.gz
vyos-cloud-init-eb70975eaf37cf9549949f72e7647addb81a52ac.zip
Recognize uppercase vfat disk labels
New mkfs.vfat and fatlabel tools included in the dosfsutils package no longer support creating vfat disks with lowercase labels. They silently default to an all uppercase label eg CONFIG-2 instead of config-2. This change makes cloud-init handle either upper or lower case. LP: #1598783
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 870b3688..b8db6267 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -25,7 +25,7 @@ DEFAULT_METADATA = {
"instance-id": DEFAULT_IID,
}
FS_TYPES = ('vfat', 'iso9660')
-LABEL_TYPES = ('config-2',)
+LABEL_TYPES = ('config-2', 'CONFIG-2')
POSSIBLE_MOUNTS = ('sr', 'cd')
OPTICAL_DEVICES = tuple(('/dev/%s%s' % (z, i) for z in POSSIBLE_MOUNTS
for i in range(0, 2)))
@@ -224,7 +224,7 @@ def find_candidate_devs(probe_optical=True):
config drive v2:
Disk should be:
* either vfat or iso9660 formated
- * labeled with 'config-2'
+ * labeled with 'config-2' or 'CONFIG-2'
"""
# query optical drive to get it in blkid cache for 2.6 kernels
if probe_optical: