Gonéri Le Bouder has proposed merging ~goneri/cloud-init:freebsd_mount_sync into cloud-init:master.
Requested reviews: cloud-init commiters (cloud-init-dev) For more details, see: https://code.launchpad.net/~goneri/cloud-init/+git/cloud-init/+merge/364997 -- Your team cloud-init commiters is requested to review the proposed merge of ~goneri/cloud-init:freebsd_mount_sync into cloud-init:master.
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 564e3eb..c68afc7 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -72,15 +72,12 @@ class DataSourceConfigDrive(openstack.SourceMixin, sources.DataSource): dslist = self.sys_cfg.get('datasource_list') for dev in find_candidate_devs(dslist=dslist): try: - # Set mtype if freebsd and turn off sync if dev.startswith("/dev/cd"): mtype = "cd9660" - sync = False else: mtype = None - sync = True results = util.mount_cb(dev, read_config_drive, - mtype=mtype, sync=sync) + mtype=mtype) found = dev except openstack.NonReadable: pass diff --git a/cloudinit/util.py b/cloudinit/util.py index 385f231..24bcb7b 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -1679,7 +1679,7 @@ def mounts(): return mounted -def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=True, +def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=None, update_env_for_mount=None): """ Mount the device, call method 'callback' passing the directory @@ -1704,6 +1704,8 @@ def mount_cb(device, callback, data=None, rw=False, mtype=None, sync=True, # clean up 'mtype' input a bit based on platform. platsys = platform.system().lower() if platsys == "linux": + if sync is None: + sync = True if mtypes is None: mtypes = ["auto"] elif platsys.endswith("bsd"):
_______________________________________________ Mailing list: https://launchpad.net/~cloud-init-dev Post to : cloud-init-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~cloud-init-dev More help : https://help.launchpad.net/ListHelp