/srv/irclogs.ubuntu.com/2022/04/18/#cloud-init.txt

blackboxswtabrez sorry for delay there. "identity:" looks like it is autoinstall YMA 13:42
blackboxswtabrez sorry for delay there. "identity:" looks like it is autoinstall YAML for the ubuntu live-server installs via subiquity. I see references here https://ubuntu.com/server/docs/install/autoinstall-reference13:42
blackboxswwhile that is YAML that includes typical cloud-config directives, the "autoinstall:" top-level key is something only honored from the live-server installer (subiquity) and not cloud-init proper.13:52
blackboxswThe JSON schema that the autoinstaller supports looks to be https://discourse.ubuntu.com/t/automated-server-install-schema/1661513:52
blackboxswanything under the user-data top-level key in the autoinstaller is  passed through directly to cloud-init.13:52
blackboxswso holmanb per standup discussion on https://github.com/canonical/cloud-init/pull/1334 what do you think you'd prefer to do. Shall we leave the top-level check intact     `if not subp.which(SSH_IMPORT_ID_BINARY)` and just skip the module?   14:41
ubottuPull 1334 in canonical/cloud-init "declare dependency on ssh-import-id (SC-864)" [Open]14:41
blackboxswholmanb: the only aversion I have to that top-level check is that we will always emit the warning from that module even when no ssh-import-id config is provided14:42
blackboxswwhich is why I was going down the route of trying to handle individual positive cases where ssh-import-id is provided under  "users:" or as a top-level key14:43
holmanbblackboxsw: Thanks for the feedback and ideas. I understand the argument, agreed, warnings without meaning for the end user are not ideal. Might propose something that handles the case you suggested shortly15:15
holmanbblackboxsw: PR updated which should handle the "users:" case.[15:51
blackboxswholmanb: thanks review comment added I look to you and falcojr to talk me down off my "pedantic" response on the ssh-import-id Pr16:54
holmanb@blackboxsw: false positives should be a non-issue I think, wouldn't those configs be invalid under the schema?16:58
blackboxsw+1 on that @holmanb . we'd have a warning anyway for bad schema16:59
blackboxswthe other efficiency aspect should be do we care on something so small given that we are really only talking about 2 nanoseconds between the two options it's probably a #dontcare17:00
holmanb@blackboxsw: it would be prudent to compare on a large config I think, though I doubt it will yield a significantly different value until checking a config that doesn't use ssh_import_id that is extremely large17:04
blackboxswright the cost of detection when traversing the entire large config will probably increase that cost significantly. What you could do to mitigate that is use your generic function but only call it on config.get("user", {}) and config.get("users", {})17:10
blackboxswthat way we just check `if any[("ssh_import_id" in config , nested_key( config.get("user", {}), "ssh_import_id"),  nested_key( config.get("users", {})]:`   17:11
blackboxswbut in that case you are making two func calls instead of one. so cost there too :)17:12
blackboxsweither way not a strong opinion. Just an observation that should really be "non-blocking" on the review/merge.17:12
* holmanb adds notes to write "cc_save_cycles_and_make_security_team_happy" which shuts down the instance on boot ;)17:14
blackboxswhah!17:15
* holmanb personally likes your suggestion, I'll do that17:15
holmanbassuming falcojr or others don't have dissention to opine17:19
falcojrno opining here17:25
holmanbGithub helpfully assumes that +1 is supposed to be a thumbs up emoji, and gives a little popup that covers the preview tab.18:11
holmanbOne of these I _always_ want (access to preview tab), the other I _never _ want (I will type :+1: if I really want an emoji). This little feature makes sure I don't get what I want in either case. Thanks Github *facepalm* </rant>18:11

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