[Python-apps-team] Bug#709773: Wrong handling of debconf

Thomas Goirand zigo at debian.org
Sat May 25 14:33:40 UTC 2013


On 05/25/2013 09:41 PM, Charles Plessy wrote:
> Le Sat, May 25, 2013 at 06:31:35PM +0800, Thomas Goirand a écrit :
>> Package: cloud-init
>> Version: 0.7.1-3
>> Severity: serious
>>
>> Cloud-init has a debconf thing to handle which type of API should be
>> supported. Though it is done wrong:
>>
>> 1/ Preseeding doesn't work
>> 2/ If /etc/cloud/cloud.cfg.d/90_dpkg.cfg exists, then the currently
>> configured avlue doesn't seem to be read in the config script.
> 
> Hi Thomas,
> 
> this might (or might not) be solved already in Ubuntu's package, which is ahead
> (0.7.2~bzr809). Now that upstream version 0.7.2 is out, we can probably
> attempt to merge changes related to debconf from Ubuntu.

I have just checked, and the config and postinst script from the Ubuntu
package didn't change between 0.7.1 and 0.7.2~bzr809. So no, it's not fixed.

By the way, while I'm sure preseeding didn't work, I'm not sure about
point 2/ above. I just found the debian/cloud-init.config script very
suspicious. Normally, in such script, we would:

1/ Check if the config file is there. If it is, then:
2/ get the configured value, and set it with db_set.
3/ Do the db_input + db_go

But in this script, I can read (simplified the logic):

db_get cloud-init/datasources
case " ${RET}," in
  *\ Ec2,*) :;;
  *) hasEc2Md &&
    db_set cloud-init/datasources "${def:+${def}, }Ec2";;

This doesn't seem right, and looks like a "using debconf as registry"
type of bug to me.

Your thoughts here?

> I have done the boring part (updated debian/copyright after finding three new
> copyright notices and one new license), so if you or somebody else want to work
> on an update to 0.7.2 that would solve this bug and #709173, please go ahead,
> the road is clear.

Thanks for this.

Also, I'm hitting another problem. I haven't reported it (yet) because
I'm not sure if the problem is on my setup or otherwise.

While the GROWPART in the cloud-initramfs-growroot works (after I
somehow fixed it), the resize2fs resize from cloud-init doesn't work for
me using OpenStack. Here's cloud-init output:

util.py[WARNING]: Failed to resize filesystem (cmd=['resize2fs',
'/run/cloudinit.resizefs.nEQ1UK'])
util.py[WARNING]: Running resizefs (<module
'cloudinit.config.cc_resizefs' from
/usr/lib/python2.7/dist-packages/cloudinit/config/cc_resizefs.pyc'>) failed

This is quite annoying me, because that's the last bit which I need to
fix in order to finish my work on the Debian OpenStack cloud image
(which otherwise work quite well!). Any help would be really appreciated.

Also, I wonder, how does cloud-init do for resizing the root filesystem,
since when cloud-init start, the rootfs is already mounted read/write?
Shouldn't this happen in the initrd like with GROWPART rather than in
the boot process?

Cheers,

Thomas Goirand (zigo)



More information about the Python-apps-team mailing list