diff options
author | Paul Querna <pquerna@apache.org> | 2014-01-23 14:11:05 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2014-01-23 14:11:05 -0500 |
commit | 814b32b5b6e6e8639fdbfb41eab2531f25c248d9 (patch) | |
tree | e0f07a21954100206e237567e5489404fef5e701 /cloudinit/sources | |
parent | 131ff5e3955ac489d68330034cee044a4ca9d6f0 (diff) | |
parent | 66aa9826b818c3478516104b38039fecbd717b6b (diff) | |
download | vyos-cloud-init-814b32b5b6e6e8639fdbfb41eab2531f25c248d9.tar.gz vyos-cloud-init-814b32b5b6e6e8639fdbfb41eab2531f25c248d9.zip |
Consider partitions as sources for configdrive if labelled correctly
This change removes the filtering of partitions from potential ConfigDrive
sources, if the LABEL of the partition is set to "config-2".
This is useful for a bare metal device. It may not have a separate device for
ConfigDrive, but instead have a ConfigDrive available on a partition.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 4f437244..2a244496 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -284,8 +284,10 @@ def find_candidate_devs(): # followed by fstype items, but with dupes removed combined = (by_label + [d for d in by_fstype if d not in by_label]) - # We are looking for block device (sda, not sda1), ignore partitions - combined = [d for d in combined if not util.is_partition(d)] + # We are looking for a block device or partition with necessary label or + # an unpartitioned block device. + combined = [d for d in combined + if d in by_label or not util.is_partition(d)] return combined |