/srv/irclogs.ubuntu.com/2023/05/24/#cloud-init.txt

meenaevery time i try to touch cloudinit/config/schemas/schema-cloud-config-v1.json it just goes incredibly wrong00:11
meenajq is happy with it, but pytest is not00:14
meenanot even almost00:14
meenayeah, okay, I have no idea how to extend a schema09:41
meenadid you know: YAML is a superset of JSON10:05
meenabut, you can't mix JSON and YAML syntax on the same line10:05
meenaweird, huh?10:05
meenasimple PR: https://github.com/canonical/cloud-init/pull/414310:16
-ubottu:#cloud-init- Pull 4143 in canonical/cloud-init ".gitignore: extend coverage pattern" [Open]10:16
meenafalcojr: thanks for the review, that triggered some thinking, and I have some simplification in mind10:26
meenafalcojr: vastly simplified the code10:48
meenaaciba[m]: got why time for https://github.com/canonical/cloud-init/pull/2157 — the code looks good, imo, but I'm not sure how to test it. i don't see anything else testing static route… stuff12:02
-ubottu:#cloud-init- Pull 2157 in canonical/cloud-init "Added / fixed support for static routes on OpenBSD and FreeBSD" [Open]12:02
falcojrmeena: did you mean to ping me?12:42
meenafalcojr: well, yesno. aciba[m] is awake, so i pinged him13:18
meenaeither way, https://github.com/canonical/cloud-init/pull/4119 is now very much ready13:29
-ubottu:#cloud-init- Pull 4119 in canonical/cloud-init "cc_rsyslog: Refactor for better multi-platform support" [Open]13:29
greatgatsby_Hi.  I think I'm hitting a race condition on almalinux 9.2 where sshd is trying to start before the host keys have been generated.  I'm thinking of overriding cloud-final.service to have a WantedBy and Before for sshd.service?  Has anyone experienced this and can offer a better solution?14:15
meenagreatgatsby_: there's some precedent for that14:21
greatgatsby_so that's a reasonable solution?  I'm not super familiar with systemd dependencies, so I'm just hoping this will work.  14:23
meenagreatgatsby_: i suggest looking in our git history / pull requests for a similar case and see how that was handled14:29
greatgatsby_ok great, thanks14:29
greatgatsby_meena: I found this, and it mentions revno 99515:13
greatgatsby_https://github.com/canonical/cloud-init/issues/246215:13
-ubottu:#cloud-init- Issue 2462 in canonical/cloud-init "sshd can start before cloud-init injects keys" [Closed]15:13
greatgatsby_I'm not sure how to find the changes in revno (guessing revision number) 99515:14
meenayeah, no idea what that means, tbh15:19
meenagreatgatsby_: oh, this was in the before time, when cloud-init was in bazaar 15:23
greatgatsby_oh I didn't see the date, yeah, 2014.  All the comments are from 2 weeks ago so I thought it was recent.15:26
* meena isn't at the computer rn, and GitHub isn't as good as tig, sometimes15:26
minimalgreatgatsby: Issues were moved from Launchpad to Github 2 weeks ago15:32
greatgatsby_just an update on some testing, I had thought this was the set-passwords module prematurely trying to start sshd, but I disabled that module and the problem persists.  16:51
blackboxswgreatgatsby_:  the commit that introduced this was the cloud-init.service not cloud-init.final https://github.com/canonical/cloud-init/commit/31621d585d183e09b3d857ef2a16bfb699b3a591 the question I have is what version of cloud-init is in your images, as this functionality was introduced in 2014.16:57
-ubottu:#cloud-init- Commit 31621d5 in canonical/cloud-init "run before sshd-keygen.service"16:57
blackboxswsystemd-analyze critical-chain ssh.service should tell you what ssh.service actually waits on.16:58
blackboxswand cloud-init.service should be in that list of things that block ssh.service.16:58
greatgatsby_blackboxsw: thanks for the help.  It's 22.1 iirc.  I can see cloud-init start first, but then sshd tries to start shortly after and fails due to missing host keys.  This is the alma 9.2 qcow2 cloud image.17:01
greatgatsby_I do have those Wants/Before as you posted.  Correct me if I'm wrong, but the sshd-keygen.service doesn't even run if cloud-init is enabled due to another override, and it's cloud-init itself that generates the keys17:02
greatgatsby_due to this sshd-keygen drop-in:  ConditionPathExists=!/run/systemd/generator.early/multi-user.target.wants/cloud-init.target17:06
greatgatsby_so if cloud-init is enabled, sshd-keygen doesn't generate the keys, cloud-init does, and at some point after the first cloud-init service starts, sshd tries to start, but cloud-init hasn't created the keys yet (it just uses the ssh-keygen command iirc)17:07
greatgatsby_again, thanks for the help, this is just as I understand it17:12
greatgatsby_blackboxsw: I used systemd-analyze (thanks for that) and sshd.service is starting 105ms after cloud-init.service17:23
blackboxswfalcojr: upstream snapshot for 23.1 is merged. Do you want to do the honors for the dput to ubuntu with your new per package upload rights for Ubuntu/cloud-init?18:11
falcojrheh, sure18:17
falcojrblackboxsw: since you already checked the sbuild, there's no need for me to that right?18:17
blackboxswfalcojr: right, I ran it through all of it. just wondered if we can test out your new upload powers18:32
blackboxsw..want to make sure permissions are all setup for that and we don't find some blocker to upload rights18:33
falcojrblackboxsw: currently getting gpg errors from build-package and trying to figure out why18:33
blackboxswfalcojr: that's because top-most changelog entry is signed by alberto.... so build-package would try to sign with his key by default, which you don't have.   You'll need to export GPGKEY=<your_rsa_pubkey> to debuild would use that key instead of trying to find alberto's18:36
blackboxsw`gpg --list-keys` will give that to you18:36
blackboxswincidentally I also have set DEBFULLNAME='Chad Smith' and  DEBEMAIL=chad.smith@canonical.com which I believe also affect deb utilities18:37
falcojryeah...I have all of those things alreadfy18:37
dbungertfalcojr: are you doing a --sign-key=key-id when building the source package to point to your key id?19:01
falcojrdbungert: thanks...that particular flag also doesn't seem to work for me, but I was able to separately pass "-us -uc" to debuild followed up by a debsign, and that seemed to work19:03
falcojrblackboxsw helped me figure out the difference in our configs. He had "DEBSIGN_KEYID=<key>" in his ~/.devscripts so thats why he didn't need additional arguments19:16
SaludosHola a todos / Hi everybody21:38
SaludosAlguien sabe como correr un script cloud-init (yaml) pero en una maquina que ya esta en ejecucion? a modo de probarlo?21:39
meenaSaludos: replying in English, if that's okay:21:41
SaludosYes21:41
SaludosDoes anyone know how to run a cloud-init (yaml) script but on a machine that is already running? how to test it?21:41
meenaSaludos: you can run cloud-init on a system, but it won't fully simulate what cloud-init would do21:42
meenabecause things are different during boot21:42
Saludosooh, ok21:42
SaludosI thought that if it could21:43
Saludosi ran this21:44
Saludoscloud-init schema --config-file a.yaml21:44
Saludosthe result is valid21:44
Saludosroot@mando:/home/usuario# cloud-init schema --config-file a.yaml21:45
SaludosValid cloud-config: a.yaml21:45
meenathat's a good start21:45
Saludosbut dont works21:45
meenaI don't know if you can invoke cloud-init with a config it didn't fetch from the dedicated data source. unless that data source is already mounted21:47
SaludosThanks21:54
blackboxswSaludos: using lxd/lxc let's you quickly iterate and test #cloud-config by launching new instances with whatever your user-data is https://cloudinit.readthedocs.io/en/latest/tutorial/lxd.html22:29
Saludosthanks22:30
blackboxswwe typically do that locally when testing out new #cloud-config on our laptops as we are developing new features22:30
* meena doesn't do that yet, because she'll have to port lxd-agent to FreeBSD22:31
blackboxsw:) meena I can't wait for that action/support when it comes22:31
blackboxswit'll really ease integration tests for BSD22:31
meenaI'm not sure i knew what i was signing up for, when getting on this project22:32
meenaSo far i have touched every corner of FreeBSD, and every corner of cloud-init few now lxd, I may have to look at wa Linux agent, and i will definitely have to get into building better FreeBSD images22:34
meenamaybe i should try to do something really hard next, because every time in the past months I took on something i thought was gonna be easy, it turned out i was wrong22:38
blackboxswSaludos: if lxd won't work for you, you could also use QEMU https://cloudinit.readthedocs.io/en/latest/tutorial/qemu.html22:44
blackboxswmeena: yeah maybe rewrite the kernel next.. it may only take a week22:46
meenablackboxsw: i do have some kernel work planned, but: it's unrelated to this project22:48

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