cloud-init-dev team mailing list archive
Mailing list archive
[Merge] ~i.galic/cloud-init:fix/fbsd-resizefs into cloud-init:master
Igor Galić has proposed merging ~i.galic/cloud-init:fix/fbsd-resizefs into cloud-init:master.
cloud-init commiters (cloud-init-dev)
For more details, see:
If the device name doesn't start with `/dev/` check there for its existence!
Your team cloud-init commiters is requested to review the proposed merge of ~i.galic/cloud-init:fix/fbsd-resizefs into cloud-init:master.
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py
index 2edddd0..0e72626 100644
@@ -197,6 +197,11 @@ def maybe_get_writable_device_path(devpath, info, log):
log.debug('We have a gpt label - just go ahead')
+ # Alternatively, our device could simply be a name as returned by gpart,
+ # such as da0p3
+ if not devpath.startswith('/dev/'):
+ log.debug("We'll try '%s' as our device", devpath)
+ devpath = "/dev/" + devpath
statret = os.stat(devpath)