anie: /etc/ssh/sshd_config.d/50-cloud-init.conf generated by cloud-init I see it is removed using packages/debian/cloud-init.postrm . Since the package manager does not install the conf, could we not have cleaned it up as a part of "cloud-init clean" operation?12:46
aniThe reason I ask is that for centos/rhel, if we took similar approach, we would have to remove it from the rpm spec file. Instead we could have a common place to remove such conf files12:47
aniPlease see https://github.com/canonical/cloud-init/pull/161812:48
-ubottu:#cloud-init- Pull 1618 in canonical/cloud-init "ssh_util: Handle sshd_config.d folder" [Merged]12:48
meenarunning tox -e py3 with a freshly patched python…14:52
-ubottu:#cloud-init- Pull 107813 in python/cpython "GH-107812: extend `socket`'s netlink support to FreeBSD" [Open]15:38
=== TimS is now known as TimKumina
TimKuminaHey all, I was wondering, when using a datasource like Ec2, is config in /etc/cloud/cloud.cfg.d still expected to be applied? We're using some write_files in userdata in an Ec2 datasource, but also have one in /etc/cloud/cloud.cfg.d/10-local.cfg. However, the one from /etc/cloud/cloud.cfg.d is never applied and we cannot figure out why, except that18:18
TimKuminathe Ec2 datasource simply overwrites the entire write_files key?18:18
TimKuminaWhen I do "cloud-init query merged_cfg", I do see the write_files we have locally, but I'm unsure how much value the merged_cfg has in this case.18:19
minimalI believe that shows merged *system* config, rather than merged user-data18:24
minimalhmm, I guess they're used as cloud-config even if the files are missing the "#cloud-config" line18:32
TimKuminaThat is kinda what I expected, at least18:34
TimKuminaDocs aren't super clear about it :-| Basically, I'm looking for a way to inject "vendor data"18:34
minimalTimKumina: I think you need to read this page: https://cloudinit.readthedocs.io/en/latest/reference/merging.html18:35
minimalit might also be affected by which version of cloud-init you're using18:35
minimalTimKumina: vendor-data? that's provided by the vendor (i.e. AWS/Ec2 in your case)18:36
TimKuminaRunning 23.1.1 (Ubuntu provided) and I tried adding the merge_how key to my file as well, didn't seem to make a difference18:36
TimKuminaWell no, this is in premise with Hegel, which acts like Ec218:36
TimKumina*on premise18:36
minimalif you look at that page, with older versions of cloud-init you can see that merged would result in the "latest" write_files replacing any other write_files entries18:37
minimalthat page talks about how you can control the merging behaviour18:37
TimKuminayes, by adding the merge_how key, but it seems like it's ignored18:39
TimKuminaAh, found this note: "Note, however, that merge algorithms are not used across configuration types.18:42
TimKuminaAs was the case before merging was implemented, user data will overwrite18:42
TimKumina'conf.d' configuration without merging."18:42
TimKuminaguess we have to look for another method, then :(18:42
minimalright, so merging across /etc/cloud/cloud.cfg and any other /etc/cloud/cloud.cfg.d/* files occurs, but not between /etc/cloud/* and provided user-data18:45
minimalwhat exactly are you trying to achieve though?18:46
TimKuminacluster-api provider tinkerbell does not allow overriding over userdata currently, so we're trying to hack some of our custom config either into the image or in some other way18:52
TimKuminawe were hoping that there was a way to merge provided userdata with stuff on disk, but we'll go the nocloud route now and just merge the data ourselves, i think18:52
minimalyou mentionedf write_files, so it's not exactly "user-data" but rather files on the OS you want to modify, so why not modify them when creating the OS image?18:53
TimKuminabecause they differ per machine (we need to set the ip address that kubelet listens on by providing a patch file to the kubeadm init process, as it does not support setting an interface instead of an ip address)18:54
TimKuminawe already have per-machine manifests with networking data in cloud-config format, so we were hoping we could simply add it in there18:55
TimKuminabut networking data is handled differently from other data18:55
TimKuminaso this solution works for "network:", but not for "write_files:"18:56
TimKuminaor rather, "network:" is not passed in the user data, which seems a more likely explanation of why this works :)18:58
TimKuminahm that gives me another idea... if i user a resource that's not passed in the userdata, it should not merge it away...18:59
TimKuminaanyway, thanks for the help! off again19:02
minimalnot sure I understand exactly what you mean19:02
meenacjp256: https://github.com/python/cpython/pull/10781319:11
-ubottu:#cloud-init- Pull 107813 in python/cpython "GH-107812: extend `socket`'s netlink support to FreeBSD" [Open]19:11

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