/srv/irclogs.ubuntu.com/2024/03/18/#cloud-init.txt

minimalQuark: try changing "primary-group" to "primary_group"? Also try validating the user-data in cloud-init to see what it says?15:16
QuarkData validation passes.15:17
minimalalso did the cloud-init.log show anything?15:17
QuarkNo, just the cloud-init-output.log had the error.15:18
minimalstrange, check the cloud-init.log for when it does user creation to see what it shows15:18
QuarkLet me  try changing that primary-group (that's a typo there).15:18
minimalit its a Subiquity issue, rather than cloud-init, then the best place to discuss it would be the #ubuntu-server channel15:20
bahamatIs it possible to create a directory with cloud-init?22:20
meenabahamat: not with write_files; so runcmd it has to be; or if it needs to happen very early, bootcmd22:34
bahamatmeena: Ok, thanks. I'm trying to do an nfs mount and the directory I want to use doesn't exist.22:37
meenabahamat: according to the documentation, cc_mount creates directories that don't exist first23:31
meenabahamat: so, if it doesn't, I'd call that a bug23:33
bahamatHmm. Well, my nfs mount isn't being configured.23:33
bahamatHere's the cloud config I'm using: https://gist.github.com/bahamat/01db41644b3885c3f1fdc3b0be1241b123:34
QuarkCan you provide a pastie with a snipped?23:34
QuarkOps, we typed at the same time. :-D23:35
bahamat:-D23:35
bahamatRunning the mount command manually mounts the share, so that part is working.23:36
QuarkRunning `cloud-init schema --config-file=user-data --annotate` renders `E1: Additional properties are not allowed ('mount' was unexpected)`23:38
bahamatOh, mounts.23:40
bahamatDamn.23:40
bahamatOK, let's give this another shot.23:41
meena*most* directives are in plural… except runcmd and bootcmd… and, let's not get into details about consistency23:47
minimalbahamat: your cloud-config content is not valid23:50
minimalit is "mounts:", not "mount:"23:51
minimalah, ok, you noticed ;-)23:52
bahamatYeah, thanks though :-)23:52
minimalyou could validate the YAML to check via "cloud-init schema" command23:52
bahamatI don't use cloud-init a lot myself, but I have a lot of users who do, so I provide examples for them. Hopefully working ones :-)23:52
bahamatThe weird thing is that I thought I had, and it returned no errors.23:54
bahamatBut later validating it again showed both that "mount" should be "mounts", and that fields 4 and 5 need to be strings, not numbers (which, that one is kind of annoying, because they *are* numbers)23:55
minimalalso "mounts" runs in cloud-init "init" stage whereas "packages:" runs in cloud-init "final" stage and so the mount will be attempted BEFORE the nfs-common package is installed23:55
bahamatSo there's no way to do this then...23:56
bahamatunless I install the package via bootcmd or something.23:56
minimalruncmd as meena suggested?23:56
minimalbahamat: "fields 4 and 5 need to be strings, not numbers" - you mean fields 5 & 6? the cloud-init is YAML and that's why they need to be quoted as otherwise a number "0" or beginning with "0" will not be treated as a decimal 023:58
bahamatOh, that's right, it's octal.23:59

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