[00:45] chiluk: You were asking about rerunning networking. Not sure if this is what you want, but there's a net-convert tool to test cloud-init's rendering of network config [00:45] https://cloudinit.readthedocs.io/en/latest/topics/cli.html#devel [00:46] you can feed it your v1 or v2 network config and have it spit out the distro-specific networking config that you're working with [00:47] and to rerun cloud-init without booting, you can do something like [00:47] cloud-init clean --logs; cloud-init init --local; cloud-init init; cloud-init modules --mode=config; cloud-init modules --mode=final; [00:48] but as somebody mentioned, this isn't a great idea unless it's purely for development/debugging on a throwaway instance === gschanuel6 is now known as gschanuel === gschanuel9 is now known as gschanuel [20:37] holmanb: falcojr I saw promoting the `cloud-init devel schema` to a top-level subcommand landed `cloud-init schema`. Did folks have a discussion about whether there would be a separate PR that would still respond to `cloud-init devel schema` with a deprecation or wrapper to the real entry point? I ask because I know there are external blogs askubuntu questions that make reference to the old subcommand location [21:17] Hi all, can I get some help on my yaml here for cloud-init? [21:18] Here is my yaml: [21:18] #cloud-config [21:18] autoinstall: [21:18]   version: 1 [21:18]   identity: [21:18]     hostname: ubuntu-server [21:18]     password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0" [21:18]     username: ubuntu [21:18]   interactive-sections: [21:18]     - storage [21:18]   users: [21:18]       - name: guy1 [21:18]         groups: sudo [21:18]         sudo:  ALL=(ALL) NOPASSWD:ALL [21:18]         primary_group: guy1 [21:18]         lock_passwd: false [21:18]         passwd: "$6$mUvHxAq8YK2ZO$urxKPXcW2RRjHyRiQ3P34B.XOouwgsx9Qu4EZnBfvVFvn74HenKJyrCvfb6bJRd2wf5Jk6Sa/lvokB5mGfOo2." [21:18] This does not work, anyone can help me? [21:19] logs? [21:19] The part that does not work is the users: Everything else works (The Ubuntu server installs fine) [21:19] Where can I find the logs? [21:20] Guest44454: on the installed system you can run `sudo cloud-init query userdata; sudo cloud-init devel schema --system --annotate` as well as 'egrep warning|traceback /var/log/cloud-init.log' [21:20] Ok, let me check .. [21:23] Guest44454: also generally the installer yaml provides a contstruct where anything you are trying to pass to cloud-init directly needs to be under a "user-data:" key [21:23] This yaml is my user-data file, sorry I forgot to mention [21:24] blackboxsw: "a separate PR that would still respond to `cloud-init devel schema` with a deprecation or wrapper to the real entry point?" deprecation was in the PR but I preferred we remove it entirely [21:24] Guest44454: where is group "guy1" created? [21:25] according to our docs, Collection of development tools under active development. These tools will likely be promoted to top-level subcommands when stable. [21:25] Do NOT rely on the output of these commands as they can and will change. [21:25] normally a (primary) group is created with the same name as the user automatically [21:26] so I'm guessing your yaml needs to be something like this https://paste.opendev.org/show/bOKYUL6wXcS0TnIFDkJ5/ [21:26] Guest44454: ^ [21:26] Guest44454: ignore me, I misread the YAML lol [21:27] falcojr: ok; on not supporting the 'devel schema' entry point. it should generally be discoverable given it'll be present as a top-level cmd. [21:29] blackboxsw: Results to logs: [21:29] minimal: yeah, with the fact that autoinstall supported schema is from the Ubuntu live-server installer is effectively a super-set of cloud-config directive under a sub-key "user-data:". Both teams have an item on our next 6 month roadmap to make sure the combined schema validation is done at install time to avoid concerns like Guest44454 is raising here. [21:31] -bash: egrep warning|traceback /var/log/cloud-init.log: No such file or directory [21:31] Guest44454: that tells us cloud-init hasn't run I think. `cloud-init status --long` [21:34] or rather `sudo cloud-init status --long` in your environment [21:34] blackboxsw: I installed my custom iso with this yaml, and only had to interact with the storage setup (as per yaml). After reboot, I could login with the user ubuntu and password ubuntu [21:34] so that tells me it did run, but did not add my additional user? [21:37] status: done [21:37] time: Wed, 27 Apr 2022 21:27:56 +0000 [21:37] detail: [21:37] DataSourceNone [21:39] Guest44454: please maybe take us through the steps you followed to create the custom iso , as the "users:" yaml directives you provided is completely ignored and something else is providing cloud-init with your default ubuntu user. If the "users:" directive was being seen by cloud-init it cloud-init would not have created the default ubuntu user on the system because it expects to minimally see `users:\n- default\n- name: [21:39] your_additional_user....\n` [21:39] This is the result from the sudo cloud-init query*** command: [21:39] #cloud-config [21:39] growpart: [21:39]   mode: 'off' [21:39] locale: en_US.UTF-8 [21:39] preserve_hostname: true [21:39] resize_rootfs: false [21:39] users: [21:39] - gecos: ubuntu [21:39]   groups: !!set [21:39]     adm: null [21:39]     cdrom: null [21:39]     dip: null [21:39]     lxd: null [21:39]     plugdev: null [21:39] ok datasourceNone looking good. [21:39]     sudo: null [21:39]   lock_passwd: false [21:39]   name: ubuntu [21:39]   passwd: $6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0 [21:39] Guest44454: please use https://paste.opendev.org or paste.ubuntu.com to aid in readability for us [21:40] Ok, [21:40] ok so the users definition is coming from somewhere else. From the live server installer POV. I expect this is under /etc/cloud/cloud.cfg.d/99-installer.cfg [21:41] Does this help: [21:41] #cloud-config [21:41] growpart: [21:41]   mode: 'off' [21:41] locale: en_US.UTF-8 [21:41] preserve_hostname: true [21:41] resize_rootfs: false [21:41] users: [21:41] - gecos: ubuntu [21:41]   groups: !!set [21:41]     adm: null [21:41]     cdrom: null [21:41]     dip: null [21:41]     lxd: null [21:41]     plugdev: null [21:41]     sudo: null [21:41]   lock_passwd: false [21:41]   name: ubuntu [21:41]   passwd: $6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0 [21:42] I mean the stream of lines that you copy into IRC makes it a bit tough and noisy for folks trying to follow the conversation. So remote paste links makes it easier to re-read/understand the conversation [21:42] My custom iso is from this site / gentleman: https://www.pugetsystems.com/labs/hpc/How-To-Make-Ubuntu-Autoinstall-ISO-with-Cloud-init-2213/ [21:43] Thanks blackboxsw, I can paste in remote link, but how do I share it :) [21:43] great. you can go to either https://paste.opendev.org/ or paste.ubuntu.com and cut and paste your text there and hit submit. then you can paste just the link here and we can see that formatted text easily [21:44] Guest44454: but all good for the moment. [21:45] Guest44454: so note from what you saw in `sudo cloud-init query userdata` shows us that it didn't honor your `users:` autoinstall directives [21:46] Guest44454: I believe this is because you need to have any specific cloud-init overrides under a "user-data:" key instead of just under "autoinstall:" [21:48] Ok, can I say at this point, I have no idea what that means? Yes, I am very new to yaml & cloud-init [21:48] Do I add a user-data: key before users: [21:50] Guest44454: no worries. Note as well that your "identity:" section in your original paste defines that ubuntu default user/password. and it seems like you are trying to pass "users:" directives into cloud-init proper. In this installer case, you'd want to pass "users:" into cloud-init and the way to do that is to add a "user-data:" key above "users:". Which I represented in this paste [21:50] https://paste.opendev.org/show/bOKYUL6wXcS0TnIFDkJ5/ [21:51] :) Ok, so I guessed that correctly [21:51] Thanks, [21:54] Guest44454: also I'm not truly certain how the live-server autoinstall yaml interacts with cloud-init when you provide both `identity:` and `user-data: users:` as the docs show that providing user-data makes identity: optional. So you may end up needing something like this (with a `-default`) added on line 12 https://paste.opendev.org/show/bErdasUTKXCOApN3ftF3/ [21:54] Now, I will try this and see if it works, behind that, i need to add respositories, update the system, install additional software from my repositories and configure network..... fun [21:54] @black [21:54] good luck and please do provide feedback on how that worked for you or bumps you hit [21:55] we are actively trying to improve the experience here as it is confusing [21:55] blackboxsw yes, I believe the - default string add the user to the existing admin user [21:55] Guest44454: schema docs for the autoinstaller syntax in case you haven't seen them https://ubuntu.com/server/docs/install/autoinstall-reference [21:55] Thanks, will do.... [21:55] great [21:56] Maybe I should create a username so i can come back and not get lost in the sea [21:57] /nick somename_you_want will do that if you like === Guest44454 is now known as ice10001 [22:01] Here goes. Startin up my VM with my custom iso [22:01] welcome ice10001 [22:02] :) I am Guest 44454 [22:07] Lol, now I cannot log in via any account, the guy1 or the ubuntu [22:13] Apologies, I can now log in with guy1 [22:13] But not with ubuntu [22:13] But that is progress!! [22:24] nice, ice10001 yeah I'm presuming the identify: and user-data: users are colliding somehow in what gets passed into cloud-init [22:25] I have removed the - default parameter, lets see.. [22:25] Not that I know it will work, but am literally trying to see what could be causing issue [22:33] ice10001: you could specifically omit the `identity:` section entirely and provide user-data:\n hostname : ubuntu-server\n password: ""$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"\n [22:33] and leave the `- default` in your `users:` list [22:33] then you won't have to collisions with how the live-server autoinstall is handling the ubuntu user setup. [22:34] and cloud-init specifically will do that work to setup the -default (ubuntu) user and hostname directly instead of relying on the autoinstaller layer (subiquity) to do that work ahead of time [22:34] Let me write that so I understand... [22:35] Oh wait... so no identity, just straight to user-data: [22:36] instead of https://paste.opendev.org/show/bOKYUL6wXcS0TnIFDkJ5/ I'm wildly guessing something like this 2nd paste https://paste.opendev.org/show/bIO6TFx6ksSGVRuhVRaP/ [22:36] yeah ice10001 like the above [22:37] ok I have to head out for the day. Hope that works for you or something close to that [22:37] Thanks you so much!! [22:37] I am new here and new to cloud-init and would appreciate some guidance [22:37] has anyone tried using compressed gzip encoded userdata in alicloud? [22:38] I have been failing miserably with it to while decoding === Guest44454 is now known as ice10001