/srv/irclogs.ubuntu.com/2021/01/26/#cloud-init.txt

=== cpaelzer__ is now known as cpaelzer
qbdhello Odd_Bloke, just some feedback here that removing the 'groups' for that borg user worked and I can now login09:12
qbdwhat would be the recommended way to assemble a two disk mdadm raid0 array using cloud-init ?09:18
krylHi, is it possible to have "conflict" between cloud.conf and configs in cloud.cfg.d/* files ?12:14
krylI want to debug what's happening? I put files in this directory but I didn't get any actions.12:14
meenakryl: if there was a conflict, you should have gotten an error12:40
krylmeena, I hope, but where :-p It will be cool to "debug" cloud-init files before to launch them in a blind server without KVM.13:01
krylis there a module to setup "locales" in debian/ubuntu systems ?13:16
krylor a place where I can find existing modules ?13:16
=== hjensas is now known as hjensas|afk
Odd_Blokekryl: Check out https://cloudinit.readthedocs.io/en/latest/topics/modules.html14:21
Odd_Bloke(More specifically: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#locale)14:22
=== vrubiolo1 is now known as vrubiolo
=== seednode0918 is now known as seednode
Odd_Blokesmoser: Thoughts on https://bugs.launchpad.net/cloud-utils/+bug/1912904?15:59
ubot5Ubuntu bug 1912904 in cloud-utils "cloud-localds option to add SSH public key" [Undecided,New]15:59
Odd_BlokeSeems like a reasonable addition to me, but I'm not familiar with how cloud-localds is used (or if we already have a way of doing this).16:00
Krikkethere's an option to add ssh keys in the user config16:12
Krikkeusers.ssh_authorized_keys16:12
Krikkethough I'm using terraform to include the file16:13
Krikkehttps://github.com/ixevix/bootstrap-vm-terraform-libvirt16:14
krylI can setup locale module in cloud_config_modules section in cloud.cfg, but what about adding locale: ar_AE as an example. Do I need to write that in cloud.cfg.d/xxx.cfg ? or I can add them in cloud.cfg directly (before or after cloud_config_module section ?)16:25
krylOdd_Bloke, I saw it but it's not so clear. And what about UTF8 ?16:26
minimalOdd_Bloke: its writing a complete user-data file so only really of use to people to already creating their own user-data with more contents. I'd expect the majority of people using an ISO for cloud-init would be specifying more things in their user-data16:27
minimals/people to already/people not already/16:27
krylI'm wondering what's the best option to run "ansible" local playbooks. I saw there is something for chef, puppet, saltstack ... but nothing for ansible actually.16:27
Odd_Blokeminimal: So I do think there's a set of people who want to debug An Image, but have never heard of cloud-init; they want a way to backdoor it, and nothing more.16:41
Odd_BlokeSome of those folks will have figured something out, but others will have been put off by the variety of tools required to just get in.16:44
Odd_BlokeTo be clear, I'm not saying we therefore must include something to cater to them, but I think that's a use-case that we could serve better.16:45
minimalin the case of that script it'll mean that that defaults will be used for various c-i modules, and (I assume) fallback to DHCP for network as no network YAML specified. No sure what the end result of the various modules' default setting would be.16:49
minimali.e. is the result unsafe (is the default account password-less and accessible via SSH? etc)16:50
Odd_BlokeHmm, so one consequence that I've noticed of releasing a hotfix upstream release is that the versions produced by our Ubuntu daily builds now sort _lower_ than the versions in the archive.  The 20.4.1 tag isn't in the main branch's history (because it's on a forked branch with only the fix on top of 20.4), so the most recent tag is 20.4.  (And 20.4 < 20.4.1.)17:45
Odd_BlokeI have some thoughts on how to address this: add an epoch to all of the recipe builds, so this will never be an issue again; or, temporarily prefix the recipe versions with something which will sort them above 20.4.1 which we can drop once 21.1 is out; or, add a tag like "20.4.2-not-really" to HEAD.18:01
Odd_Bloke(I don't like that last one.)18:01
Odd_BlokeI've also realised that this means that we presently have an upgrade issue to the devel release: as 20.4.1 > 20.4, the 20.4 snapshot in hirsute will not be upgraded to.18:02
Odd_Bloke(We'll release and upload 21.1 before hirsute releases, so this won't be an issue by release time/FF.)18:03
blackboxswOdd_Bloke: So I'm wondering as well in the future we we actually don't bump the 20.4.X revision but instead just bump ~18.04.218:04
blackboxswthat way the extra releases into ubuntu/xenial|bionic|etc don't actually cause concern versus the upstream daily recipe builder18:04
Odd_Blokeblackboxsw: I think we want it to be very clear that the Ubuntu stable releases have a bugfix that was important enough to merit an upstream hotfix release.18:05
=== ijohnson is now known as ijohnson|lunch
powersjthen why not call it 21.1 or 20.518:05
powersjwhen we choose semantic-like versioning we said the .x, x would increment as we did releases. I'd need to look, but I don't think we talked much about doing patch versions18:06
blackboxswIn this case we didn't go through an official upstream release in master, just hotfix releases direct to the ubuntu/<series> branches18:06
powersjah18:07
Odd_Blokepowersj: I think we'd have this same problem: the 21.1 or 20.5 tags would still not be in history.18:07
blackboxswso daily build recipes wouldn't "see" that release tags18:07
powersjyeah18:07
blackboxsw... on master18:07
Odd_BlokeAnd 20.4.1 _is_ an official upstream release, but it was a cherry-pick directly on top of 20.4 to minimise the delta to the one required by the fix.18:08
Odd_Bloke(If this had been Ubuntu-only, we'd have cherry-pick'd into the release branches and this would be a non-issue.)18:08
blackboxswright... I'm not quite sure what to do in this particular case. I'm trying to wrap my head around the epoch suggestion to walk through version matrix fallout.18:10
blackboxswOdd_Bloke: and at the moment new-upstream-snapshot releases into hirsute will still be something like 20.4-71-ga9c904dc-0ubuntu1 so we'd have to change our tooling too18:12
blackboxswright?18:12
blackboxswbecause we need hirsute releases to be 20.4.1-71......18:12
rick_hIs this an issue because once we cut a release we've not revved to the next release? For instance, once 20.4 was cut daily should have been a pre-release of 21.1? 21.1-alphaX maybe?18:13
krylPlease how to use metadata variables (from ec2) I can get them well listed with cloud-init query ds.... but I want to use them to setup my hostname :-) I tryied with runcmd and {{ varName }} but it doesn't work ! I put this config in cloud.cfg.d directory18:26
krylit looks simple but I don't understand why to use an external script who will parse again the metadata url ?18:26
blackboxswCorrect me please Odd_Bloke: this is an issue because we hotfixed a release (20.4 + a single cherrypick) as 20.4.1 directly into ubuntu/<release> branches. Master never saw this upstream release tag 20.4.1 because the commit that we added to master to revert happened along with a bunch of other commits so tagging that "release 20.4.1" would not be representative in master of what was hotfixed into18:32
blackboxswubuntu/<release>18:32
blackboxswkryl: you'll need to provide a ## template: jinja line at the beginning of the #cloud-config that you provide to declare your cloud-config userdata as a template that needs var substitution.18:39
krylbefore or after #cloud-config ?18:40
blackboxswkryl: you can check on your booted system `sudo cloud-init query userdata` to see if the first line has that header  Example here https://cloudinit.readthedocs.io/en/latest/topics/instancedata.html#using-instance-data18:40
krylI don't provide them as global config it's just additionals files in cloud.cfg.d directory18:40
blackboxswkryl: ahh hrm checking that approach18:41
krylone more question this module: https://cloudinit.readthedocs.io/en/latest/topics/modules.html#resolv-conf won't work for debian sys in any way ?18:42
blackboxswI'm not certain if we handle jinja template processing of separate cloud.cfg.d files but I'm checking now.18:42
krylalright18:42
blackboxswkryl: what's your file content in /etc/cloud/cloud.cfg.d/<custom>.cfg18:43
blackboxswif you can share some of it18:43
blackboxswhttps://paste.ubuntu.com is a good sharing tool if needed18:44
=== ijohnson|lunch is now known as ijohnson
krylsomething like that : https://paste.ubuntu.com/p/jvdwt9KM4Q/18:52
kryland preserve_hostname must be at false.. but it's not the pb here.18:52
blackboxswkryl: I'm still checking about inability to provide ## template: jinja in cloud.cfg.d custom config files. But minimally you could provide an /etc/cloud/cloud.cfg.d/99-myname.cfg like the following: https://paste.ubuntu.com/p/vVsPyM5X5Q/18:53
blackboxswgenerally ## template: jinja has to be before #cloud-config18:54
krylgot it for usage of cloud-init app18:55
krylthank you18:55
blackboxswkryl: would you please file a short bug/feature request for supporting jinja templates in /etc/cloud/cloud.cfg.d files? I think that would be a useful feature. : https://bugs.launchpad.net/cloud-init/+filebug.18:59
krylok I'll do that tomorrow19:00
blackboxswkryl: also if your images provide any config directives on disk (like runcmd) note that any user specifying their own runcmd in #cloud-config at launch time will drop any config options on disk19:00
blackboxswthanks kryl19:00
blackboxswwill override the config you provided on disk and prefer the runcmd that the admin launching the VM provided instead.19:00
krylany idea what about resolv_conf module ?19:03
krylI'm wondering if it will apply on debian sys because in the documentation it seems to be dedicated to other OS19:03
Odd_Blokeblackboxsw: rick_h: So for our daily build versioning, we don't do "next release minus", we do "last release plus"; this is easier to do in LP recipe builds (because it can use git tags to determine "last release"; there's no canonical source of "next release" available there).19:21
blackboxswkryl: in the docs generally we don't recommend using this module on Debian as network configuration should really be handled /etc/network/interfaces configuration which is handled properly by systemd-resolved services on the system. So, I believe that config module is disallowed on debian/ubuntu to allow the network and DNS rendering backplane to render the right config from a single source of truth.19:22
Odd_BlokeSo yeah, the problem is that "20.4 plus" sorts lower than "20.4.1".19:22
krylblackboxsw,ok thank you for your search19:23
Odd_BlokeBut to get recipes to build with "pre-release" versioning, I think we'd have to manually modify the recipes after each release, rather than them just rolling forward automatically with no intervention.19:24
blackboxswkryl: I say that with too many words and I might be incorrect. but generally I think there are enough networking edge-cases on Debian and Ubuntu with using cc_resolve_conf that using the primary network config files /etc/network/interfaces or /etc/netplan/* (or metadata services providing network_confing) are the preferred mechanism to describe such DNS config19:24
blackboxswkryl: np19:24
krylIT's for a special use case, I have to prevent dhcpclient (used from ENI / debian) to change the file resolv.conf... :-) and ideally fix it manually, maybe with cloud-init19:25
Odd_Blokeblackboxsw: There's an upstream/20.4.1 branch: https://github.com/canonical/cloud-init/tree/upstream/20.4.119:27
Odd_BlokePerhaps we should just merge that back into master?19:27
Odd_BlokeA quick test indicates that would solve the problem: https://paste.ubuntu.com/p/5CBN49kPjw/19:30
Odd_Bloke(And that is what you do with hotfix branches in gitflow, at least.)19:32
krylI have to leave, GL for next steps ;)19:33
blackboxswOdd_Bloke: confirmed. I think merging your upstream/20.4.1 will bump our version in master above 20.4 based and it'll pull in that annotated tag that'll get our `git describe` reporting properly19:43
blackboxswonly interesting caveat with that is that our git descr offset will not really be comparable in master vs ubuntu/X|B|F series really19:44
blackboxswlet me rethink that last statement of mine as I don't think that is actually true...19:45
Odd_BlokeOnly until 21.1, then everything will be realigned, I think.19:45
blackboxswOdd_Bloke: +1 on that. once 21.1 annotated upstream tag is cut in master all alignment of git describe commit offsets from a given signed tag will be properly aligned. I'm checking ubuntu/xenial's git desc vs master and also what happens with next new-upstream-snapshot19:46
blackboxswOdd_Bloke: ok, so +1 on git merge origin/upstream/20.4.1 into master. I'd like us to augment that commit message though with the reason for why we now have the merge marker ,accounting for the hotfix release that needed to by sync-d "up" into master. Does that make sense?19:52
blackboxswbecause I know future-me isn't going to remember why specifically we approached this in master "next time"19:53
blackboxswOdd_Bloke: it might also be worth us noting "hotfix" procedure in https://github.com/canonical/uss-tableflip/blob/master/doc/ubuntu_release_process.md or https://github.com/canonical/uss-tableflip/blob/master/doc/upstream_release_process.md19:54
blackboxswOdd_Bloke: one issue is that git describe on ubuntu/xenial is currently 20.4.1-426-gb889283c which will still sort higher than master at 20.4.1-72-g28cb7f03  right?19:56
blackboxswI presume though, that our daily build recipe will actually just bump the base version 20.4 to 20.4.1 for all ubuntu releases. So maybe this is a non-issue https://code.launchpad.net/~cloud-init-dev/+archive/ubuntu/daily19:57
blackboxswbecause daily recipes are still building {latest-tag}  which will change/increment from 20.4 -> 20.4.1 for all builds19:58
Odd_Blokeblackboxsw: The version we need to care about isn't the one that `git describe` in ubuntu/xenial produces, but the version in xenial itself (which is the version in debian/changelog in ubuntu/xenial: 20.4.1-0ubuntu1~16.04.1).20:01
rick_hOdd_Bloke:  looking at the CLA process, do you recall what's meant by the "Please add the Canonical Project Manager or contact"? Is that meant for the group signings using the same form vs individual contributor?20:05
rick_hoh lol it's in the doc, nvm20:06
blackboxswblackboxsw: +1. Ok you are right  daily recipes to construct their own deb versioning based in {latest-tag}-{revno} sort of like `git describe` behavior (though through launchpad build recipes. So `git describe` not used for daily PPA builds. And for our real releases, right we rely on debian/changelog solely for that published version. new-upstream-snapshot creates that debian/changelog version.20:09
blackboxswOdd_Bloke: ^ oops. I'm talking to myself again20:09
blackboxswso as long as we are cognizant of new-upstream-snapshot release on next xenial/bionic/etc upload we need to make sure we are still dropping the <patchrev> version from 21.1.<patchrev> during that upload if new-upstream-snapshot isn't smart enough on that front20:10
=== hjensas|afk is now known as hjensas
Odd_BlokeOK, so unless someone objects before tomorrow, I'm going to get Rick to lift the squash-only requirement on the cloud-init repo for long enough for us to merge the upstream/20.4.1 branch into master.  It has to be a _merge_ (rather than a squash) to get the 20.4.1 tag into master's history, which fixes `git describe` (and by extension Ubuntu daily builds).  (It also represents what happened: we briefly21:56
Odd_Blokeforked cloud-init for a release; that fork has now been reintegrated into master.)21:56

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