yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #59247
[Bug 1645947] [NEW] cc_growpart fails on ZFS root mount
Public bug reported:
Hey guys,
When having / mounted on ZFS cc_growpart fails with the following
message:
2016-11-29 21:40:34,761 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
2016-11-29 21:40:34,761 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
2016-11-29 21:40:34,762 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
2016-11-29 21:40:34,762 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
2016-11-29 21:40:34,763 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 792, in _run_modules
freq=freq)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cloud.py", line 70, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/local/lib/python2.7/site-packages/cloudinit/helpers.py", line 199, in run
results = functor(*args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 350, in handle
func=resize_devices, args=(resizer, devices))
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2194, in log_time
ret = func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 270, in resize_devices
blockdev = devent2dev(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 259, in devent2dev
result = util.get_mount_info(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2156, in get_mount_info
return parse_mount(path)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2112, in parse_mount
devpth = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2016-11-29 21:40:34,763 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 792, in _run_modules
freq=freq)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cloud.py", line 70, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/local/lib/python2.7/site-packages/cloudinit/helpers.py", line 199, in run
results = functor(*args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 350, in handle
func=resize_devices, args=(resizer, devices))
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2194, in log_time
ret = func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 270, in resize_devices
blockdev = devent2dev(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 259, in devent2dev
result = util.get_mount_info(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2156, in get_mount_info
return parse_mount(path)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2112, in parse_mount
devpth = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2016-11-29 21:40:34,766 - stages.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyc'>) with frequency always
2016-11-29 21:40:34,766 - stages.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyc'>) with frequency always
The 'mount' command in FreeBSD with / under ZFS is the following:
zroot on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/usr on /usr (zfs, local, nfsv4acls)
zroot/usr/home on /usr/home (zfs, local, nfsv4acls)
zroot/usr/home/vagrant on /usr/home/vagrant (zfs, local, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, nosuid, nfsv4acls)
zroot/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/ports/packages on /usr/ports/packages (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var on /var (zfs, local, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db on /var/db (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db/pkg on /var/db/pkg (zfs, local, nosuid, nfsv4acls)
zroot/var/empty on /var/empty (zfs, local, noexec, nosuid, read-only, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/run on /var/run (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
Attached is a patch to fix this, for testing this regex you can go to
https://regex101.com/r/nKDjgA/1
Thanks!
** Affects: cloud-init
Importance: Undecided
Status: New
** Tags: freebsd growpart patch zfs
** Patch added: "patch"
https://bugs.launchpad.net/bugs/1645947/+attachment/4784993/+files/0001-cc_growpart-failing-on-ZFS-root-partition.patch
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1645947
Title:
cc_growpart fails on ZFS root mount
Status in cloud-init:
New
Bug description:
Hey guys,
When having / mounted on ZFS cc_growpart fails with the following
message:
2016-11-29 21:40:34,761 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
2016-11-29 21:40:34,761 - handlers.py[DEBUG]: finish: init-network/config-growpart: FAIL: running config-growpart with frequency always
2016-11-29 21:40:34,762 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
2016-11-29 21:40:34,762 - util.py[WARNING]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
2016-11-29 21:40:34,763 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 792, in _run_modules
freq=freq)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cloud.py", line 70, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/local/lib/python2.7/site-packages/cloudinit/helpers.py", line 199, in run
results = functor(*args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 350, in handle
func=resize_devices, args=(resizer, devices))
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2194, in log_time
ret = func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 270, in resize_devices
blockdev = devent2dev(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 259, in devent2dev
result = util.get_mount_info(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2156, in get_mount_info
return parse_mount(path)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2112, in parse_mount
devpth = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2016-11-29 21:40:34,763 - util.py[DEBUG]: Running module growpart (<module 'cloudinit.config.cc_growpart' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.pyc'>) failed
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/cloudinit/stages.py", line 792, in _run_modules
freq=freq)
File "/usr/local/lib/python2.7/site-packages/cloudinit/cloud.py", line 70, in run
return self._runners.run(name, functor, args, freq, clear_on_fail)
File "/usr/local/lib/python2.7/site-packages/cloudinit/helpers.py", line 199, in run
results = functor(*args)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 350, in handle
func=resize_devices, args=(resizer, devices))
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2194, in log_time
ret = func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 270, in resize_devices
blockdev = devent2dev(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py", line 259, in devent2dev
result = util.get_mount_info(devent)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2156, in get_mount_info
return parse_mount(path)
File "/usr/local/lib/python2.7/site-packages/cloudinit/util.py", line 2112, in parse_mount
devpth = m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
2016-11-29 21:40:34,766 - stages.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyc'>) with frequency always
2016-11-29 21:40:34,766 - stages.py[DEBUG]: Running module resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/local/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyc'>) with frequency always
The 'mount' command in FreeBSD with / under ZFS is the following:
zroot on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/usr on /usr (zfs, local, nfsv4acls)
zroot/usr/home on /usr/home (zfs, local, nfsv4acls)
zroot/usr/home/vagrant on /usr/home/vagrant (zfs, local, nfsv4acls)
zroot/usr/ports on /usr/ports (zfs, local, nosuid, nfsv4acls)
zroot/usr/ports/distfiles on /usr/ports/distfiles (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/ports/packages on /usr/ports/packages (zfs, local, noexec, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var on /var (zfs, local, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db on /var/db (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/db/pkg on /var/db/pkg (zfs, local, nosuid, nfsv4acls)
zroot/var/empty on /var/empty (zfs, local, noexec, nosuid, read-only, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/run on /var/run (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
Attached is a patch to fix this, for testing this regex you can go to
https://regex101.com/r/nKDjgA/1
Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1645947/+subscriptions