/srv/irclogs.ubuntu.com/2020/02/20/#cloud-init.txt

johnsonshiOdd_Bloke: Here are the results of my experiment (RHEL 7.7, cloud-init 19.4 daily) https://pastebin.com/QiVZAbGu00:23
johnsonshiOdd_Bloke: What seems to be happening is that cloud-init would run the swap directive first, then run the mount directive (towards the bottom of the pasted log).00:23
johnsonshiOdd_Bloke: In the docs at https://cloudinit.readthedocs.io/en/latest/topics/modules.html#mounts , with the way that the example is laid out, it seems to hint that the swap directive is run after the mount directive.00:32
johnsonshiOdd_Bloke: In the upstream code, what's happening is that the swapfile is created first at https://github.com/canonical/cloud-init/blob/87cd040ed8fe7195cbb357ed3bbf53cd2a81436c/cloudinit/config/cc_mounts.py#L465 , the swapfile is then activated at https://github.com/canonical/cloud-init/blob/87cd040ed8fe7195cbb357ed3bbf53cd2a81436c/cloudinit/config/cc_mounts.py#L511 , and finally entries in /etc/fstab are mounted at https://github.com/canonical/c00:34
johnsonshiloud-init/blob/87cd040ed8fe7195cbb357ed3bbf53cd2a81436c/cloudinit/config/cc_mounts.py#L52000:34
johnsonshihttps://github.com/canonical/c00:35
johnsonshi<johnsonshi> loud-init/blob/87cd040ed8fe7195cbb357ed3bbf53cd2a81436c/cloudinit/config/cc_mounts.py#L52000:35
johnsonshiOoops (sigh IRC formatting). and finally entries in /etc/fstab are mounted at https://github.com/canonical/cloud-init/blob/87cd040ed8fe7195cbb357ed3bbf53cd2a81436c/cloudinit/config/cc_mounts.py#L52000:35
johnsonshiOdd_Bloke: By the way for context, our team's goal is to mount the Azure ephemeral resource disk at /mnt/resource, and then afterwards, create a swapfile within the mounted ephemeral resource disk.00:37
johnsonshiOdd_Bloke: Apologies. The first pastebin was badly formatted. Here is a better one: https://pastebin.com/3cu364dD00:54
rharperjohnsonshi:  I believe you're an edge case here; the ephemeral device mount is not processed until until cloud-init runs the mount -a; however, we also attempt to create the swap , in your config you're referencing a path that doesn't exist yet (and even if we were to "mkdir -p /mnt/resource" that would *not* be on the ephemeral disk as it's not been mounted when the swap_create runs;01:19
johnsonshirharpher: Yes indeed :( The code runs swapfile creation and swapfile activation before it mounts drives.01:21
rharperjohnsonshi: what you could do is to partition the ephemeral disk into two partitions, one is the size of the swap you wanted, the second would be whatever else space you wanted mounted at /mnt/resource ;   during disk_setup, the ephemeral drive would be partitioned and mkswap would be run on the swap partition, and the fs partition would get formated with ext4 (or whatever you wanted)  then in cc_mounts, it will swapon -a (no need to create a swap01:22
rharpersince that's done via disk_setup/fs_setup; just an entry in fstab and swapon -a01:22
rharperhave you filed a bug for us yet ?01:22
rharperI can see a number of things that would need changing to support your particular goal01:22
johnsonshiNot yet. Is this a bug or is cloud-init intended to run swap-related stuff first before mount-related stuff?01:23
rharperjohnsonshi: it is a bug; but an edge case where the swap config is referencing a path that is to-be-mounted01:24
johnsonshirharper: OK I will file a bug in Launchpad. Thanks for your help!01:24
rharperthe other bug is in the swap create which does not ensure it has a path to the file (if you specify a directory that does not yet exist )01:24
rharperjohnsonshi: thanks!01:25
=== vrubiolo1 is now known as vrubiolo
otubomeena: I agree I can remove -? from the regex, but the wait it's written it work great for me.10:06
otubomeena: I mean, I can compare kernel_version <= 4.18 and it works fine, not sure I really need to make that dance with tuples and stuff10:06
meenaotubo: but, float(4.4) > float(4.18), while Version(4.4) < Version(4.18)10:30
meenaotubo: when you compare it as (4, 4) < (4, 18) — as tuples, it works.10:30
otubomeena: ohhhh you're right10:34
otubomeena: stupid me, gonna fix that10:34
meenaotubo: i'm merely relaying what i've been taught a week ago; you must've missed it10:34
=== vrubiolo1 is now known as vrubiolo
=== vrubiolo1 is now known as vrubiolo
boolmanhi guys, am I looking at this wrong, but is the network setup being done to late? http://ix.io/2ce715:54
Odd_Blokesmoser: We ran into some issues with the version tooling and new upstream releases in GitHub; I've proposed a fix here: https://github.com/canonical/cloud-init/pull/223/ and your thoughts would be much appreciated.15:57
Odd_Blokesmoser: (If you don't have time to look at this today, we may need to land it to cut the 20.1 release; later conversation would be welcome to make sure we have it right going forward.)15:58
Odd_Blokeblackboxsw: rharper: Your reviews on https://github.com/canonical/cloud-init/pull/223/ would also be appreciated, of course. :)15:58
rharperk16:00
boolmananyone? im trying to get ubuntu bionic to work with cloud-init on vmware/vsphere. And it seems like during the time of execution. the network isnt setup yet16:11
blackboxswOdd_Bloke: looks good. running through the package build stuff I normally run to vet it.16:13
Odd_Blokeboolman: Could you file a bug at the URL in the topic and attach the tarball that `cloud-init collect-logs` creates on a failing instance?16:13
blackboxswboolman that log shows it didn't detect the datasource properly. so it's probably using invalid network config16:14
blackboxsw2020-01-30 12:32:30,158 - cc_final_message.py[WARNING]: Used fallback datasource16:14
blackboxswbut yes please file a bug https://bugs.launchpad.net/cloud-init/+filebug16:14
Odd_Blokesmoser: Thanks for the review!  (And the trust. ^_^)16:50
blackboxswminor question  on 223 Odd_Bloke but otherwise +117:03
Odd_Blokeblackboxsw: Thanks; responded.17:05
blackboxswoops Odd_Bloke, glad you reminded me about that, forgot we added it last upstream cut, and didn't adjust the upstream trello template for it.17:11
rharpermeena: do you know if the free/net bsd images have util-linux available (in particular wondering if sfdisk is present) ?17:49
meenahttps://www.freshports.org/search.php?stype=name&method=match&query=until-Linux&num=10&orderby=category&orderbyupdown=asc&search=Search&format=html&effort=1&branch=head18:09
meenahttps://www.freshports.org/search.php?stype=pkg-plist&method=match&query=sfdisk&num=10&orderby=category&orderbyupdown=asc&search=Search&format=html&branch=head aaaaand, maybe18:11
rharpermeena: do the cloud images typically have that or do they use gpart ?18:12
meenaof course not18:12
rharperok, thanks18:13
meenalet's find out what you want from sfdisk, and how to do that with what we have18:14
rharperoh, working on cc_growpart changes and was wondering whether freebsd images ever end up taking the path down use of growpart (which relies on either sfdisk or sgdisk); from the code, I would expect gpart to be used on bsd; and growpart on linux;18:15
rharperhoping to confirm that18:15
meenait's easier on zfs, which is what i use18:18
meenabut, yeah, gpart resize should have you set18:30
Gonerirharper, I've some prebuilt images here https://bsd-cloud-image.org/18:32
Gonerirharper, you may find that useful18:32
rharperGoneri: thanks !19:03
Odd_Blokesmoser: master failed as expected: https://travis-ci.org/canonical/cloud-init/builds/65317409121:00
Odd_Blokerharper: blackboxsw: Could I get one of you to review https://github.com/canonical/cloud-init/pull/224 please?  (ubuntu/devel for the focal upload.)21:55
blackboxswgrabbing21:55
blackboxswcomparing against mine21:56
Odd_BlokeThanks!21:57
blackboxswOdd_Bloke: +1 are you going to build-and-push then21:59
blackboxswI think we intentionally don't merge those PRs21:59
blackboxswspecifcally:   /home/csmith/src/uss-tableflip/scripts/build-and-push  is what I was referring to22:00
Odd_BlokeI've not used that script before, let me take a look.22:09
Odd_BlokeI don't seem to have that script locally?22:10
Odd_BlokeI'll just build/push manually as I have in the past.22:11
Odd_Blokeblackboxsw: Do we have docs on how to do https://trello.com/c/5kz3z848/18-publish-to-copr-el-testing-repo ?22:13
blackboxswOdd_Bloke: only that checklist, which at the moment is broken because of our py3 switch and paride is intending to look at things after Utah py322:14
blackboxswI think we might have to block that aspect of things as run-contraner centos/7 etc won't work at the moment.22:14
Odd_Blokeblackboxsw: I don't see a checklist?22:16
Odd_Blokeblackboxsw: (And what's the problem with `run-container centos/7` ATM?)22:16
blackboxswhttps://trello.com/c/oDCHFP8W/6-publish-upstream-version-to-copr-el-testing-repository22:16
rharperOdd_Bloke: cent7 + py3 = broken build22:16
blackboxswOdd_Bloke: sorry I thought we were looking  at the same card. weird the card copy didn't contain that checklist22:17
rharperOdd_Bloke: since the py2 drop, we don't have a building cloud-init daily on cent7 as cent7 doesn't have proper py3 support22:17
Odd_BlokeRight, I'm aware of that.22:17
blackboxswOdd_Bloke: rharper right, and otubo mentioned he might be able to find us a contact in CentOS/7 space that could help us locate the correct missing python3 package deps for CentOS/7 and or 8.22:17
rharperISTR, we effectively want cent7 daily to be held at 19.4 (origin/stable-19.4)22:18
Odd_BlokeJust wasn't sure what that had to do with run-container?22:18
rharperand the fedora-build branch I proposed enables F28+ and centos8 to work on py322:18
rharperOdd_Bloke: nothing directly22:18
blackboxswOdd_Bloke: right, my magic missing checklist has those steps which rely on run-container centos/7 to build the rpm spec  file that we upload to copr22:18
Odd_BlokeOK, fair enough.22:18
Odd_Blokeblackboxsw: OK, and (hopefully) finally: https://trello.com/c/gYoMXSdz/30-bump-cloudinit-revision-to-upstreamnewversion looks to me like it's done as part of other steps now, can it be garbage collected?22:20
Odd_BlokeOr am I misunderstanding it?22:20
blackboxswOdd_Bloke: did you happen to copy over the checklist into the trello card https://trello.com/c/oDCHFP8W/6-publish-upstream-version-to-copr-el-testing-repository just now?22:20
blackboxswoooooh we have duplicate copr upload cards22:20
blackboxswone in Cutting SRU and one in pre-sru lane22:20
blackboxswand the one in pre-sru lane doesn't have the steps22:20
Odd_BlokeHaha, OK, that explains it.22:21
Odd_BlokeSo are we skipping the COPR step entirely, or am I building a SRPM and publishing it anyway?22:21
blackboxswOdd_Bloke: and yes that card on bumping upstream version needs garbage collection (and removal from template)22:21
blackboxswit was pre me writing that silly uss-tableflip/script/upstream-release  at end of last upstream22:22
blackboxswOdd_Bloke: I think we can skip and talk about that at standup tomorrow22:22
blackboxswI think it should block on us resolving our tools/run-container issue with centos/7 & 8 builds22:22
blackboxswper paride's work22:22
Odd_BlokeCool.22:24
Odd_Blokeblackboxsw: Speaking of that script, I found a few hard-coded values: https://github.com/CanonicalLtd/uss-tableflip/pull/3522:25
blackboxswOdd_Bloke: for reference as well rharper wrote up this manual build process and discussion  for el-stable and el-testing if we decide eventually to drop some of tools/run-container support https://github.com/CanonicalLtd/uss-tableflip/blob/master/doc/copr-repo-el-repos.md22:26
blackboxswbut I'm guessing  you've seen that already22:26
Odd_Blokeblackboxsw: I'll pick up those documentation/script fixes tomorrow.22:27

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