/srv/irclogs.ubuntu.com/2018/02/08/#juju-dev.txt

jamzeestrat: hi, I'm John from the bug list, and just wanted to reach out about your upgrade issues.04:02
zeestratjam: hey John. Thanks for reaching out. How can I help.05:54
jamzeestrat: hi. If you can describe the steps you do to reproduce it, ideally we'd get a local reproduction and then be able to fold it into our ongoing testing infrastructure06:31
zeestratjam: all the steps are in the bug besides the bundle and maas setup. You want those too?06:39
=== frankban|afk is now known as frankban
zeestratHey folks, does juju support upgrading straight from 2.1.2 to 2.3.2 by setting --agent-version, or does it only support step-wise upgrades such as 2.1.2 -> 2.2.x -> 2.3.x?13:59
rick_hzeestrat: go in one jump14:01
zeestratrick_h: Thanks. Not working too great here in staging on MAAS and LXD when upgrading HA controllers. Let me do my homework and make sure I can reproduce it before I bother y'all more.14:05
rick_hzeestrat: ok, yea let us know. I know we agreed long ago that going step by step was madness14:05
zeestratrick_h: Cool. Nice opportunity to test out that snippet of yours to build 2.1.2 :)14:08
rick_hzeestrat: :) but also might try that snap route cory_fu mentioned at the end there14:09
rick_hmight be fewer steps but haven't tried it yet14:09
zeestratYeah, that sounded very nice.14:10
ryebothml expected to be around today?16:42
ryebothml o/16:48
ryebotthanks for your help yesterday16:48
hmlryebot: so it worked?16:49
ryebothml partly! 2.3.1 controller was part of my problem16:49
ryebotI can get packages to work now :)16:49
ryebothere's what I'm hitting now: https://gist.github.com/wwwtyro/6afde641c5c3db038b6b28106345251a16:49
hmlryebot: i’ll have to double check and maybe adjust some data, i thought that all of the code was in 2.3.116:49
ryebothml: sounds good; packages was just a test for me though, if that makes a difference. What I'm really driving towards is ca-certs.16:51
hmlryebot: hmm…16:51
hmlryebot: can you ssh to the machine?16:51
ryebothml the one stuck in pending?16:51
ryebothml or the controller?16:52
hmlryebot: brain fart, sorry, i doubt it’s up.16:52
ryebotnp16:52
hmlryebot: let me look at something.16:52
ryebothml great, thanks!16:52
hmlryebot: i had a heck of a time getting the darn yaml files correct when working on this.  :-/16:53
ryebothml: yeah, I'm hoping I'm just getting the yaml wrong. it does seem pretty persnickety.16:53
hmlryebot: trying to reproduce, you’re at juju 2.3.2 and the new machines are using xenial correct?16:57
ryebothml: yes16:57
hmlryebot: I was able to reproduce, now to find out why :-)17:02
ryebothml: awesome thankyou. if it's the yaml, let's fork juju and do everything in http://haml.info :D17:03
hmlha17:03
hmlryebot: part of the challenge here, is that we’re reading the yaml is as a string, then converting to yaml later.17:17
ryebotalright17:18
ryebothml: if it helps, here's one way I validated that yaml: https://gist.github.com/wwwtyro/38a5d94179fa31fd2c54a54f652260c217:21
hmlryebot: I think I have the config.yaml correct… but something isn’t working as expected17:22
ryebothml: I hear you. really glad I don't have to deal with yaml and a static language!17:23
* ryebot shivers17:23
hmlryebot: small progress, https://paste.ubuntu.com/26542164/, this at least gets by the EOF failure… but the write_files doesn’t happen… not sure about the ca-certs, though both end up in ls /var/lib/cloud/instance/user-data.txt.i17:31
ryebot\o/17:31
hmlryebot: the two packages do get installed, so half battle perhaps?17:31
hmlDmitrii-Sh: ping17:31
Dmitrii-Shhml: 117:32
ryebothml yeah this looks promising :)17:32
hmlDmitrii-Sh: have you had good luck formating the config.yaml for cloudinit-userdata?  ryebot  is having fun trying to get ca-certs formatted for that model-config var17:33
Dmitrii-Shcat userdata.yaml17:34
Dmitrii-Shcloudinit-userdata: |17:34
Dmitrii-Sh  apt_proxy: http://10.10.10.88:312817:34
Dmitrii-Shjuju model-config userdata.yaml17:34
Dmitrii-Shit works like that17:34
Dmitrii-Shas a PoC17:34
Dmitrii-Shhaven't tried certs though17:34
hmlDmitrii-Sh: we’ve gotten a few easy things working, but ca-certs were giving and EOF17:34
hmland wouldn’t provision17:34
Dmitrii-Shhmm, let me check some yaml example I had for bundles17:35
Dmitrii-Shhttps://gist.github.com/dshcherb/a5f8dd27af74b38d483c1715994caed317:35
hmlDmitrii-Sh: i think the challenge is formatting the yaml such that juju can read as a string, then, spit back out as yaml17:36
Dmitrii-Shhml: try the install-keys example from the gist above17:36
=== frankban is now known as frankban|afk
hmlDmitrii-Sh: that doesn’t work,17:41
Dmitrii-Shhml: hmm17:41
Dmitrii-Shhml: could also try17:42
Dmitrii-Shhttps://www.irccloud.com/pastebin/Rf96y0FC/17:42
hmlDmitrii-Sh:  the contents of cloudinit-userdata isn’t real yaml to juju, it’s a string….17:42
Dmitrii-Shhml: this should be treated as a multi-line string17:42
Dmitrii-Shwell, at least by a yaml parser17:43
hmlDmitrii-Sh: that’s the problem, it’s not seen by a yaml parser first17:43
hmlDmitrii-Sh: I got it to work by adding a | to “variables: |”17:43
hmlDmitrii-Sh: where can i verify the installed key on the new machine?17:44
Dmitrii-Shhml: just a CA cert or a gpg key?17:44
hmlgpg key?17:45
Dmitrii-Shfor packages17:46
Dmitrii-ShI think you are talking about ca certs though17:46
Dmitrii-ShI'll create a gist17:46
hmlwhat ever was done by adding the variable: thing   :-)17:46
Dmitrii-Shah, wait17:47
Dmitrii-Shhml: let me give you a better example17:47
Dmitrii-Shthose were not for cloud-init - just yaml examples with complex content17:47
Dmitrii-Shhml: https://gist.github.com/dshcherb/c03d080f9f721d16050a65210f3a05e2 - first, this17:49
Dmitrii-Shhml: /etc/ssl/certs mainly17:49
hmlDmitrii-Sh: k - thx17:49
Dmitrii-Shhml: http://cloudinit.readthedocs.io/en/latest/topics/examples.html#configure-an-instances-trusted-ca-certificates17:50
Dmitrii-Shand this is for ca certs17:50
Dmitrii-Shhml: another example is pgp keys for apt packages: http://cloudinit.readthedocs.io/en/latest/topics/modules.html http://cloudinit.readthedocs.io/en/latest/topics/examples.html?highlight=pgp#install-and-run-chef-recipes17:51
ryebothml I'm starting to suspect some copy paste character encoding mistake on my part17:51
ryebotI have what appears to be two identical bodies of text, one works and one doesn't17:52
ryebotstill investigating17:52
hmlryebot: it’s tricky17:52
hmlryebot: we may be able to make it simplier in the near future17:52
Dmitrii-Shhml, ryebot: I think it's safe to assume that we need to treat this option as yaml, parse it, do a transformation for pre- and post- and then render that as yaml again17:55
Dmitrii-Shthat way we can also validate that this is valid yaml17:55
ryebothml ah, here's the diff between yours and mine: line 10 from your paste has a | that maybe shouldn't be there?17:56
hmlryebot: i think it has to be…17:56
hmlryebot: but try without.17:56
hmlDmitrii-Sh: it’s yaml, but that yaml must be read as a string…. no so straight forward17:57
ryebothml I did, which is when I get the eof - wait, are you saying ca-certs is also a string that is converted to yaml?17:57
ryebotahhhh17:57
ryebotsorry, a little slow on the uptake there17:57
ryebotokay, I think I finally get this :)17:57
hmlryebot: everything after “cloudinit-userdata:” Is read as a string, that we parse to yaml17:57
hmlit’s confusing,17:58
hmlso some yaml works, some doesn’t depending on whether juju can’t read it all as 1 string17:58
hmla pita17:58
Dmitrii-Shhml: ah, right. So if you have config.yaml that option is then nested yaml17:58
Dmitrii-Shread config.yaml, parse it, read that option, parse it as yaml17:59
ryebotexcept for some, like packages, which is processed elsewhere?17:59
hmlDmitrii-Sh: yes - though everything after the key is read as a string…. not yaml, it’s a string that’s parsed to yaml later17:59
Dmitrii-Shhml: I think I used it somewhere like that18:00
Dmitrii-Shwell, in LXD18:00
Dmitrii-Shfor user-data it's the same problem18:00
hmlryebot: not sure what you’re asking18:00
ryebothml for example in your paste, packages is presented as a raw list (it's not packages: |)18:01
Dmitrii-Shhere's an example of nested yaml, albeit simple https://dshcherb.github.io/2017/12/04/qemu-kvm-virtual-machines-in-unprivileged-lxd.html#breaking-ground18:01
Dmitrii-Shuser.user-data option18:02
hmlryebot: i’m not sure why it works, but it does… from packages to the end of the file is read as 1 string18:02
hmlryebot: the glories of yaml perhaps?  :-)18:02
ryebothahaha18:02
ryebotalright, I'm gonna try again with this new information - thanks!18:03
ryebothml: https://paste.ubuntu.com/26542336/ line 23, gets passed in as a string and not yaml18:07
ryebotresults in traceback on line 630 here: https://paste.ubuntu.com/26542344/18:09
* ryebot snaps fingers18:09
hmlryebot: there’s a trick to using the pipe, i’m just not sure of the rules18:19
ryebothml: I think I'm going to throw in the towel for now. I've opened a bug here: https://bugs.launchpad.net/juju/+bug/174828319:56
mupBug #1748283: Unable to pass ca-certs field in cloudinit-userdata model config <juju:New> <https://launchpad.net/bugs/1748283>19:56
ryebothml: thanks for looking at that with me!19:56
hmlryebot: k19:57
thumpermorning20:01
thumperhml: wanna chat about that?20:02
thumperhml: there is a function we probably need to use :)20:02
hmlthumper: sure20:06
thumperhml: 1:1 HO20:06
hmlthumper: omw20:06
zeestratrick_h: here's that upgrade issue in case you'd like to give it a spin yourself. #174829420:55
mupBug #1748294: juju-upgrade from 2.1.2 to 2.3.2 fails <juju:New> <https://launchpad.net/bugs/1748294>20:55
hmlthumper: you called it, ConformYAML did it - and ca-certs were good on the other end too .  TY.  :-)21:30
thumpersweet21:35
hmlsmall PR review anyone?  https://github.com/juju/juju/pull/835422:44

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