/srv/irclogs.ubuntu.com/2017/06/20/#cloud-init.txt

dgarstangTrying to write a file with write_files... data in file comes out as garbage... Help00:05
=== X-Istence is now known as x58
dgarstangTrying to write a file with write_files... data in file comes out as garbage... Help00:19
dgarstangTrying to write a file with write_files... data in file comes out as garbage... Help00:29
powersjdgarstang: I'm out of the day, but if you could post your cloud-config or give me something to reproduce that would be best00:51
dgarstangpowersj: Seems like you MUST encode b64 or gzip01:07
prometheanfiresecurity updates dontchaknow03:02
=== frickler_ is now known as frickler
=== telling_ is now known as telling
=== sambetts_ is now known as sambetts
=== rangerpbzzzz is now known as rangerpb
dgarstangAnyone awake?15:53
dpb1Zzzzzz.15:53
dgarstangI'm using write_files with content: content: {"chef_org":"foo_eu","chef_run_list":"role[\"eu-base\"],role[\"bastion-host\"]","chef_server":"chef.eu-infra.local","dns_domain":"eu-infra.local","service":"bastion"} ... However in the file all the double quotes have been replaced by single quotes. :(15:54
powersjdgarstang: first, it seems you figured out how to include content versus a blob or encoded text, is that correct?16:02
powersjhere is an example I just ran with json as content: https://paste.ubuntu.com/24908960/16:03
powersjmake sure you have the '|' character before your content16:04
rharperdgarstang: you probably want to use the content: |  to have direct content quoting, like so:  http://paste.ubuntu.com/24908978/16:06
rharperdgarstang: you can also play with cloud-init in single mode to make sure it's writing what you want (without launching a new instance)16:07
dgarstangrharper: yep, worked that out... thanks. had to use |16:43
rharperdgarstang: great!16:43
dgarstangbtw... single mode?16:44
=== sambetts is now known as sambetts|afk
rharperthat just runs a single cc_module16:46
rharperI find it useful for testing out user-data that applies for various modules16:46
dgarstangoic16:47
dgarstangCan I split runcmd over multiple lines?17:07
rharperruncmd is a list of commands, in general, for a multi-line shell, you'll need to collapse that into a single line using shell statement separators (like semi-colon)  - "if grep -q foo /bar; then echo 'wark'; else echo 'no wark'; fi"17:57
dgarstangrharper: yeah but what if one of those commands between ; and ; is longer than a line?19:25
=== rangerpb is now known as rangerpbzzzz
powersjrharper: 1687712 - I tried that one, but was unable to fully verify it23:01
rharperpowersj: ok, any details or did the sru test case just fail ? paste of outputs?23:10
rharperbug 168771223:10
ubot5`bug 1687712 in cloud-init "cc_disk_setup: fs_setup with cmd doesn't work" [Medium,Confirmed] https://launchpad.net/bugs/168771223:10
powersjsee my last comment in the bug23:10
rharperpowersj: do you have the instance still up ?23:12
rharpercan you see if the mkfs command ran at all ? I suppose23:13
powersjrharper: I do not, trying to finish LP: 1692087 before end of the day23:13
ubot5`Launchpad bug 1692087 in cloud-init (Ubuntu Zesty) "check_partition_layout has false positives when partitioned with gpt" [Medium,Fix committed] https://launchpad.net/bugs/169208723:13
powersjrharper: what's best way to determine that?23:13
rharperheh23:13
rharperoh, well, if mkfs ran you should see a subP command output in cloud-init.log23:14
powersjfor example, I even tried running the command by hand and got the disk to show up under /dev/disk/by-label23:14
powersjah23:14
rharperalso, you can do a dumpe2fs on /dev/sdc1 to see if has a fs on it (or even blkid on it)23:14
rharperI worry that /dev/sdc1 wouldn't exist for the fs_ command to do anything23:14
powersjok I'll jot that down for tomorrow, I can try again for you23:14
rharperI think sdb1 might already come partitions23:14
rharperok23:14
powersjin azure, sdb is that tmp disk right?23:14
rharpersomething like that23:15
rharperephemeral storage23:15
powersjI wasn't going to use that and was trying to use an attached storage disk23:15
rharperyou could also test with /dev/sdc23:16
rharperwhich wouldn't require partitioning23:16
rharperyou can put a fs on a raw device23:16

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