/srv/irclogs.ubuntu.com/2021/09/10/#cloud-init.txt

=== mamercad3 is now known as mamercad
otuboHello folks, anyone working on adding man for config files? Or, is there an interest to do so? https://bugzilla.redhat.com/show_bug.cgi?id=191286209:07
ubottubugzilla.redhat.com bug 1912862 in Red Hat Enterprise Linux 8 "Add man pages for cloud-init config files" [Low, New]09:07
blackboxswotubo: not on our radar at the moment.  Looking over that automated bug , most of those template files are just templates, which are written out to actual config files for other tools outside of cloud-init which  *do* have existing man pages on the system.  So, I'd drop the errors on all /etc/cloud/templates/* and any of the .d parts directory paths like  /etc/rsyslog.d/, /etc/bash_completion.d/ and 16:51
blackboxswetc/NetworkManager/dispatcher.d/16:51
blackboxswthose parts directories are man-doc'd for those separate utilities16:52
blackboxswI could see extending man cloud-init to give a bit more information about configuring /etc/cloud/cloud.cfg and .d, but currently not on our radar. It's worth a bug/feature request asking for cloud.cfg(.d) docs though16:53
blackboxswhrm, I'm also not really sure what to do about this fedora33 vs 34 bug on a cloudstack deployment https://bugs.launchpad.net/cloud-init/+bug/1942232   smells a bit to me like improper DNS config??? But I might be reading it wrong16:55
ubottuLaunchpad bug 1942232 in cloud-init "CloudStack datasource: querying data-server does not work on Fedora 34" [Undecided, Incomplete]16:55
minimalis there anyway to prevent the "users:" section of user-data completely overriding entries in /etc/cloud.cfg, specifically I have "users: - default" in cloud.cfg but in someone places a "users" section in the user-data and forgets to ensure they put "-default" in there then the default user does not get created at all17:10
blackboxswminimal: I admit I haven't done this directly, but I think you could lay down merge_how directives on disk in /etc/cloud/cloud.cfg or cloud.cfg.d/some.cfg that would define  list behavior to append instead of "replace"17:13
blackboxswhttps://cloudinit.readthedocs.io/en/latest/topics/merging.html17:13
blackboxswas it is default for lists is to replace I believe. which explains your behavior17:13
minimal"As was the case before merging was implemented, user-data will overwrite conf.d configuration without merging."17:16
minimaldoesn't this mean that merging will not work for /etc/cloud/cloud.cfg and user-data?17:16
blackboxswminimal: d'oh "Note, however, that merge algorithms are not used across types of configuration" my bad. you are right17:20
blackboxswhrm. in that case, seems not to be helped if users are defined lacking that root user in user-data. :/17:21
blackboxsws/root/default/17:21
minimalnot a big issue but would have been nice to ensure default user is always created17:21
blackboxswthanks for reading the docs fully for me :/ 17:21
minimalits a dirty job but someone's gotta do it ;-)17:22
blackboxswheh. yeah I think the "feature" of this is that user-data **can** say it doesn't want the default user, via intentional omission. But I agree, it's probably more often that someone doesn't but that in and then has to hit up docs and mmmmmayybe, just maybe they find https://cloudinit.readthedocs.io/en/latest/topics/examples.html#including-users-and-groups  "Unless you define users, you will get a 'ubuntu' user on ubuntu 17:25
blackboxswsystems with the17:25
blackboxsw# legacy permission (no password sudo, locked user, etc). If however, you want17:25
blackboxsw# to have the 'ubuntu' user in addition to other users, you need to instruct17:25
blackboxsw# cloud-init that you also want the default user. To do this use the following"17:25
blackboxsw*It's probably more often accidental omission of - default"*17:26
blackboxswprobably worth us better documenting that in https://cloudinit.readthedocs.io/en/latest/topics/modules.html#users-and-groups17:27
minimalI'd expect most people would prefer a way in user-data to explicitly prevent the default user creation rather than needing to remember to add the "- default" bit but that's the way its always been so I guess we're stuck with it17:32
otuboblackboxsw, thanks a lot for the info on the man pages. I'll probably update the BZ early Monday. Have a nice weekend! :-)20:42
blackboxswyou too!20:42

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