cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #05694
[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.
Requested reviews:
cloud-init commiters (cloud-init-dev)
For more details, see:
https://code.launchpad.net/~i.galic/cloud-init/+git/cloud-init/+merge/357723
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
--- a/cloudinit/config/cc_resizefs.py
+++ b/cloudinit/config/cc_resizefs.py
@@ -197,6 +197,11 @@ def maybe_get_writable_device_path(devpath, info, log):
if devpath.startswith('gpt/'):
log.debug('We have a gpt label - just go ahead')
return devpath
+ # 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
try:
statret = os.stat(devpath)
Follow ups