/srv/irclogs.ubuntu.com/2019/08/30/#cloud-init.txt

blackboxswrharper: volley for tomorrow https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/37189503:26
matthiasbaurHey, I try to contribute to cloud-init and been told that I have to sign a CLA. As I'm not sure if the company I working for signed one, may I talk to you in private smoser?08:58
smosermatthiasbaur: talk to powersj .12:20
matthiasbaurpowersj may I talk to you in private?12:42
ilivhey guys18:04
powersjo/18:06
ilivI have run into what probably is a well-known issue by know but new to me, which is if I use root EBS volume that is greater than 250G (e.g. >= 300G) for a Debian Jessie AMI based EC2 instance, that root EBS volume is partitioned with what seems like a default fallback option. Namely, 2 partitions: swap and 8GB root partition. As I undersatnd cloud-init is responsible for doing the partitioning. Is that correct?18:08
rharperiliv: cloud-init can do partitioning, and I believe certain platforms have some defaults; let me look at the ec2 datasource;   do you know what version of cloud-init is in your image? do you have a /var/log/cloud-init.log from the instance ?18:19
ilivCloud-init v. 0.7.718:20
ilivthis is Debian Jessie AMI18:20
rharperiliv: look at our code; couldn't init doesn't do any partitioning of the root device (by default) ; it may grow or resize a root partition and it can enable/create swap;18:22
rharperiliv: typically images will have the root partition be the last partition on the disk, so that cloud-init can grow the last partition size to end of disk adn resize the rootfs as well18:23
rharperso I wonder if the AMI partition layout is the source of the issue;18:23
ilivit's kinda weird that it grows it only if ebs root volume size is <=250G18:25
rharperhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=78400418:26
ubot5Debian bug 784004 in cloud-init "cloud-init growpart module fails to execute due to different growpart version" [Normal,Open]18:26
rharpercould be related18:26
ilivjust to be clear, when using 500G root EBS volume I get 2 partitions: 1 swap and 1 8GB root partition. the remaining disk space is simply unallocated.18:26
rharperyes, this sounds like the above bug18:27
rharperwell, maybe something else but related, so ebs size of 200G and you get the right size ?18:28
rharperin any case; the bug mentions a downlevel version of growpart in Debian Jessie which was the source of the root partition not being resized correctly18:28
rharperthere are a couple workaround mentions w.r.t including an updated version of growpart in the image18:29
iliv> so ebs size of 200G and you get the right size ? // up to 250G18:32
ilivI tested 500G, 400G, 300G, 250G and 200G18:32
ilivif it's <=250G I get a 250G ext4 root partition18:33
ilivif it's >= 300G, I get only 8GB ext4 root partition18:33
rharpercould be a new bug then; including the /var/log/cloud-init.log will be help, whether you file a downstream or an upstream bug;  if you use newer debian AMI (with newer cloud-inti) do you see the same issue ? or is it jessie only ?18:34
ilivhttps://dpaste.de/Zvbt/raw18:35
ilivI tested this with the Jessie AMI only18:36
rharperhttps://github.com/andsens/bootstrap-vz/issues/35918:37
rharperlooks like that issue18:37
rharperhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=86887518:38
ubot5Debian bug 868875 in cloud-utils "cloud-init growpart fails to grow root volumes larger than 256GiB" [Normal,Open]18:38
rharperalready filed in debian18:38
rharperand it looks related to the util-linux version in Jessie;18:38
ilivyou do all the dirty work for me :D18:39
ilivthanks, appreciate it!18:39
rharpernp18:39
iliv"No longer marked as found in versions cloud-init/0.7.7~bzr1156-1~bpo8+1."18:42
ilivdoes that mean this bug was fixed in that version of cloud-init?18:43
rharperdoubtful18:49
rharperit was a growpart issue (which cloud-init executes) and is part of the cloud-guest-utils package18:49
ilivso, nothing cloud-init can do here as long as we're stuck with this particular AMI?18:53
ilivI saw a reference to cloud-initramfs-growroot in one of the bug reports18:53
ilivnot sure if that could help18:53
ilivbut the theory goes that the growing would happen very early in the process before the filesystem is mounted18:54
ilivso on the surface sounds like an option to explore18:54
rharperyou can disable growpart via cloud-config and then perform it manually18:54
rharperhowever, if the issue is related to the tools in the OS (util-linux package) being downlevel, then you'd somehow need to get the newer version of the tools and use them instead18:54
ilivoh, I tried that but it failed18:54
rharperhttps://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/124466218:58
ubot5Launchpad bug 1244662 in util-linux (Ubuntu) "growpart reverses changes because of partx failure" [Medium,Fix released]18:58
rharperthis was fixed in newer util-linux18:58
rharperso, likely need t pull in a newer util-linux into the image and then try the growpart again manually18:58
ilivInstalled: 2.25.2-619:05
iliv"This bug was fixed in the package util-linux - 2.20.1-5.1ubuntu12"19:05
ilivhowever, that is ubuntu package19:06
rharperyes, but 2.25 is > 2.2019:07
rharperit was forwarded to upstream, I can see if we still have delta, but I suspect it was accepted upstream19:08
ilivwell, if that's the case I saw exactly the same error message as shown in that Launchpad bug report when I tried to run growpart /dev/xvda 219:10
ilivhttps://dpaste.de/NiFr/raw19:11
rharperhttps://github.com/karelzak/util-linux/commit/84ac311212c06963d616b1b9a40644842f9adabd ; landed upstream and released in 2.24,  https://lwn.net/Articles/581276/19:17
blackboxswtribaal: if you have time next week, cloud-init SRU v 19.2-24-ge7881d5c-0ubuntu1 got re-queued for Xenial/Bionic and Disco with the Exoscale fixes for cloud_config_modules which we published in tip this week to Eoan.   If you get a chance to enable <series>-proposed on an Xenial or Bionic instance you have, then you can sudo cloud-init clean --logs;  apt-get remove --purge cloud-init; apt-get install cloud-init19:50
blackboxsw#version 19.2-24 sudo reboot   to test that Exoscale comes up properly19:51
blackboxswI'll send an email about that too.19:51
blackboxswrharper: thanks on SRU, minor comments and please land https://github.com/cloud-init/ubuntu-sru/pull/36/files and https://github.com/cloud-init/ubuntu-sru/pull/35/files .   Or your could file a 3rd PR that just updates all sru-templates with the new "local" template variables20:11
blackboxswI'm adding it the the ec2 manual run I've kicked off now.20:12
rharperblackboxsw: ill check, I'll likely put up a separate PR for the template file20:25
blackboxsw+1 rharper20:33

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!