[06:16] <amansi26> Hi.. can anyone tell me what difference does it make if cloud init status returning running and cloud init status returning done?
[08:51] <meena> cloud-init is a oneshot service. so if you're asking systemd for a status while it's actively doing stuff, it'll say running, otherwise, done
[08:53] <amansi26> meena: For rhel and sles when I install cloud-init package, the status shows done (by default) but for ubuntu it is showing disabled (by-default)
[08:54] <meena> amansi26: you probably have to enable it in /etc/default/cloud*
[08:55] <meena> i say, not having used cloud-init on Linux in almost two years
[08:56] <meena> on *BSD we have /etc/rc.conf for the same purposes, but no one has even looked at my patch! https://github.com/canonical/cloud-init/pull/161
[16:42] <amansi26> When we install cloud-init on a system. What ll be the default value for cloud-init status?
[16:48] <amansi26> How to change cloud-init status from running to done?
[16:56] <blackboxsw> amansi26: status starts as 'not run'
[16:57] <amansi26> But in my case it is coming as disabled
[17:00] <blackboxsw> It expects to see all cloudinit stages completing in /run/cloud-init/satus.json
[17:00] <blackboxsw> https://github.com/canonical/cloud-init/blob/master/cloudinit/cmd/status.py#L101
[17:00] <blackboxsw> And if disabled itll report that
[17:00] <blackboxsw> https://github.com/canonical/cloud-init/blob/master/cloudinit/cmd/status.py#L73
[17:02] <blackboxsw> amansi26: running cloud-init status --long  will tell you why disabled
[17:08] <amansi26> blackboxsw: It says "Cloud-init disabled by cloud-init-generator" . But then I checked for /etc/cloud/cloud-init.disabled (it doesnot exists) and /proc/cmdline (doesnot contain cloud-init=disabled)
[17:29] <blackboxsw> amansi26: so this is a fresh pkg install, cloudinits generator hasn't run yet to create init files which will run cloudinit on next boot.
[17:29] <blackboxsw> Genet
[17:30] <blackboxsw> Generator is at /lib/systemd/system-generaties
[17:31] <blackboxsw> Oops /lib/systemd/system-generators/cloud-init-generator is what enables cloud init
[17:36] <amansi26> blackboxsw: There is no such file on the system
[17:47] <blackboxsw> amansi26: what distibution again?
[17:48] <blackboxsw> ubuntu?
[17:48] <amansi26> blackboxsw: yes
[17:50] <blackboxsw> if that ubuntu image didn't have cloud-init already installed, it is probably not a certified cloud image from ubuntu from https://cloud-images.ubuntu.com/
[17:53] <amansi26> blackboxsw: I can tell you the steps I performed. 1.Took an iso from http://old-releases.ubuntu.com/releases/16.04.4/ubuntu-16.04-server-ppc64el.iso and installed the ubuntu system. 2. I have a custom cloud-init debian package, I tried installing that. It got installed. But the status is disabled(by-default, as discussed).
[17:54] <blackboxsw> if I `lxc launch ubuntu-daily:bionic mybionic; lxc exec mybionic ls /lib/systemd/system-generators/` I can see cloud-init-generator file there
[17:54] <blackboxsw> amansi26: if you are trying to boot cloud-image with cloud-init you really should source from official cloud-image isos
[17:55] <blackboxsw> https://cloud-images.ubuntu.com/xenial/current/
[17:56] <amansi26> But there is no iso file out there
[18:23] <amansi26> blackboxsw: When will this file /lib/systemd/system-generators/cloud-init-generator get generated?
[19:08] <blackboxsw> amansi26: it should be part of the deb package built
[19:09] <blackboxsw> packages/bddeb could help with that
[19:10] <blackboxsw> it defaults to systemd init system type which s what packages the cloud-init-generator from systemd/*.tmpl
[19:11] <blackboxsw> './tools/run-container' could also perform a build of your custom cloud-init dir in an lxc container on centos/debian/ubuntu and emit a built binary package to your $CWD