[00:05] <dgarstang> Trying to write a file with write_files... data in file comes out as garbage... Help
[00:19] <dgarstang> Trying to write a file with write_files... data in file comes out as garbage... Help
[00:29] <dgarstang> Trying to write a file with write_files... data in file comes out as garbage... Help
[00:51] <powersj> dgarstang: I'm out of the day, but if you could post your cloud-config or give me something to reproduce that would be best
[01:07] <dgarstang> powersj: Seems like you MUST encode b64 or gzip
[03:02] <prometheanfire> security updates dontchaknow
[15:53] <dgarstang> Anyone awake?
[15:53] <dpb1> Zzzzzz.
[15:54] <dgarstang> I'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. :(
[16:02] <powersj> dgarstang: first, it seems you figured out how to include content versus a blob or encoded text, is that correct?
[16:03] <powersj> here is an example I just ran with json as content: https://paste.ubuntu.com/24908960/
[16:04] <powersj> make sure you have the '|' character before your content
[16:06] <rharper> dgarstang: you probably want to use the content: |  to have direct content quoting, like so:  http://paste.ubuntu.com/24908978/
[16:07] <rharper> dgarstang: 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:43] <dgarstang> rharper: yep, worked that out... thanks. had to use |
[16:43] <rharper> dgarstang: great!
[16:44] <dgarstang> btw... single mode?
[16:46] <rharper> that just runs a single cc_module
[16:46] <rharper> I find it useful for testing out user-data that applies for various modules
[16:47] <dgarstang> oic
[17:07] <dgarstang> Can I split runcmd over multiple lines?
[17:57] <rharper> runcmd 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"
[19:25] <dgarstang> rharper: yeah but what if one of those commands between ; and ; is longer than a line?
[23:01] <powersj> rharper: 1687712 - I tried that one, but was unable to fully verify it
[23:10] <rharper> powersj: ok, any details or did the sru test case just fail ? paste of outputs?
[23:10] <rharper> bug 1687712
[23:10] <ubot5`> bug 1687712 in cloud-init "cc_disk_setup: fs_setup with cmd doesn't work" [Medium,Confirmed] https://launchpad.net/bugs/1687712
[23:10] <powersj> see my last comment in the bug
[23:12] <rharper> powersj: do you have the instance still up ?
[23:13] <rharper> can you see if the mkfs command ran at all ? I suppose
[23:13] <powersj> rharper: I do not, trying to finish LP: 1692087 before end of the day
[23: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/1692087
[23:13] <powersj> rharper: what's best way to determine that?
[23:13] <rharper> heh
[23:14] <rharper> oh, well, if mkfs ran you should see a subP command output in cloud-init.log
[23:14] <powersj> for example, I even tried running the command by hand and got the disk to show up under /dev/disk/by-label
[23:14] <powersj> ah
[23:14] <rharper> also, you can do a dumpe2fs on /dev/sdc1 to see if has a fs on it (or even blkid on it)
[23:14] <rharper> I worry that /dev/sdc1 wouldn't exist for the fs_ command to do anything
[23:14] <powersj> ok I'll jot that down for tomorrow, I can try again for you
[23:14] <rharper> I think sdb1 might already come partitions
[23:14] <rharper> ok
[23:14] <powersj> in azure, sdb is that tmp disk right?
[23:15] <rharper> something like that
[23:15] <rharper> ephemeral storage
[23:15] <powersj> I wasn't going to use that and was trying to use an attached storage disk
[23:16] <rharper> you could also test with /dev/sdc
[23:16] <rharper> which wouldn't require partitioning
[23:16] <rharper> you can put a fs on a raw device