/srv/irclogs.ubuntu.com/2022/07/12/#cloud-init.txt

=== djhankb6 is now known as djhankb
=== esv__ is now known as esv
quintasanblackboxsw: holy cow, thanks, I wouldn't have figured it out myself13:51
faawe need commiter help write_file bug in FreeBSD https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=26517721:52
ubottubugs.freebsd.org bug 265177 in Ports & Packages "net/cloud-init - fails when attempting to use write_files" [Affects Only Me, New]21:52
holmanbfaa: thanks for reporting. Is this a bug in python'22:01
holmanbs grp module on freebsd?22:02
holmanbor  perhaps in os.chown()?22:04
faaunfortunately I don’t know, I just checked, if necessary I can give a more detailed log22:04
holmanbMore detail would indeed be helpful. I don't think that just ignoring the group gid is likely the right solution for non-bsds, though this may work on freebsd. Cloud-init delegates distro/os-specific behavior to distro modules, so assuming this is the right solution for cloud-init in freebsd we could move implementation of this utility into distro-specific files and then update callsites accordingly.22:08
faahttps://pastebin.com/wm7i9anS log 21.2 and 22.2.222:10
holmanbfaa: freebsd has no root user? what do you call it, wheel?22:12
faano, file created ls -lah test-file.sh  -rwxrw-r--  1 root  wheel    18B Jul 12 21:30 test-file.sh22:13
faathis standart cloud-init.log part, service startet root user22:14
faamay be cloud init set group roo by default?22:15
faaroot22:15
holmanbyeah, looks like the root user is assumed to be in group "root" on default. So on freebsd that should be "root:wheel", correct?22:16
holmanbs/on default/by default/22:16
holmanbfaa: sidenote - for what it's worth, our test coverage for the bsds is very limited, if anybody on the freebsd side wants to make contributions in that area I bet that would be welcome.22:18
holmanbfaa: this is the root group assumption I mentioned: https://github.com/canonical/cloud-init/blob/e0416cd67b423b9ae28e5edcd0db7aecdde4ecbe/cloudinit/config/cc_write_files.py#L1822:19
holmanba quick test would be to set   owner: "root:wheel" in the config22:21
faayes if set owner: root:wheel error message not logged22:21
holmanbnice, glad there's a workaround22:22
faayes, thank for help22:24
holmanbfaa: np, I can toss a PR up on github while it's fresh in my brain, but I'll need somebody who actually uses freebsd to review/test22:27
faaI try to help22:28
holmanbfaa: also, I don't have an acct on the freebsd bugzilla, would you mind relaying the workaround we discussed there?22:28
faaalways write22:28
holmanbfaa: https://github.com/canonical/cloud-init/pull/158722:38
ubottuPull 1587 in canonical/cloud-init "freebsd: Don't assume that root user is in root group" [Open]22:38
holmanbfaa: Also, thanks for relaying that to bugzilla :D22:39
faadone22:41
holmanbfaa: appreciated :)23:29

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