On the latest centos 7 release, we are unable to resize our instances filesystems
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Expired
|
Medium
|
Unassigned | ||
cloud-init (CentOS) |
Unknown
|
Unknown
|
Bug Description
Since the CentOS 7 update to cloud-init 0.7.9, we've been unable to resize our instance's root drives. Of course, since root volume resize is not officially supported in openstack, what we do is a bit of hack. We basically shutdown the vm -> cinder reset-state --state available *volume id* -> cinder extend *volume id* *size* -> cinder reset-state --state in-use *volume-id* -> migrate the VM (to remake the iscsi mount) -> startup the VM. This increases the volume size and still works. The issue is when cloud-init needs to execute the growpart module.
See https:/
The only error we get is related to vendordata, which may be preventing the resize process to happen :
2017-09-28 02:01:43,641 - util.py[WARNING]: failed stage init
2017-09-28 02:01:43,641 - util.py[DEBUG]: failed stage init
Traceback (most recent call last):
File "/usr/lib/
ret = functor(name, args)
File "/usr/lib/
init.update()
File "/usr/lib/
self.
File "/usr/lib/
util.
File "/usr/lib/
content = encode_
File "/usr/lib/
return text.encode(
AttributeError: 'dict' object has no attribute 'encode'
This is on openstack Ocata though, and the vendordata has always been empty, as we use the default settings for it.
Cloud provider: we are the cloud provider, PlanetHoster, using Openstack Ocata.
version: Cloud-init 0.7.9-9.
relevant cloud-init config:
cloud_init_modules:
- migrator
- bootcmd
- write-files
- growpart
- resizefs
- update_etc_hosts
- rsyslog
- users-groups
- ssh
Any datasource that uses convert_vendordata is possibly affected.
This is bad in that it fails, but not as bad as it could be. Cloud-init
itself never re-constitutes the blob on disk. Its only a convenience for
the user.
What we should do:
a.) always have vendordata_raw be bytes
b.) write them as bytes to the file
We can still allow the datasource to use something like 'convert_ vendordata'
intelligently to get types other than bytes. We just have to have
the 'get_vendordata' function access a different attribute in the datasource.
ie: vendordata_ raw should always be the raw bytes as found. converted' (?) to take advantage of the datasource specific knowlege.
- DataSource.
- get_vendordata would then use some other attribuate 'vendordata_