summaryrefslogtreecommitdiff
path: root/cloudinit/config
diff options
context:
space:
mode:
authorJonathan Ballet <jballet@edgelab.ch>2017-03-23 14:35:59 +0100
committerScott Moser <smoser@brickies.net>2017-03-24 15:40:28 -0400
commit4a2b2f87ec48c227eb8fb2091dba604457cf8de8 (patch)
tree60dae739965ccc8551517a66f66cad8fdeed03b1 /cloudinit/config
parent443095f4d4b6feba30c7011b7ab48adb2a40fcf5 (diff)
downloadvyos-cloud-init-4a2b2f87ec48c227eb8fb2091dba604457cf8de8.tar.gz
vyos-cloud-init-4a2b2f87ec48c227eb8fb2091dba604457cf8de8.zip
Fix filesystem creation when using "partition: auto"
Accordingly to the documentation: The ``partition`` option may also be set to ``auto``, in which this module will search for the existance of a filesystem matching the ``label``, ``type`` and ``device`` of the ``fs_setup`` entry and will skip creating the filesystem if one is found. However, using this "auto" flag always recreates the partition no matter if it has been done before or not. This commit fixes a bug in which the "partition" attribute was always set to None although in some cases it should not. LP: #1634678
Diffstat (limited to 'cloudinit/config')
-rw-r--r--cloudinit/config/cc_disk_setup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_disk_setup.py b/cloudinit/config/cc_disk_setup.py
index 38df13ab..f39f0815 100644
--- a/cloudinit/config/cc_disk_setup.py
+++ b/cloudinit/config/cc_disk_setup.py
@@ -201,7 +201,7 @@ def update_fs_setup_devices(disk_setup, tformer):
if part and 'partition' in definition:
definition['_partition'] = definition['partition']
- definition['partition'] = part
+ definition['partition'] = part
def value_splitter(values, start=None):