/srv/irclogs.ubuntu.com/2018/02/23/#cloud-init.txt

=== Beret- is now known as Beret
mjh   Hello, I am using cloud init to create an ext4 filesystem on an encrypted LUKS device and then mount it. Documentation for LUKS suggests that every block should be written to prior to filesystem creation. I think that `mkfs.ext4 -cc /path/to/device` will do this but cant find an option for this kind of thing in the documentation. Any suggestions?10:55
smosermjh: hm... i dont think you can really manage taht with cloud-init at the moment.13:56
smoseryou could probably use something in a boothook or bootcmd13:57
smoserbootcmd:13:57
smoser - [dd, if=/dev/zero, of=/path/to/device]13:57
mjhI havent looked at boothooks / bootcmds yet. I shall RTFM :-)14:10
gtmanfredsmoser: sorry about that license agreement, apparently i put the wrong email, i just responded to the person trying to verify me on the agreement to put the correct one15:21
gtmanfredhopefully it should be good to go in a bit15:22
smosergtmanfred: great thanks.  your word here is good enough.  it does take a bit for a human to process.15:24
gtmanfred:+1:15:24
smosercan you reply in that mp ?15:25
smoser(even t hough i just said your word here was good enough :)15:25
gtmanfredyup, one second15:25
gtmanfreddone15:26
gtmanfredi think15:26
gtmanfredi can respond to launch pad emails and they post them right?15:26
gtmanfredmeh, commenteed15:26
smoseryes.15:26
gtmanfredi did both just to be certain :)15:27
gtmanfredcool, thanks!15:41
=== blackboxsw changed the topic of #cloud-init to: Reviews: http://bit.ly/ci-reviews | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting: Monday 3/5 16:00 UTC | cloud-init 18.1 released (Feb 22, 2018)
=== shardy is now known as shardy_afk
redkriegHi, I'm using cloud-init on an openstack guest and have a need for static network configuration.  I can see in my cloud-init.log file that the network_data.json file was successfully requested from the metadata service and the code I've reviewed in the openstack helper seems like it should be generating a static config for ipv6 but the default interfaces file with dhcp4 is the only thing written.18:18
redkriegCan I force cloud-init to reconfigure networks?18:18
rharperredkrieg: can you share your network_data.json and what your final network config is ?18:19
rharperredkrieg: Also, if you want cloud-init to configure networking in Openstack, you need to specify configdrive at this time ;18:20
rharperit's on the roadmap to read network config from the metadata service early enough that cloud-init can write out a network configuration like it does with configdrive, but that's not done yet18:20
redkriegthe json comes out like this: https://pastebin.com/E9uJZRBn18:21
redkriegI didn't realize that wasn't implemented.  The docs seem to indicate that it is supported :(18:21
redkrieghttps://pastebin.com/ivRtvyJ4 is the config that it generates, but that makes sense if metadata isn't acquired early enough.18:22
redkrieghow about forcing cloud-init to rebuild network config?  is that something that can be done?  it doesn't appear to be a module that I can find.18:23
rharperif you change the instnace to use configdrive, it will work18:23
smoseryeah.18:23
rharperwell, after networking is up, trying to re-apply could interrupt existing connections18:23
redkriegnot worried about that, it'd be something a client would do from our custom control panel and will come with all the usual warnings about what modifying network configs does18:24
smoserredkrieg: we do want to make this do the right thing.18:26
smoserand its not really a difficult change for first boot configuration18:26
smoser(hotplug is more difficult)18:26
smoserjust a matter of resources at the moment.18:26
redkriegyeah, once the user gets their hands on something they tend to create edge cases :D18:27
* smoser shakes fist at users18:28
=== logan_ is now known as logan-
redkriegconfig drive is working great for initial boot, thanks!  Is it possible to force cloud-init to reconfigure networking on the next boot or something similar?19:01
smoserredkrieg: no. not really.19:06
redkriegouch.  guess I'll have to cook something up to runcmd on boot and do it manually :\19:08
redkriegI think a neat feature would be testing for the absence of /etc/network/interfaces.d/50-cloud-init.cfg (or related files for other distros) and rebuilding.  Might take a swing at that over the weekend.19:10
rharpersmoser: powersj: so  both chrony and timesyncd happily don't run in containers unless you run them with the right capabilities to adjust time;  isc-ntp seems to run anyhow even if it can't adjust the time20:22
rharperthat does make the integration test a bit more challenging w.r.t asking the client itself how it's configured (versus just parsing the config file)20:22
rharperthoughts ?20:22
powersjwhat are the right capabilities?20:32
rharperheh, !Container20:35
rharperwhich is annoying20:35
rharperlemme get the chrony one20:36
rharperConditionCapability=CAP_SYS_TIME was not met20:37
rharpertimesyncd probably should use the ConditionCapability check that chrony uses  but that's an upstream change20:38
powersjha20:40
powersjrharper: so if someone tries to setup time via chrony with cloud-init with a container what is the expected behavior? nothing? warning message?20:41
rharperfrom cloud-init perspect, we did what we were asked20:42
rharperchrony service it self can't start for it's one restrictions20:42
rharperI mean, it's not really any different than ntpd, which runs but cannot adjust the clock without capabilities20:42
rharperchrony has a track time but don't adjust the system time mode; however, in unpriv container, it still wants to drop root privs, but that's a restricted capability so it can't do that20:43
powersjthen for the test validate the config and move on?20:43
rharperwell, do we do different tests on kvm vs lxd ?20:43
rharperI need to run in a vm and see if I can get them to dump out any information anyhow20:44
rharpersystemd packages are notorious for not saying anything about their config20:44
rharperthe timedatectl --status shows NTP Sync=Yes20:44
rharperthat's it20:44
rharperthanks20:44
powersjand we do not run different tests for kvm vs lxd20:45
rharperwell, crud20:47
blackboxswrharper: I have an example  started20:53
blackboxswfor the snap testing20:54
blackboxswas snap on container requires squashfuse20:54
blackboxswand non-container doesn't20:54
blackboxswour cloud_tests need to provide that platform information to the individual unit tests20:54
rharperwell, the thing is, I'm not really ok running priv container trying to sync time20:54
rharperI think we need a way to skip tests on certain platforms20:55
rharperif that's not there20:55
rharperso, we'll collect the data, then run the verify on it; if it knows that it was collected on a particular platform we could raise SkipTest where we know it won't be accurate20:56
blackboxswrharper: it's not, but I agree we do need a skiptest decorator that chan check platform details21:04
rharperwell21:08
rharperguess who get's to poke at that21:08
rharperbut not in the initial branch21:08
* rharper is going to push that up for review shortly 21:08
smoserrharper: i think that cloud-init does what it was told21:24
rharperyeah21:25
smoserif that means installing a servie that will fail to start21:25
smoserthen we still did what we were told21:25
rharperI agree; I'm mostly concerned about trying to verify if our template is correct21:25
smoserits kind of over-zealous to have a service that simply says "i dont run in a container"21:25
rharperwe had that ntp bug about not having config on disk prior to install and restarting the daemon; we do those things now21:25
rharperbut our template could still be broken21:25
smoserbaking in assumption that the system clock is not namespaced21:26
rharpersmoser: yes, systemd is obnoxious  =)21:26
smoseror the container platform doesnt provide some psuedo mechanism for that.21:26
rharpera day hasn't gone by where i"m not swearing at something packaged in systemd, so no change there21:26
rharperI suspect we didn't add an integration test for UbuntuCore which used the timesyncd path, or we'd see this (ie, we configure it, but have no way of verifying it uses the servers) since timedatectl doesn't emit useful information other than 'ntp sync=Yes' if it's synced21:27
rharperI do think we can run this in KVM and at least for some clients (ntp, at least, possibly chrony) as the daemon for what servers it connected with ; and validate that matches what we configured ; I'll play with chrony in a VM21:28
blkaddersystemd is love.21:33
rharpersaid no one ever21:33
blkadder:-)21:33
rharperuntil *now*21:33
blkadderStill amazed at how quickly it got pushed through.21:34
blkadderBut I just try to hold my nose and focus on other things. :-)21:35
* blkadder eagerly awaits the LinuxRegistry21:35
smoserrharper: do you remember the bug where cloud-init was hanging tdue to /dev/random / kernel-config missing some options ?21:36
smosercan't find it21:36
smosercyphermox i think you filed ?21:36
rharpersmoser: yes21:36
rharperhttps://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/172735821:37
ubot5`Ubuntu bug 1727358 in python3.6 (Ubuntu) "cloud-init is slow to complete init on minimized images" [Wishlist,Triaged]21:37
rharpersmoser: lol, I know where you're going21:37
dpb1rharper: blkadder: I ordered this shirt for you both: https://goo.gl/hzFdR321:40
blkadderHAHAHA21:40
rharper(╯°□°)╯︵ ┻━┻21:40
rharperdpb1: just you wait dpb121:40
blkadderIs there an option to order one bathed in tears?21:41
dpb1I think they come with a first aid kit for all the fights you will get in after putting it on.21:43
blackboxswnerd fights, I think there is an ESPN channel with that kinda action23:05
blackboxswhrm one last manual test for ubuntu SRU https://pad.lv/#173186823:07
blackboxswor rather bug #173186823:07
ubot5`bug 1731868 in cloud-init (Ubuntu) "cloud-id: enable ESXi 6.5.0" [High,Fix released] https://launchpad.net/bugs/173186823:07
blackboxswI can upgrade my vphere bootstrapped env w/ latest cloud-init and the ds-identify warning is gone... but not sure if there is an easier test for that.23:08

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