/srv/irclogs.ubuntu.com/2020/10/15/#cloud-init.txt

=== tds5 is now known as tds
_NiCI've made an image that uses LVM, and in cloud.cfg I'd like to run growpart: on the LVM partition, as well as a runcmd: to pvresize the PV. The name of the device changes depending on the hw_disk_bus/hw_scsi_model that is used (i.e. /dev/vda or /dev/sda). Is there a way to detect what the correct device name is, and use that in growpart and runcmd?09:25
catphishis there documentation of the various formats of files found at https://cloud-images.ubuntu.com/focal/current/11:02
catphishi'm specifically looking for a cloud image to run on kvm, but i don't understand whether i want -disk-kvm.img or .img, or what the actual formatting of these disks is11:03
_NiCthe disk-kvm.img probably works. You can use qemu-img info <image> and it'll tell you what format it is11:07
_NiC(not really cloud-init related though)11:09
catphishi just downloaded both, they both seem to be qcow disks with identical partition tables11:09
catphishi'll try try them both and see what happens, i just wondered if someone here was responsible for those (as i thought they were cloud-init specific)11:11
_NiCIn my VM I make my image from, there's a 'debian' user with a password. I need this for when I want to make any changes to the image. In cloud.cfg there's a default_user: lock_passwd: True, so this account can't be used directly. However, the encrypted password remains in /etc/shadow, and I'd like for that to be cleared out. Is there a way to do that?11:21
_NiCperhaps passwd: '' will work? :-\11:23
_NiCNo, did not work.11:40
otuboHello all, me again. Just wanted to ping some maintaners to check this tiny pull-request https://github.com/canonical/cloud-init/pull/586 shouldn't take long (CC Odd_Bloke rharper )11:51
otuboAlso, some questions regarding multi_log() that I posted yesterday:11:52
otubowhy does multi_log() is on util.py and not on log.py? I just got an IOError on multi_log()'s flush call over here. I see that log.flushLoggers() is the single point of flushing (except for log._resetLogger()) and it passes on IOError exception. Wondering if we should pass on util.multi_log() as well or move multi_log inside log and reroute the flush to log.flushLoggers()11:53
otuboThe bug in question is this one: https://bugzilla.redhat.com/show_bug.cgi?id=183110711:53
ubot5bugzilla.redhat.com bug 1831107 in cloud-init "[RHV] cloud-init with empty fields injects configurations" [Low,New]11:53
AnhVoMSFTotubo: would you be ok with changing "dhclient error stream" to "dhclient strerr stream" ?14:12
Odd_Blokejohnsonshi: AnhVoMSFT: #563 is landed. \o/14:20
Odd_BlokeThank you for your patience!14:20
AnhVoMSFTThanks @Odd_Bloke14:46
smoserhow does cloud-init add the #PR to the subject of git commit14:57
smoserand how can we make whatever-does-that-magic better lint commit messages14:58
smosermany recently with no body14:58
smoserand long lines14:59
smoserpart of that was a rant... sorry. i came here to ask about the #PR because i'd like to do "rebase and merge" on a different project, but feel that it is important to get the #PR15:00
powersjsmoser, if I recall github automatically adds the pr # to the end of the description16:02
smoseri dont htink so.16:12
powersjsmoser, you are referring to the (#563) in the latest commit: https://github.com/canonical/cloud-init/commits/master right?16:13
smoseroh. well id' not updated recently. so my top commit was16:17
smoser nitial implementation of integration testing infrastructure (#581)16:17
smoserthat was a "no body"16:17
smoserbut yeah... the last 2 commits have long subject lines.16:17
smoser#549 has long lines in body16:17
smoser</endrant>16:18
powersjI wonder if a github action can format/warn about this16:21
smoserpowersj:ah. squash-and-merge does it.16:26
smoserrebase-and-merge does not16:26
smoserwhichs... odd. but ok.16:26
powersjahh good to know16:26
johnsonshi_Odd_Bloke: Thanks for merging!16:39
johnsonshi_Odd_Bloke: You've also previously reviewed this one (https://github.com/canonical/cloud-init/pull/590) and signed off on it, except for a few small comments (which I've addressed). That should also be ready to merge :)16:39
Odd_Blokesmoser: I guess with rebase-and-merge, how would you handle multiple commits?  Put it on every commit that's rebased?  The last one?16:39
Odd_BlokeWith squash there's an unambiguous commit to add it to, I suppose.16:40
Odd_Bloke(Rebase-and-merge does create new commits even if it could fast-forward, so they _could_ put it on every commit.)16:40
falcojrdo we have a long line rule on cloud-init?16:42
falcojror a "you must also have more text in a body even if you only want what's in the subject line" rule?16:43
powersjwe document the format of a commit message here: https://cloudinit.readthedocs.io/en/latest/topics/hacking.html?highlight=commit%20message#do-these-things-for-each-feature-or-bug16:43
powersjwhen we used LP we had a check that would ensure it would be formatted correctly16:44
smoserthanks for humoring me.16:48
smoserOdd_Bloke: squash-and-merge is what cloud-init wants, for sure.16:49
smoseri was working on a different project (https://github.com/anuvu/disko/).16:49
smoserand the specific PR had only one commit, so squash-and-merge *could be* the same as rebase-and-merge. except its not.16:50
falcojrI'm not sure that doc really addresses either of my questions. I wouldn't read "summarizing the change and a longer message indicating important details about the changes included" as meaning you MUST have more than just a title if you think a title would suffice16:51
meenadoes anyone here have time to help me fix my failing Azure tests?17:31
meenain https://github.com/canonical/cloud-init/pull/588 after 41a53b92ad286f4a179bd4917d24a25036faa7eb , tests in tests/unittests/test_datasource/test_azure.py are failing. And i don't quite understand how to change the TestAzureDataSource or the mocks for it to succeed.17:34
meenai'm guessing the test class would need a distro object… that'd be a good start.17:34
meenaOdd_Bloke: btw, how would i change https://github.com/canonical/cloud-init/pull/588/commits/c4c9a6e19fbc62545551b87ba005290a56b3a7ca to be in line with https://github.com/canonical/cloud-init/pull/609/files ?17:38
meenaoh, and one very important thing… how  do you fix flake8 complaint about a line that's 80 char, when the line is literally just foo_bar_baz.zomg = zomgulator.foomatic.bazoom()17:45
meenawell, literally, not meant literal… but, like, valley girl.17:45
falcojrfor the flake8 question, a `# noqa: E501` at the end of the line should suppress that particular error...though it may be reasonable to split it with a blackslash at one of the dots18:43
meenafalcojr: the line is:                self._network_config = self.distro.networking.generate_fallback_config()18:57
meenaanother one is:        assert 0 == oracle_ds.distro.networking.generate_fallback_config.call_count18:58
meenaand the third is:        oracle_ds.distro.networking.generate_fallback_config.return_value = copy.deepcopy(18:58
meena            ncfg18:58
meena        )18:58
falcojryou _could_ a backslash and linebreak before any of those dots18:59
* rgl waves18:59
falcojrmy personal opinion is that falls into the pep8 atrocities camp, but I think I'm in the minority on that front18:59
rglI'm upgrading from ubuntu 18.04 to 20.04, but cloud-initramfs-growroot seems to be broken. It seems that after the partition is resized the wait-for-root call never returns (I can mount it manually thou). It seems wait-for-root is waiting for some udev event that never is triggered. Do you have any idea how to further troubleshoot this?19:03
meenafalcojr: no… no you're not… tho two people hardly makes a plurality? majority?19:11
falcojrbetter to ask forgiveness than permission? Just throw the comment on there and see if anybody yells during review ;)19:12
meenai'd rather people yell suggestions for how to mock distro into tests/unittests/test_datasource/test_azure.py::TestAzureDataSource19:14
Odd_BlokeYou could also do `generate_fallback_config = oracle_ds.distro.networking.generate_fallback_config` on the preceding line.19:16
Odd_BlokeI agree that this is a marginal case, for sure.19:16
meenai just pushed the noqa "fix"19:17
meenawe can talk about "improvements" of marginal cases in the review19:18
meenaif i ever get there19:18
AnhVoMSFTwhy are we still limiting to 80 characters btw?19:30
meenaAnhVoMSFT: because that's what pep8 says.19:33
AnhVoMSFTcan that be customizable to something more modern19:56
AnhVoMSFTthat reflects the average developer's screen size19:56
meenaAnhVoMSFT: it's not about screensize, it's about uhm… remembering the start of the line at the end of the line…19:57
=== tds9 is now known as tds
Odd_Blokeotubo: I'm ready to merge https://github.com/canonical/cloud-init/pull/586 if you can give me a commit message to use. :)20:04
Odd_Blokefalcojr: One minor comment on https://github.com/canonical/cloud-init/pull/60420:23
Odd_BlokeI regularly (read: always) have 3-4 files open in vertical splits in vim; 80 characters allows me to see the full lines in all 4 files simultaneously.20:31
Odd_BlokeSo increasingly the character limit would affect my workflow.  This isn't to say we can't change it, by any means (I coped for years with _only_ 3 files before upgrading my monitor ;), but it's worth noting that there are trade-offs in both directions.20:33
meenamy font size is too big for more than one file vertically split20:37
meenai need to get different font, or different eyes / brain20:37
Odd_BlokeFonts are easier to acquire, I think.20:37
meena€€€€€20:39
=== tds8 is now known as tds
johnsonshi_Woah that must be a big monitor to fit 4 files at the same time!22:43
aswinrHi. Looking to get this PR reviewed/merged in time for the sru. Has been validated with Azure, reviewed and approved by AnhVoMSFT - https://github.com/canonical/cloud-init/pull/61323:05

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