/srv/irclogs.ubuntu.com/2020/09/24/#cloud-init.txt

meenaebal[m]: i have to look at that code  again, because i don't remember if we correctly handle the complete failure of fallocate07:17
meena    else:07:25
meena        try:07:25
meena            create_swap(fname, size, "fallocate")07:25
meena        except subp.ProcessExecutionError as e:07:25
meena            LOG.warning(errmsg, fname, size, "dd", e)07:25
meena            LOG.warning("Will attempt with dd.")07:25
meena            create_swap(fname, size, "dd")07:25
meenait should fallback to dd07:25
ebal[m]meena:09:14
ebal[m] * meena: do you feel this is a bug ?09:14
meenaebal[m]: sooo, somebody was saying this is a bug in Linux… which, i guess we can agree on, buuuuuutttt, we have enough workarounds for other software's bugs, so, i dunno…09:17
meenaebal[m]: is this ⬆️the code you have too on your system?09:18
* ebal[m] sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/aJtMUKQOJyBmujmecvNJECUy/message.txt >09:21
meenaso, the code looks the same, and it should fallback to `dd`09:22
meenaebal[m]: can you post again the log?09:26
ebal[m]<meena "ebal: can you post again the log"> https://pastebin.com/Wu7cdBCC09:27
meenaso, Unexpected error is not subp.ProcessExecutionError09:29
meenahttps://github.com/canonical/cloud-init/blob/master/cloudinit/subp.py#L82 ← at the end it throws IOError09:37
meenaoh, that's from ProcessExecutionError09:37
otuboCan't believe I missed the first day! My mind really tricked me that it would be today and tomorrow. AHHH11:38
otubolucasmoura: Good to see more BR joining the project! :-) Bem vindo!11:39
otuboI'm recaping the slides from yesterday, looks like I need to bother rick_h now instead of Odd_Bloke :-)11:40
otuboOh just saw the emails correcting the dates, so I'm no completely crazy, not yet.11:42
lucasmourathanks otubo :)12:44
rick_hotubo:  apologies, they're all updated now12:58
anankehmm, trying to wedge repo key on debian is becoming a challenge. I can't simply drop a gpg key in /etc/apt/trusted.gpg.d/, because those need to be in a keyring format12:58
anankethe proper format can be obtained by piping the gpg key via 'apt-key add', but that fails on lack of gnupg12:59
rick_hotubo:  there were a couple of questions to the community for input, especially on commit-bits and new user ramp up that if you get time to think about would be great to get your input.13:00
rick_hyou can see where we got in the running open notes document link13:00
otuborick_h: I'll definitely check on that! I believe I already got access to all docs listed on the post.13:01
rick_hok cool13:06
anankehah, I may have to resort to using AllowUnauthenticated13:17
Odd_Blokeananke: What version of apt are you using?  Even oldstable should support ASCII-armored keys in /etc/apt/trusted.gpg.d/, per https://manpages.debian.org/testing/apt/apt-key.8.en.html#SUPPORTED_KEYRING_FILES13:31
Odd_Blokemeena: ebal[m]: So I don't think that we should be working around what should be a short-term kernel bug in a permanent way in cloud-init, but there _is_ a bug: `create_swap` (the function defined within `create_swapfile`) catches ProcessExecutionError but doesn't re-raise it.  This means that the `create_swap(fname, size, "fallocate")` call will never raise a ProcessExceptionError and so we will never13:37
Odd_Blokefallback from failed fallocate swap creation to dd swap creation.13:37
ebal[m]<Odd_Bloke "meena: ebal: So I don't think th"> Do you need me to file a proper bug report for this ?13:38
Odd_Blokeebal[m]: Yes, please!13:40
ebal[m]I also was thinking if it is of value something like this (just a draft - I am sure this does not work) regarding the swap method13:41
ebal[m]https://github.com/ebal/cloud-init/commit/58f1819a2c8b880a325ddce9119032d38a0f160313:41
anankeOdd_Bloke: I'm doing this on Debian 10.5 AMI, so I imagine it's fairly up to date13:45
ebal[m].... so .... to file a bug , should canonical hire me first ?  what's up with this ubuntu one account ? do I need to pledge my loyally to Mark as my lord and savior ?13:45
anankeOdd_Bloke: the gpg key I have is in ' PGP public key block Public-Key (old)' format, while the existing keys in trusted.gpg.d are in 'PGP/GPG key public ring (v4) created Sun Apr 14 07:48:55 2019 RSA (Encrypt or Sign) 4096 bits MPI=0xb15c6294ca2e5d16'13:47
anankebut I may need to try that gpg --armor --export format13:49
Odd_Blokeananke: Yeah, I would _expect_ exporting like that to work.14:00
Odd_Blokeebal[m]: Not to sign up for an Ubuntu One account; there is a CLA you'd need to sign to contribute code, if that would be a blocker for you.14:00
ebal[m]it's too late now, all my personal data belongs to canonical !14:01
Odd_Blokeebal[m]: In terms of that proposed change, I think we need to think about that interface a little more: as that patch is currently written, specifying "fallocate" would mean "fallocate unless it fails then dd" whereas "dd" would just mean "dd".14:02
anankeOdd_Bloke: so after testing it, it appears that this won't work, and I'm now guessing that apt-key's manual refers to _input_ files when adding new keys via apt-key14:09
ebal[m]Done, hopefully provides all the necessary info to everybody14:13
ebal[m]https://bugs.launchpad.net/cloud-init/+bug/189709914:13
ebal[m]thanks14:13
ubot5Ubuntu bug 1897099 in cloud-init "create_swap do not fallback to dd when fallocate fails" [Undecided,New]14:13
ebal[m]<Odd_Bloke "ebal: In terms of that proposed "> I totally agree with you on that, this was written at around 01.30 in the night - just a rough idea to get some initial feedback - if it make sense. It does for me to have an option to use the swap method - but it may not be important or useful for anybody else.  So instead of spending time there - I could spend time to work on a workaround for personal use.14:16
anankeargh, so for the gpg file to be valid in /etc/apt/trusted.gpg.d/, you have to do something like:14:23
anankewget -q -O - https://deb.parrotsec.org/parrot/misc/parrotsec.gpg | gpg --no-default-keyring --keyring ./tempfile.gpg --import14:23
anankegpg --no-default-keyring --keyring ./tempfile.gpg --export > valid_keybox_file.gpg14:24
anankethe problem is, the resulting file is a binary14:24
anankeahh, write_files supports base64! I may do it that way then14:25
Odd_Blokeananke: Aha, that makes sense; apologies for the misdirection!14:32
Odd_BlokeYeah, base64 is probably the way to go.14:32
anankeno worries. It's a bit big, close to 10k after base64 encoding, but we'll see if that works14:38
ananke9665 bytes base64 encoded, 9457 bytes gzipped + base6414:39
anankewell I'll be damned, this is also not possible:  ==> amazon-ebs: Error creating launch template for spot instance: InvalidUserData.Malformed: User data is limited to 16384 bytes.15:02
=== tds9 is now known as tds
anankegoing to trim my cloud-init yaml as much as possible, see if I can fit under that limit15:08
otuboebal[m]: Odd_Bloke  Does raising an exception from inside create_swap() make sense? https://pastebin.com/2Qv4Npwe15:21
otuboOdd_Bloke: just saw your PR which is basically the same thing but better.15:48
Odd_Blokeotubo: Yep, apologies, was "just" testing it before I dropped the link here (and then I went into a meeting), hope you didn't duplicate too much work!15:49
otuboOdd_Bloke: nah :)15:49
blackboxswcommunity notice: hey folks "day 2" of cloud-init virtual summit is today in +30 mins. If you are interested in participating, feel free to drop in for any time you have available https://meet.google.com/rup-mbis-kyr16:31
blackboxswvirtual cloud-init summit detailed schedule/intent is here: https://discourse.ubuntu.com/t/cloud-init-online-summit-sept-23-24/1786716:32
blackboxswcommunity notice: Just about to kick off day 2 virtual cloud-init summit: https://meet.google.com/rup-mbis-kyr  see you there17:01
=== ijohnson is now known as ijohnson|lunch
smoserfalcojr: this is probably a personal rant. but personally, 'client.exec("your command here")' is way inferior to client.exec("your", "command", "here")17:30
smoserin that you forced shell escaping on the user (and you have not identified what the shell is or should be)17:30
=== ijohnson|lunch is now known as ijohnson
meenaOdd_Bloke: oy. from reading the code i didn't catch that (ha ha ha)17:52
Odd_Blokemeena: I was happy to raise it, I won't take exception.17:53
Odd_Blokemeena: Do you happen to know if netifaces works on BSD?17:54
meenagimme a sec17:55
Odd_BlokeIt works on OS X, that's basically the same thing, right?17:56
meenaOdd_Bloke: meena@fbsd12-1 /u/h/meena> pkg search netifaces17:56
meenapy27-netifaces-0.10.9          Getting network addresses from Python 317:56
meenapy37-netifaces-0.10.9          Getting network addresses from Python 317:56
meenasoon to be only py37- ;)17:56
Odd_BlokeWell that's an encouraging sign, at least.17:56
meenalemme boot up netbsd or openbsd17:57
Odd_Blokerharper: Have you looked at netifaces at all?  If so, do you know how it compares/relates to cloudinit.net?17:58
meenaor, i could look here: https://pkgsrc.se/search.php?so=netifaces17:58
meenablackboxsw: what's the libpcap library we looked into?18:00
rharperOdd_Bloke: yeah, i've used in the past; and originally wrote the net layer in that; but we wanted to avoid the depedency18:00
blackboxswmeena: https://github.com/vmware/cloud-init-vmware-guestinfo   which uses python3-netifaces18:01
rharperand generally, the output shown doesn't show us anything we can't already discover in the net layer now;18:01
blackboxswso Andrew Kutz is looking at how best to upstream that new datasource and discovery mechanisms18:01
meenablackboxsw: i meant scapy18:03
meenai did look into netifaces previously, btw… for… something18:03
meenalibioc18:03
akutzHi all!18:22
smosero/18:22
smoservery happy to have a vmware representative here.18:22
smoserso , wrt cloud-init-vmware-guestinfo18:23
smoseri think it fits fine as a local datasource.18:23
smoserthe datasource declared (in network config format) that "you should dhcp on all the things".18:24
smosercloud-init should do that as it does ephemeral network on other providers.18:24
smoserthen read the data that is there18:24
smoserand declare that that was the metadata config.18:24
smosererr... declare that that was the network config.18:25
smoserthe only difference from what you have, is that you are calling the network data that is in your 'metadata.yaml' file network config.18:25
smoserit is not. it is pre-network config.18:25
otuboakutz: also, how are the plans to merge it into cloud-init main tree?18:27
akutz@otubo - Um, I do not know. That is why I am here, to ask y'all :)18:28
akutz@smoser - re: pre-network config -- interesting. Did I misunderstand https://cloudinit.readthedocs.io/en/latest/topics/network-config.html?18:30
smoserakutz: you did not misunderstand.18:30
smoserthere is no such thing, really.18:30
otuboakutz: I'm very interested in having that on RHEL :) Since the current OVF DataSource is kinda bogus, changing the instance-id and stuff18:31
smoserbut i'm saying that what you are providing is *not* network config.18:31
smoserbut that cloud-init needs to utilize the information you are providing to tell it how to get the network config.18:31
smoserand then when it has it, it would exit local datasource, let the OS bring up the networking, and move on.18:31
akutzHmm, but the cloud-init docs explicitly refer to what is being provided as the network configuration...18:32
akutzIt's the intended config, and it brings up the actual network, with the observed config. But that's more of an issue with the way the cloud-init docs are written IMO.18:32
smoseralternatively... i dont see any problem with providing current network information through the same general mechanism as instance-data is being provided.18:32
blackboxswcommunity notice: reconvening for live community discussion for  virtual cloud-init summit: https://meet.google.com/rup-mbis-kyr18:34
anankethis is very peculiar. enabling an additional apt-repo via cloud-init causes apt to fail to resolve DNS entries. it does not make sense at all19:24
blackboxswhrm, depends on what deb package is being installed? Something upgrading network utils?19:25
anankeahh, wonder if it has something to do with resolvconf19:29
anankegood idea, thank you19:30
anankelooking at cloud-init-output.log it appears that the 'update' ran just fine, but then 'upgrade' module is what starts to fail19:31
blackboxswThanks folks for the attendance on cloud-init virtual summit. we are dropping into separate hacking/discussion channels for the remainder. We'll post links to available google meet breakout sessions if interested19:34
akutzI am taking a bio break and will look for the link to the break out for vSphere cloud-init19:35
falcojrakutz: I'll post the link soon...also taking a short break19:35
blackboxswtopic 1: (bug discussions, primary AWS support regions without IMDSv2 support https://bugs.launchpad.net/cloud-init/+bug/1896532):  meet room: vhttps://meet.google.com/zqb-tewn-qpx19:35
ubot5Ubuntu bug 1896532 in cloud-init "Ec2Datasource fails in environments without IMDSv2" [Undecided,New]19:35
blackboxsw topic2: was I believe ongoing network refactor discussion https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#ongoing-refactors19:37
akutzfalcojr: ack19:37
falcojrvSphere discussion: https://meet.google.com/acr-vrnr-rab19:40
anankeyep, /etc/resolv.conf was being obliterated, due to apt-get --upgrade's pulling of resolv.conf20:33
anankeI mean pulling of resolvconf20:34
Odd_Blokerharper: I just put a bottle of the 2017 release of https://www.beeradvocate.com/beer/profile/32763/322625/ in the fridge, so I'm at least replicating part of the in-person summit experience we'd have had. :p21:05
rharperoooo21:08
rharperOdd_Bloke: nice!21:09
meenamock me, why don't you https://github.com/canonical-web-and-design/cloud-init.io/pull/145#issuecomment-69853841621:39
blackboxswhaha "not yet" :) just you wait webteam-app I'll show you who is a collaborator21:45
blackboxswwill ping the internal web team tomorrow if they have questions on the PR meena thanks for filing21:47

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