/srv/irclogs.ubuntu.com/2022/01/31/#cloud-init.txt

hffgbbbffdhow can I trigger the cloud-init service to rerun as it never ran before? I tried clean then init then restarting the service, but that doesn't seem to do it00:22
minimalhffgbbbffd: are you trying to run the whole sequence manually? or trying to reset things so the next boot is treated as 1st boot?00:30
hffgbbbffdI'm currently troubleshooting why I get pam_systemd timeouts when any sudo commands are run from scripts via the cloud-init service. They only happen when cloud-init is run from systemd, so I'd like to run the whole sequence over and over to troubleshoot the pam timeouts specifically from the service?00:32
hffgbbbffdif I do something like `cloud-init -d init && cloud-init -d modules --mode final` it will run everything my current shell session and no pam timeouts occur so I'm trying to narrow it down to something in the service00:32
hffgbbbffdminimal ^00:38
minimalI haven't used cloud-init with systemd (my systems use openrc) but basically there's *4* cloud-init scripts run in sequence, cloud-init-local, cloud-init, cloud-config, and cloud-final00:42
minimalhave you tried enabling cloud-init debugging to get more detail in the logfile?00:43
minimals/scripts/stages/00:44
hffgbbbffdI think debugging is already turned on, but when it runs the script there is just a large gap of time spent in my custom script,00:45
hffgbbbffd2022-01-29 22:43:56,585 - util.py[DEBUG]: Running command ['/var/lib/cloud/instance/scripts/part-001'] with allowed return codes [0] (shell=False, capture=False)00:45
hffgbbbffd2022-01-29 22:56:29,210 - handlers.py[DEBUG]: finish: modules-final/config-scripts-user: SUCCESS: config-scripts-user ran successfully00:45
hffgbbbffdalmost 10 minutes, now the script is filled with installation commands, but the pam logs show a timeout per command of like 25 seconds00:46
hffgbbbffdlooks like the systemd script does this00:46
hffgbbbffd[Service]00:46
hffgbbbffdType=oneshot00:46
hffgbbbffdExecStart=/usr/bin/cloud-init init00:46
hffgbbbffdRemainAfterExit=yes00:46
hffgbbbffdTimeoutSec=000:46
hffgbbbffdbasically trying to test if something like this service is missing system-login or something before cloud-init runs, cause I added another service and it can sudo just fine00:51
hffgbbbffdhence why I want to run it from scratch on demand from the service by itself, is there a way to reset the data the cloud-init binary relies on?00:52
minimala "cloud-init clean" should do that AFAIK00:54
hffgbbbffdok I reproduced it via the systemd service doing something like this01:00
hffgbbbffd rm -Rf /var/lib/cloud && cloud-init init && systemctl restart cloud-init01:00
hffgbbbffdand changing execstart=/usr/bin/cloud-init -d modules --mode final01:00
hffgbbbffdnow the hard part I guess, why would cloud-init via systemd get pam timeouts but not via my root shell01:01
minimalhffgbbbffd: something needing a terminal device somehow?01:24
=== mamercad7 is now known as mamercad
blackboxswfalcojr: sorry just merged https://github.com/canonical/cloud-init/pull/1220 to order LXD datasource at end of list for Bionic. I'll watch for your reflected PRs on other Ubunut series branches 17:56
ubottuPull 1220 in canonical/cloud-init "Move LXD to end of datasource_list" [Merged]17:56
falcojrblackboxsw: thanks I"ll get the rest of the branches up later today18:02
henkminimal: nah, don’t care enough19:03
blackboxswThanks james for the followup on schema-a-d just pushed final changes there.19:28
falcojrblackboxsw: rest of the LXD ds PRs are up20:14
=== SirScott9 is now known as SirScott
=== VoliKoN00 is now known as VoliKoN0
blackboxswfalcojr: thanks and merged.22:23
blackboxswholmanb: +1 on better deprecation handling for cloud-config schema changes. Right now we have migration support for a few different modules, but I think it's worth us defining a process by which we officially deprecate old #cloud-config schema via both log warnings and CLI tooling as you said. Added a tracking item for our ongoign schema work for us to sort by 22.04 https://warthogs.atlassian.net/browse/SC-77422:24
holmanb@blackboxsw: Thanks, sounds good to me :) 22:28

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