diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-10-04 19:20:23 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-10-04 19:20:23 -0400 |
commit | 54da96b3e4838ce8c13d27d80226cc17c80b384a (patch) | |
tree | 4f8f3ae270482e49248cbd1a80e84e859f31dd0c /cloudinit/sources | |
parent | 26d2c9a3b4b9fdcdd0d26b62df2aad68ee480f62 (diff) | |
parent | fb7b982da08619fad2c582f921c05cf982621c0b (diff) | |
download | vyos-cloud-init-54da96b3e4838ce8c13d27d80226cc17c80b384a.tar.gz vyos-cloud-init-54da96b3e4838ce8c13d27d80226cc17c80b384a.zip |
fix failure to create disks on azure, create new 'dev.part' notation
This fixes azure partition creation, and introduces 'ephemeral0.1'
notation to indicate "partition 1 on whatever device is ephemeral0".
LP: #1233698
Diffstat (limited to 'cloudinit/sources')
-rw-r--r-- | cloudinit/sources/DataSourceAzure.py | 5 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceSmartOS.py | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py index 7ba6cea8..8321dee0 100644 --- a/cloudinit/sources/DataSourceAzure.py +++ b/cloudinit/sources/DataSourceAzure.py @@ -54,8 +54,9 @@ BUILTIN_CLOUD_CONFIG = { 'layout': True, 'overwrite': False} }, - 'fs_setup': [{'filesystem': 'ext4', 'device': 'ephemeral0', - 'partition': 'auto'}], + 'fs_setup': [{'filesystem': 'ext4', + 'device': 'ephemeral0.1', + 'replace_fs': 'ntfs'}] } DS_CFG_PATH = ['datasource', DS_NAME] diff --git a/cloudinit/sources/DataSourceSmartOS.py b/cloudinit/sources/DataSourceSmartOS.py index 93b8b50b..2813ffb3 100644 --- a/cloudinit/sources/DataSourceSmartOS.py +++ b/cloudinit/sources/DataSourceSmartOS.py @@ -46,6 +46,7 @@ SMARTOS_ATTRIB_MAP = { 'user-data': ('user-data', False), 'iptables_disable': ('iptables_disable', True), 'motd_sys_info': ('motd_sys_info', True), + 'availability_zone': ('region', True), } DS_NAME = 'SmartOS' @@ -81,8 +82,9 @@ BUILTIN_CLOUD_CONFIG = { 'layout': False, 'overwrite': False} }, - 'fs_setup': [{'label': 'ephemeral0', 'filesystem': 'ext3', - 'device': 'ephemeral0', 'partition': 'auto'}], + 'fs_setup': [{'label': 'ephemeral0', + 'filesystem': 'ext3', + 'device': 'ephemeral0'}], } @@ -174,6 +176,13 @@ class DataSourceSmartOS(sources.DataSource): seed_timeout=self.seed_timeout, default=default, b64=b64) + @property + def availability_zone(self): + try: + return self.metadata['availability-zone'] + except KeyError: + return None + def get_serial(seed_device, seed_timeout): """This is replaced in unit testing, allowing us to replace |