/srv/irclogs.ubuntu.com/2016/08/29/#juju.txt

PCdudehttp://askubuntu.com/questions/817572/openstack-fails-to-install-caused-by-juju06:41
=== simon1 is now known as SimonKLB
=== frankban|afk is now known as frankban
kjackalHello Juju world09:01
magicaltrouthey kjackal09:02
kjackalHi magicaltrout!09:03
PCdudehey kjackal  and magicaltrout09:16
PCdudeI have a problem with JUJU and openstack09:18
PCdudehere is the question09:18
PCdudehttp://askubuntu.com/questions/817572/openstack-fails-to-install-caused-by-juju09:18
kjackalHi PCdude09:19
magicaltroutblimey09:20
magicaltroutthat only took 15 hours09:20
magicaltroutfinally got maas 2.0 to pxe boot on bloody virtualbox09:20
PCdudeany idea on how to fix it?09:21
kjackalPCdude: Unfortunately not, but I would suggest you try #openstack-charms09:22
magicaltroutyeah i've never used openstack i'm afraid09:22
kjackalthe people at #openstack-charms might be able to help you09:22
kjackaladmcleod_: are you there?09:22
admcleod_yes09:23
admcleod_kjackal: hello09:24
kjackaladmcleod_: you might have an idea about http://askubuntu.com/questions/817572/openstack-fails-to-install-caused-by-juju09:25
admcleod_kjackal: PCdude unfortunately i dont know anything about conjure-up - but that error makes me think perhaps there is a lib mismatch or something.09:25
admcleod_the first error anyway, the second look like a hardware problem09:26
admcleod_...although fd0 is probably floppy disk? so perhaps its just complaining because theres a virtual floppy device attache09:27
admcleod_d09:27
admcleod_*guessing*09:27
PCdudeadmcleod_:  yeah, I thought about the floppy disk too, but the weird part is that there is no floppy disk turned on in the bios and also there is no floppy disk added in the VM of the node09:29
admcleod_PCdude: weird. well, maybe that can be ignored - it looks like other people have had the first issue too09:30
PCdudewhat u mean "other people", is this a know issue?09:30
admcleod_PCdude: it looks like it, i googled the error and i see other people have reported it recently09:31
PCdudeadmcleod_:  I have tried different fora and sended a bug report to JUJU, so I think u are looking at my post :) maybe u can share the link?09:32
admcleod_PCdude: e.g. http://askubuntu.com/questions/808372/ubuntu-server-16-04-openstack-mitaka-installation-juju-error/81339509:33
admcleod_PCdude: perhaps try the suggestions at the bottom of that link? let us know if that helps09:34
PCdudethat is not me, but thanks for the link, I am gonna try that, I will let u know admcleod_09:35
admcleod_magicaltrout: you at the new job yet? or are you still on earth09:42
admcleod_PCdude: im hopeful..:)09:42
magicaltroutadmcleod_: hehe09:44
magicaltrouti'm on the next ship out of here09:44
magicaltroutalthough today i'm working on my presentation for MesosCon on Wednesday09:45
magicaltroutlearning MAAS in a hurry09:45
admcleod_colorado?09:45
magicaltroutAmsterdam09:46
magicaltroutAmsterdam on Wednesday, Bluefin for a Pentaho thing on Thursday, back for a week, then Pasadena for Juju Summit & working the following week @ JPL09:46
admcleod_oh yeah cool09:47
PCdudemagicaltrout:  , where are u from?09:47
magicaltroutGood question PCdude09:47
admcleod_ill be at pasadena - ill bring some cheese chocolate09:47
magicaltroutI can tell you I live outside London currently09:47
magicaltroutadmcleod_: i look forward to not bumping into you then09:47
PCdudemagicaltrout: ah ok, cool! I live a little to the east of u then :)09:48
magicaltroutwhere you based PCdude ?09:48
PCdudenot amsterdam, but close09:48
magicaltroutbeen a few years since I was last in Holland, shame its a flying (no pun intended) visit09:49
admcleod_magicaltrout: aww :)09:49
PCdudehow old are u magicaltrout ?09:50
magicaltroutwell yesterday I thought I was 3409:51
magicaltroutthe mrs had to correct me09:51
admcleod_magicaltrout: so you're not 34, you're a messy idiot?09:51
admcleod_:D09:52
PCdudehaha, 21 here09:52
magicaltrout2109:52
magicaltroutmakes me feel old09:52
PCdudeand admcleod_ how old are u?09:52
PCdudeu are old magicaltrout ;)09:52
admcleod_36 i think09:52
magicaltroutyou'd never guess with his bald head09:52
admcleod_haha09:52
PCdudeI think?! haha09:53
admcleod_yeah, i look about 5009:53
admcleod_i stopped counting aftr 30 because i felt like id clocked the game09:53
admcleod_now every year is just a step closer to death.09:53
admcleod_;]09:53
PCdudewoah, the best had yet to come :)09:53
magicaltroutevery day09:53
magicaltroutnot every year09:53
admcleod_you younuns and your days09:54
admcleod_younguns09:54
PCdudewell, I tried both options of the link admcleod_ , no luck so far...09:54
PCdudestupid openstack09:55
admcleod_PCdude: ok - if you stay in openstack-charms then someone who can help should be along soon09:55
magicaltroutdon't use it09:55
magicaltroutits not the law ;)09:55
PCdudeadmcleod_:  I will09:55
PCdudemagicaltrout:  , yeah well the whole landscape idea sounded really good to me, and what are the alternatives?09:56
magicaltroutwhat you trying to acheive PCdude ?09:56
PCdudeI really wanna build a private cloud, with several servers. storage node, network node, provisioning09:57
PCdudebasically a private version of amazon aws09:58
PCdudeI know its a big plan, but I do not care :)09:58
magicaltroutfair enough, go wild then! :)09:59
PCdudebut yeah, are there other options than openstack10:00
PCdude?10:00
PCdudeand I am still a student, so I dont have 1000 dollars a month laying around10:00
admcleod_PCdude: can you pastebin your juju accounts.yaml? (without passwords)10:01
PCdudeadmcleod_:  , sure one moment10:01
magicaltroutwell it still depends on what you're trying to do. Learn cloud computing? then use Openstack. Create a private cloud for development? Maybe there is a different way of doing stuff outside of a private cloud10:01
PCdudeadmcleod_:  http://pastebin.com/auGcqBiM10:05
PCdudewith of course, the maas key and password included in the real file10:06
PCdudemagicaltrout:  , learning for sure, development as in for programming projects? or as in development of a private cloud?10:07
admcleod_PCdude: so, i think thats missing some stuff ...10:09
admcleod_PCdude: and im not sure what conjur-up is supposed to add10:09
PCdudeadmcleod_:  ok, hit me, what should I add?10:09
PCdudeadmcleod_:  conjure-up is what is supposed to be used when installing openstack on 16.04 and higher10:10
PCdudebefore that, someone could issue "sudo openstack-install"10:10
admcleod_PCdude: i mean, i dont know if conjure-up should be adding this extra configuration that should be there or not10:10
PCdudeconjure-up (according to some stackexchange users) should give more freedom10:10
admcleod_PCdude: i would say, just to check that the juju install is ok, try https://jujucharms.com/docs/stable/getting-started10:11
PCdudeadmcleod_:  uhm, good idea  I think10:11
PCdudeadmcleod_:  , I fucked up this VM now anyway, so I think I need to start over to avoid some weird errors, I tried to fix the python error myself, without any luck10:12
admcleod_PCdude: right ok so starting from scratch sounds like a good idea10:13
admcleod_PCdude: verify juju, and then maybe someone will have a response to the specific error10:13
PCdudeadmcleod_:  btw, a little offtopic, but do u know some simple program to make an unattended version of ubuntu 16.04 for install?10:13
PCdudeits just for some simple stuff, so I dont need a whole server with puppet or FIA10:14
admcleod_PCdude: preseed?10:14
admcleod_PCdude: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt < something like that?10:14
PCdudeadmcleod_:  I did find some old posts yesterday, but was not sure if that was still the way to go in 2016 with ubuntu 16.0410:15
PCdudeadmcleod_:  I will look into preseed10:17
admcleod_PCdude: that one is for xenial - it basically provides answers to the normal installation prompts10:18
PCdudeadmcleod_:  and how do I add it to the install?10:18
PCdudethe iso I mean10:18
admcleod_PCdude: you would need to mount the iso as an fs, add the file, rewrite the iso..10:22
magicaltroutadmcleod_: you'll know this, if I juju deploy onto maas, does it install onto the bare metal? or in a lxc container?10:24
admcleod_PCdude: perhaps its better to ask that in #ubuntu though, maybe there is a better way10:24
PCdudemagicaltrout:  on bare metal10:25
admcleod_magicaltrout: if you just 'juju deploy ubuntu' itll deploy it to bare metal, if you 'juju deploy ubuntu --to lxc:machine#' then lxc10:25
magicaltroutcool I need the baremetal scenario just checkin10:25
magicaltroutg10:25
PCdudeadmcleod_:  yeah, will try that, I find a ton of options u have to go around this "problem" so maybe there are some simple GUI versions even I dont know10:26
rock_Hi.  I did juju deploy openstack on LXD using  https://github.com/openstack-charmers/openstack-on-lxd.   Bymistake I did  #juju logout --force. Now I am not able to see $juju status.12:43
rock_How can I login back? I tried #juju login. But it was asking username and password. We last password. It was not showing anything in accounts.yaml. How can I achieve my previous status?12:45
rock_please help me in this12:45
rts-sanderjuju logout --force by mistake?12:56
rock_rts-sander12:59
rock_rts-sander: Yes12:59
=== dpm is now known as dpm-afk
rock_rts-sander: do you know how to solve? please tell me13:02
magicaltroutcmars: ping13:25
cmarsmagicaltrout, hi13:25
magicaltrouthi cmars, I'm trying to ascertain the difference between your two nagios interfaces13:26
magicaltroutcan you shed any light?13:26
cmarsmagicaltrout, local_monitors vs nrpe_external_master?13:26
magicaltroutyeah. if my charm wanted to run an nrpe script, which do I pick? :)13:26
magicaltroutmy gut says local_monitors, but I'm just guessing ;)13:28
cmarsmagicaltrout, well, they're basically the same content-wise. the local-monitors interface is useful if you want to deploy nagios into the same model and relate the nrpe subordinate to it13:28
magicaltroutah, now i see what you mean by external master13:28
cmarsmagicaltrout, so i typically use this to test our nagios integration, for internal deploys at work13:29
cmarsmagicaltrout, when we go to production, we use nrpe-external-master13:29
magicaltroutcool, now it makes sense :)13:29
cmarsmagicaltrout, i've also noticed a layer:nrpe written more recently, this might be useful as well. haven't tried it yet, but it looks interesting13:30
cmarsi think it may take a different approach13:30
=== dpm-afk is now known as dpm
stubmagicaltrout, cmars : I was putting together https://launchpad.net/nagios-layer so everyone could share the same boilerplate13:41
cmarsstub, awesome!13:42
jcastro_marcoceppi: can you help out with this one? Kind of complex http://askubuntu.com/questions/817399/juju-charms-related-to-etsi-osm-mano-nfv-deployment/817449#81744913:43
beisnerhi rock, so to recap:  you did a deploy with the lxd provider, and that worked ok.  then after a juju logoff, you're wondering how to re-auth so you can interact with the model again.  is that right?13:52
beisnerhi rock_ - so you have a charm that you've authored, or are planning to author, and you're wondering how to get it into the charm store as a recommended (official) charm?  is that what you mean by certified?13:53
magicaltroutlazyPower: ping13:54
lazyPowermagicaltrout pong13:54
magicaltroutah hello there13:54
magicaltroutprepping for wednesday13:54
magicaltroutquick question13:54
rock_beisner : Yes.13:54
magicaltroutif is possible to use layer-docker without installing docker?13:54
magicaltroutI would like to provide docker.available13:55
magicaltrouti guess the actual question is, is there an interface instead? : )13:57
beisnerhi rock_ - i'm not sure that is recoverable (or if so, how).  based on the output of `juju logout` without force, in an identical use case, i would believe that there is an autogenerated initial password that is expected to be changed by the user before logging out.  ex:  http://pastebin.ubuntu.com/23107425/13:57
lazyPowermagicaltrout https://github.com/juju-solutions/layer-docker/blob/master/layer.yaml13:58
lazyPowerin your inhereting layer, override skip-install to be true. you get docker.available without the delivery bits13:58
magicaltroutnice13:58
magicaltrouti can just put hte same config in my layer.yaml right?13:59
lazyPowermagicaltrout https://github.com/juju-solutions/layer-basic#layer-configuration13:59
lazyPowererr14:00
lazyPowerhttps://github.com/juju-solutions/layer-basic#layer-options14:00
lazyPowermagicaltrout ^14:00
magicaltroutta14:00
rts-sanderis there some kind of minimal example of a charm making a call to the juju API?14:02
marcoceppicharms don'14:03
marcoceppirts-sander: charms don't usually make calls to the juju API14:03
marcoceppirts-sander: outside of the hook tools14:03
marcoceppirts-sander: what kind of call are you looking to make?14:03
rts-sanderI want the charm to scale itself14:03
rts-sanderso add-unit in this case14:03
marcoceppirts-sander: ah, I see14:03
andrey-mpmarcoceppi: hi, I've asked you about mysql charm for 16.04 and I see that it's not ready yet. But what is the way to install OpenStack to 16.04 now?14:05
rock_beisner: OK. But all container are in persistent state. I ran  #lxc list    . Can we manage all these containers with a newly bootstrapped controller?14:05
shruthimahi petevg/kevin , may i know ibm-http charm review process status ?14:09
petevgkwmonroe ^^ it looks like our notes on it are blank. Is that the one where we were missing some files from the ftp site?14:12
magicaltroutlazyPower: Unable to load tactics.docker.DockerWheelhouseTactic from /home/bugg/Projects/dcos-master14:14
lazyPowermagicaltrout - are you running the latest charm-tools?14:14
magicaltroutdunno14:14
magicaltrout2.1.214:15
rock_andrey-mp: Hi. You can use  https://github.com/openstack-charmers/openstack-on-lxd. All in one deployment on VM.14:16
lazyPowermarcoceppi - can you confirm/deny if the apt packaged tooling has the wheelhouse fix?14:16
lazyPowermagicaltrout - give me 10 to do some investigation14:18
magicaltroutsure14:18
andrey-mprock_: these bundles contain 'charm: cs:xenial/percona-cluster' for mysql )14:19
rts-sanderI know juju-gui makes calls to the API but it's not easy to extract a minimal example from it14:25
rts-sanderthen there's the golang juju/juju/api package but it has minimal documentation and no examples14:25
andrey-mprock_: thank you. it's useful.14:25
lazyPowermagicaltrout - i've just built from layer-docker  in charmbox:latest (which is using 1.25.6 and tooling from apt) - so if you bump your version of charm-tools you should get a clean build. If that's not the case, i'll need the output of dpkg --list | grep charm  so we can poke around. An issue related to your build error was also filed here: https://github.com/juju-solutions/layer-docker/issues/6714:25
shruthimapetevg: if anything is missing from our end on ibm-http charm please let us know.14:29
lazyPowermagicaltrout - marco says "install the snap" alternatively, its also in the devel ppa. ppa:juju/devel14:32
lazyPowerrather ppa:juju/stable (we have no idea where we put things)14:33
petevgshruthima: Sorry about the lack of comment on the PR. It looks like ibm-http is the one that was missing files. We couldn't find the resources mentioned in the README on the ftp site.14:36
petevgshruthima: I'm in a meeting now, but after I'm out, I'll drop a comment on the PR w/ the specifics.14:36
shruthimapetevg: ok thanks14:37
petevgyou're welcome!14:37
=== kirkland` is now known as kirkland
magicaltrouthere's a good dcos reference implementation lazyPower : https://ibin.co/2tFN0mNz6mr5.png15:00
lazyPowermagicaltrout - which charm is missing the icon?15:00
magicaltroutmost of the code doesn't exist yet, but who cares ;)15:00
magicaltroutI borrowed you're docker-nginx charm and hacked it up to do dcos-nginx15:01
lazyPowerright on15:01
magicaltroutso you have your dcos core services, logging and monitoring from logstash and nagios15:01
lazyPowerhense the desire for docker.available :D15:01
magicaltroutthen you can attach docker comntainers15:01
lazyPoweri see, i see.15:01
magicaltroutyeah i didn't use that in the end =/15:01
lazyPowerno worries, options are there :)15:02
magicaltroutI'd like to figure out soem dcos/docker compatible interface15:02
magicaltroutbut that'll have to come later15:02
=== jcastro_ is now known as jcastro
=== frankban is now known as frankban|afk
lazyPowermagicaltrout - last of the refactorings are landing in layer-docker. Give your layers a rebuild and let me know if you encounter any new failures. We circled back and triaged #69/#71 this morning after the reported failures.16:43
lazyPowerjust waiting on this one: https://github.com/juju-solutions/layer-docker/pull/7316:43
cmarsi got an error when trying to build the charm-tools snap: https://paste.ubuntu.com/23108417/18:04
cmarsany ideas how to fix this?18:05
cmarsreason i ask, is i'd like to add the term publishing tools to the snap, but ran into this when i went to build it18:06
* lazyPower looks18:12
lazyPowerthat looks like its pretty new cmars18:12
lazyPowermarcoceppi ^18:12
lazyPowerpyyaml version mismatch that might have been fine last week, but i'm not positive. calling in the author, but we're in standup18:12
cmarslazyPower, marcoceppi thanks. i've opened a bug18:18
marcoceppicmars: weird, I'll push out an update18:31
cmarsmarcoceppi, thanks!18:31
marcoceppicmars: oh, you're trying to build it18:32
cmarsmarcoceppi, yeah, want to test out https://github.com/juju-solutions/charm-pkg/pull/118:32
marcoceppicmars: change master to 2.1 in the charm-tools target18:33
marcoceppicmars: there seems to be no way to twiddle that without editing the file (which is lame)18:34
cmarsmarcoceppi, yeah, it'd be cool if you could interpolate vars in there...18:34
marcoceppitotally18:34
marcoceppicmars: either way, try that18:35
cmarstrying now..18:35
cmarsmarcoceppi, still getting the same error. are you able to build the snap?19:39
=== aisrael is now known as StoneTable
marcoceppicmars: I was a fwe days ago ;)19:48
marcoceppicmars: let me try again19:48
cmarsmarcoceppi, thanks19:48
=== StoneTable is now known as aisrael
marcoceppicmars: I replciated, apparently something is installing 3.12 of PyYAML20:07
marcoceppiugh20:07
cmarsmarcoceppi, ok, thanks for confirming20:08
marcoceppicmars: I just can't replicate it with a regular venv20:08
hatchwhen a layer emits an 'event' how does that event get actually called? say 'nrpe.available' ?20:11
lazyPowerhatch - thats dependent on how the charm author has intended to handle it. If its written for you, search for a @when('nrpe.available') state is being consumed. or @when_any or even a @when_not20:12
marcoceppihatch: that's not an event, that's a state20:12
marcoceppinrpe.available is now, and forever, set until something removes that state20:12
lazyPowerif its an open ended event, meaning we're just saying that some base level function to provide nrpe has been performed (such as a package being installed and default configuration rendered) its now up to you as the next inheriting layer, to decide what that means in the context of your deployment.20:12
hatchI mean, when does the layers framework execute functions decorated with an @whrn?20:12
lazyPoweror as marco said in so many fewer words20:12
marcoceppihatch: it's an event loop20:13
hatchso what triggers the event?20:13
hatchconfig-changed?20:13
marcoceppihatch: so at the end of each loop, reactive evaluates prev states with current states20:13
marcoceppihatch: if there's a mismatch, it'll re-run the loop20:13
hatchor do these @when's have nothing at all to do with the hook system?20:13
marcoceppihatch: so, nrpe.available is set in the nrpe interface layer, typically when the relations is completed20:13
marcoceppihatch: nothing20:13
hatchok and are the @when's executed every time per loop? or only when that state has changed?20:14
hatchdoes the framework have a diffing mechanism?20:14
marcoceppihatch: everytime the when criteria matches20:15
magicaltrouthatch: data_changed() for variable diffing20:15
marcoceppiwhich is why you'll typically see one or more when and when_not statements around a method20:15
hatchmarcoceppi: so in this loop, which executes every Nms it's going to call the functions decorated with @when's20:16
marcoceppihatch: so long as all criteria is met, then yes20:18
hatchI see20:18
marcoceppihooks are just probes to run the reactive framework which combines Juju hook with the set of states/flags set currently20:18
hatchwhats the duration of this event loop?20:18
marcoceppimost reactive/*.py files don't respond to @hook because it doesn't matter that it's install or start20:18
marcoceppihatch: as long as it takes20:19
hatchso, something that's listening on @when('nrpe.available') will also need a @when_not('nrpe.not-available') ?20:19
hatchor...20:20
hatchyou know what I mean20:20
marcoceppihatch: no, because nrpe.available is only set when it's available20:20
hatchbut every loop of the event loop it's going to call that function20:20
marcoceppihatch: however, you might want something like @when('nrpe.available') and @when_not('app.nrpe-configured)20:20
marcoceppiwhere app.nrpe-configured is named appropriately and is set after you do swhat you need to with nrpe20:20
marcoceppithe state declarations are really just to help easily map dependencies of what needs to happen before this method is executed20:21
hatchso how do you create singletons for events? if you only wanted to perform an action once when nrpe.available?20:21
marcoceppihatch: my above example would do just that20:21
hatchok so then @when's are really "gates"20:22
marcoceppihatch: what's the name of the layer20:22
marcoceppihatch: yes20:22
marcoceppithey're conditionals20:22
hatchI see20:22
hatchso you really have to think about how to create a singleton20:22
marcoceppiarbitrary names as well20:22
hatchbecause I can't think of a time when you'd want to spam something every time the loop happens20:22
marcoceppihatch: http://paste.ubuntu.com/23108940/20:23
marcoceppihatch: there are a few instances20:23
marcoceppipor ejemplo20:24
hatchmarcoceppi: so that seems like the default action people would want to do20:26
hatcha 'once'20:26
marcoceppisure, it's one of the many possibilities20:26
marcoceppionce, occasionally, everytime are a few other examples20:26
hatchok, but when would you ever want anything to happen on every event loop?20:26
hatchthat could be hundreds of times per second20:27
marcoceppiupdate-status ?20:27
marcoceppiwell, not nessisiarly20:27
marcoceppievent loop runs every time there's a hook until there are no state changes20:27
marcoceppicould be one time, could be 10020:27
marcoceppibut it's not like a node.js event loop or nginx20:27
hatchok so there IS a direct relation between hooks and events20:27
hatchevents are _not_ executed until a hook is triggered20:28
marcoceppiI think we're overloading event20:28
hatchergo, not a loop20:28
marcoceppithe reactive framework is executed on each hook run20:28
marcoceppi> hooks are just probes to run the reactive framework which combines Juju hook with the set of states/flags set currently20:28
hatchok so let me put an example20:28
hatchI have foo.available , that's 'fired' when my foo service has successfully installed and configured itself - this is a purely remote action, there is no hook fired on my charm. How does it know to execute that foo.available event?20:29
marcoceppistop thinking of states as events20:30
marcoceppistep 1 ^ ;)20:30
hatchok they are states20:30
marcoceppithe only way a state can be set is during a hook20:30
marcoceppiwell20:30
marcoceppi99.99999999% of times a state is set during a hook20:30
marcoceppitechnically you can set states outside of hooks, but no one does that I'm aware of20:31
lazyPowerdespite actions having access to states... thats the other use case i can think of20:31
marcoceppiactions are hooks20:31
lazyPowerbut thats also an anonymous hook context20:31
hatchok so assuming that this remote install and configuarion step is performed when a relation-joined happens. I'd have to block the relation-joined hook from continuing probing the remote service to see if it's done20:31
marcoceppihatch: the relation interface should be the one that does the probing20:31
marcoceppiand it should be the one to set nrpe.available once it's confirmed it20:31
hatchsure, but that is still blocking the relation-joined hook from finishing20:32
marcoceppieither you ahve all the data to complete configuration, or you don't20:32
marcoceppiwhy?20:32
hatchbecause it can't finish the hook until it knows that this remote service is setup so it can set 'available'20:32
marcoceppijust don't set a state and the hook will complete and the next will run20:32
marcoceppilet me back up, are you writing the nrpe interface layer or are you writing somethign that depends on it?20:32
hatchI was just using that as an example, let me simplify this to abstract applications....How does AppA know that AppB is done doing something?20:33
hatchassuming that AppA has to know when AppB is done before setting 'AppB.available'20:33
marcoceppithe interface tells AppA it's available20:33
hatchwhat's in ths interface?20:34
marcoceppihatch: how about an example?20:34
hatchwhat is the interface doing to know this20:34
hatchis AppA blocking a relation hook to poll on AppB20:34
marcoceppihatch: https://github.com/johnsca/juju-relation-mysql/blob/master/requires.py20:34
marcoceppihatch: so you poll, and it fails, then you exit the hook or it succeeds and you set the state20:34
marcoceppior you don't do either, and assert that a completion of relation data required to make the connection is an indication of health for the remote application20:35
hatchright this example you linked is an immediate "oh we connected, we're good" but that's not always the case20:36
marcoceppiand without a sane way in juju to assert health of an application, we have to work off the assumptions that when a relation has sent all required data to make the connection20:36
hatchsometimes available is more than 'relation-joined'20:36
marcoceppihatch: yes, in this case, you sent me /all/ the data I need to make a connection20:36
marcoceppishort of actually logging in which we /could/ do, there's not much else to be done20:36
hatchand the only way to know that is to block a relation hook and poll the remote service20:36
marcoceppithe handshake is complete, and it's availalble because the data has been made available20:36
marcoceppihatch: so poll the remote service20:37
marcoceppiit'll either: fail - not ready or it'll succeed, ready20:37
marcoceppibut if a service is sending over relation data and it's not ready, that's a problem20:37
hatchright20:37
marcoceppithat charm isn't of quality20:37
marcoceppiso sure, you can go above and beyond, but if you expect to have another go at validating that relationship, without proper event modelling of health in juju there's no event that will be tirggered again to re-evaluate that state20:38
hatchthat's fine, I'm just trying to understand the relationship between hooks and states20:38
marcoceppithis is why we have relation-changed, used to update the relation wire and if we withold crucial information like, connection details, until the remote serivce is ready20:38
hatchand without a hook there is no state20:38
marcoceppiwe can use that to key on it being "available"20:38
marcoceppistates are set and evaluated inside of a hook context20:39
marcoceppibut available might mean two diferent things here, available: connection details available and available: service is functioning20:39
hatchright20:39
marcoceppithe former is today, the latter, well, I'd like to have a discussion about at the charmer summit :)20:39
hatchand simply by decorating a function with a state value doesn't mean you're going to be called with that immediately20:39
marcoceppiand how to measure application health with juju20:40
hatcha hook has to be executed to trigger this change20:40
marcoceppiyes20:40
marcoceppifundementally, all juju and charm things are boiled down to "a hook ran"20:40
marcoceppiit's our entry point into the system20:40
hatchand when a state is changed there is a loop which is triggered which is basically a while loop which checks "have any states changed since the last loop"20:41
hatchit's not a never-ending stack20:41
marcoceppiright20:41
marcoceppimaybe one day? but not currently in today's design20:41
marcoceppisince we do still fundementally rely on juju hooks to determine method execution20:42
hatchok now this makes sense20:42
marcoceppicool, we're very much still open to input on different ways of doing things20:42
hatchmarcoceppi: the docs need to be updated then20:43
marcoceppihatch: link me to the mistakes20:43
hatch"States are synthetic events that are defined by the layers author"20:43
hatchhttps://jujucharms.com/docs/stable/developer-layers20:43
marcoceppi"states are synthetic flags that are defined by the layers author and evaluated during hook execution" ?20:43
hatchsure20:43
marcoceppiwould that shape that sentance better?20:43
hatchjust to me an event is something that reacts to changes20:44
marcoceppiyeah, event is totally the wrong wording there20:44
marcoceppiI think some more pictures too, describing this might be helpful20:44
marcoceppiI'll update that for now, thanks for the feedback20:44
BradCrittendenmarcoceppi: why is 'synthetic' necessary?  it seems to just add confusion.20:45
=== BradCrittenden is now known as bac
marcoceppibac: : not sure, it's meant to convey they are arbitrary iirc20:45
bacmarcoceppi: if only there was a word for 'arbitrary'.  :)20:46
marcoceppiwould arbitrary be a better word there for describing what a state is?20:46
bacmarcoceppi: i think so20:46
marcoceppiI mean, they are synthetic, much in the way we promulgate charms ;)20:46
hatchmarcoceppi: fwiw layers make charms so much eaiser to understand20:46
hatchI'm just being picky because I like to know the internals of things :D20:46
marcoceppihatch: it's good discord, the more [people poking reactive the better it'll become20:47
hatchmarcoceppi: there is also ". Hook decorators so the code can react to Juju events."20:47
hatchon the same page20:47
marcoceppiwell, hooks are juju events, what wording would make more sense for you?20:47
hatchJuju hooks20:48
hatch:)20:48
hatchno need to introduce extra terminology20:48
marcoceppipsh, w/e <320:48
hatchlol20:48
hatchmarcoceppi: it's also very important to point out that it will execute those 'callbacks' every time there is a hook run20:49
hatchand probably an example on how to prevent that20:49
hatchas I'm assuming a singleton is the primary usecase20:49
hatchmarcoceppi: I guess it DOES have a sentence about it20:50
hatchjust doesn't really say that it's going to happen all the time20:51
hatchit sort of eludes to it20:51
hatchbut anyways...thanks for clearing up all my confusion :D20:52
marcoceppihatch bac https://github.com/juju/docs/pull/131420:52
marcoceppicmars: I patched charm-tools to get around this20:53
hatchmarcoceppi: thanks looks good20:53
hatchmarcoceppi: this link you sent http://paste.ubuntu.com/23108940/ would be a really good example for implementing idempotency20:54
hatchya know, with a real example though :D20:55
marcoceppihatch: psh, "examples" ;)20:55
marcoceppicmars: https://github.com/juju/charm-tools/pull/25020:55
hatchlol20:56
hatchmarcoceppi: maybe there needs to be a @when_once() ?20:56
hatchit would really be a simple wrapper over a setstate20:57
hatchbut would make it much easier to grok for those not familiar with the execution flow of a layered charm20:57
marcoceppihatch: so that has some major implications (and discussion has been had around this)20:57
marcoceppibut what does once mean?20:57
hatchI'd say once it becomes truthy20:58
hatchbut I'v eonly thought about it for....30m?20:58
hatchlol20:58
marcoceppihttps://github.com/juju-solutions/charms.reactive/issues/2220:58
marcoceppihatch: so we have an only_once wrapper but it's problematic20:58
hatchoh nice, I totally missed this issue somehow20:58
marcoceppiodds are you want it once until something else changes20:58
marcoceppiwhich the something else is rare20:59
=== natefinch is now known as natefinch-afk
hatchhmmm21:00
hatchinteresting21:00
marcoceppihatch: yeah, the definition of once in a distributed system varries by the person defining what once means21:00
hatchright, and accounting for failures, does that mean the 'once' is satisfied, or not21:01
bacmarcoceppi: gotta be quick on those doc reviews!21:01
hatchthis is a rabbit hole21:01
hatch:)21:01
bacmarcoceppi: if you're poking at the documentation, could you look at https://github.com/juju/docs/issues/1313 ? I think the problem is the use of an absolute URL.21:02
marcoceppibac: yeah, good find. I've submitted #131521:06
bacgreat, thank you marcoceppi21:07
kwmonroelazyPower: i'm befuddled.. when charmbox builds went to ci.containers, i sadly assumed i'd lose the status from https://hub.docker.com/r/jujusolutions/charmbox/builds/, but those builds are green now.  is that status page pulling results from ci.containers?21:21
lazyPowerthose greens were the last builds before we moved over as best i can tell21:21
lazyPoweri'd need exact timestamps to tell you in more detail21:22
bacmarcoceppi: what is the cause of: charmtools.build.tactics: Options set for undefined layer: apt21:24
bacseems to be environmental, as makyo doesn't get it building the same charm21:24
marcoceppibac: you have set options for a layer you didn't include21:24
bachmm21:24
marcoceppibac: can I see you layer.yaml ?21:24
bacmarcoceppi: https://github.com/juju/bundleservice-charm/pull/221:25
marcoceppibac: huh, that's weird. you have layer:apt right there21:27
marcoceppibac: what does `charm version` say?21:27
baccharm 2.1.1-0ubuntu121:27
baccharm-tools 2.1.421:27
marcoceppiwell that's bizzare21:28
marcoceppilet me try21:28
bacmarcoceppi: https://pastebin.canonical.com/164230/ shows it getting the apt layer21:29
cmarsmarcoceppi, thanks!21:36
marcoceppibac: can you run with -l DEBUG21:45
x58Is there a reason to use the apt layer over just the basic layer with packages: in layer.yaml?21:46
bacmarcoceppi: sure21:46
x58In my case I just want to make sure that my package is installed...21:46
marcoceppix58: there are reasons to use apt over basic21:46
marcoceppix58: apt layer provides states like `apt.installed.<pkg>` that you can respond to21:47
marcoceppiwhere as basic: packages: is more for "I need these packages before hook code can even run"21:47
marcoceppisince that's executed during the bootstrap process21:47
marcoceppiwell, the bootstrap of the reactive framework21:47
x58Ah, got it.21:48
marcoceppiapt layer is really a more flexible encapsulation of things you acn do with apt: custom repositories/keys, queuing packages dynamicaly, and loads of states21:48
bacmarcoceppi: https://pastebin.canonical.com/164232/21:49
bacmarcoceppi: i need to step out.  ping me here if you find something otherwise i'll keep poking at it later.21:50
marcoceppicory_fu: I'm getting this error too ^^21:52
marcoceppibac: it appears layer-apt doesn't include a layer.yaml in it21:54
marcoceppiso this error is "right" and is likely because Makyo has an older version of charm-tools where the checks fail? I'll open a patch for layer-apt21:54
cory_fumarcoceppi: That error message implies to me that the charm being built is trying to set layer options for the apt layer, and it doesn't define any.  I think it would be ok for it to not have a layer.yaml and the error is actually in the charm21:57
marcoceppicory_fu: but layer-apt does support an option21:58
marcoceppiit's just not defined21:58
marcoceppiand it seems 2.1.4 of charm-tools starts checking that21:58
cory_fuAh.  It should have failed prior to that anyway due to there being no schema to validate it against, but I guess it was lenient21:58
marcoceppicory_fu: is this commit maybe the one that fixes that: https://github.com/juju/charm-tools/commit/f651e144fe24879a0470c8e49ab792a9321e6b4b ?21:59
cory_fuDoesn't seem like it22:00
cory_fumarcoceppi: https://github.com/juju/charm-tools/commit/134e860d3b717f821ade4765d95e0bf38ecc1e1e22:01
cory_fuThat seems like it would have been in a previous version22:01
marcoceppibut that's from april 4th22:01
marcoceppiyeah22:01
cory_fuWell, it clearly was the intended behavior that it be validated22:01
cory_fuPerhaps the error message could be better22:02
marcoceppihah22:02
marcoceppistub: bac: this is what you'll need to address this: https://code.launchpad.net/~marcoceppi/layer-apt/+git/layer-apt/+merge/30430822:06
bdxI think I just found a bug in the pgsql interface22:16
bdxtake this charm code for example, which requests two different databases using each their own interface -> https://gist.github.com/jamesbeedy/b02c701df4e34132ea622f78cb30df4322:18
bdxwhat seems to be happining here is when the second database is requested, a new password is generated for the user 'juju_feed', but this changes the password for the user globally22:20
bdxthis is my application.yml file that is rendered with the configs cached in the kv from each respective database connection22:22
bdxhttp://paste.ubuntu.com/23109426/22:23
* marcoceppi takes a look22:23
bdxwhats interesting here, is that only the password generated for the second database works on both22:23
bdx:-(22:23
bdxlogging into feeddb with feeddb password  -> http://paste.ubuntu.com/23109431/22:25
marcoceppibac: this looks like a bug in the postgresql charm22:25
marcoceppibdx: ^^22:25
marcoceppiI imagine it's not checking if the user it created already exists22:25
marcoceppiand it just recreating it with a new password :\22:25
bdxlogging into feeddb with feedreportdb password -> http://paste.ubuntu.com/23109434/22:25
bdxtotally22:25
marcoceppibdx: stub is your best bet for working through a fix, but he's in APAC timezone22:26
marcoceppibdx: let me see if I can get you a patched postgresql22:26
bdxmarcoceppi: thanks22:26
bdxthe charm *really* needs to create non-superusers that are owners of only their database22:31
bdxthis would be HUGE22:31
bdxmarcoceppi: I can just work with a temp modification to use the same user/password for both until this charm gets a little smarter22:32
bdxno need to spend cycles just for me22:33
bdxthanks though, you're such a gentleman22:33
marcoceppibdx: well, either way, it'd be good to file a bug on this, stub is awesome about his charms22:35
marcoceppibdx: https://bugs.launchpad.net/postgresql-charm22:36
bdxexcellent, on it22:37
x58marcoceppi: is charm build broken with the apt layer at the moment? I can't see the pastebin from bac so I can't be sure if I am running into the same issue.22:39
marcoceppix58: probably22:39
marcoceppix58: you can patch the apt layer locally, or let me know the error so I can confirm22:39
x58AttributeError: 'NoneType' object has no attribute 'combine'22:39
cholcombemarcoceppi, now that my charm is promulgated how do i apply updates to that?  Does that go through review again?22:40
marcoceppix58: that's something different22:40
bacx58: not what i see22:40
x58marcoceppi: http://paste.ofcode.org/zNTqD6xMCXFB5BucvsjAK622:40
lazyPowercholcombe - yep, you should be able to push to the devel and unpublished channels22:40
lazyPowerbut stable becomes ours, and requires a review22:40
cholcombelazyPower, i see22:40
bacmarcoceppi: ah, so makyo must have a cached version of the apt layer?22:40
lazyPowerby "ours" i mean, must be reviewed and curated.22:40
marcoceppibdx: or an older version of charm-tools22:41
marcoceppibac: ^^22:41
cholcombelazyPower, did review.juju.solutions url change?22:41
cholcombei'm getting 50222:41
bacmarcoceppi: no, he has the same charm22:41
marcoceppix58: can you run with -l DEBUG22:41
marcoceppibac: charm-tools*22:41
Makyomarcoceppi: bac 2.1.2 for charmtools22:41
marcoceppi?22:41
marcoceppithere we go22:41
bacah22:41
marcoceppiMakyo: if you update it'll probably err for you22:41
bacsweet.  will play with it tomorrow22:41
bacMakyo: don't! it's a trap22:41
x58marcoceppi: http://paste.ofcode.org/CXjMC8QivjDMHR8RVGemVs22:42
marcoceppix58: and finally, can you tell me the output of `charm version` ?22:42
x58charm 2.1.1-0ubuntu122:42
x58charm-tools 2.1.222:42
marcoceppix58: we just released 2.1.2, it's in ppa:juju/stable ; let me see if this was a bug fixed in that release, I don't think it was though22:43
marcoceppiwe just released 2.1.4**22:43
x58I'm following juju/devel ... is that wrong?22:44
marcoceppix58: no, but you can add juju/stable in additon to devel. Devel version of charm-tools is, comically, out of date since 2.1 went stable22:45
marcoceppiI dont' see anything in 2.1 that would address this, is your SNMP layer somewhere I could poke it?22:45
x58Not yet. Still developing it. I will get it up on Gitlab in a minute. Give me a couple.22:46
marcoceppix58: cool, thanks. I'll be helpful to poke it, hopefully I can patch charm-tools quickly if it is indeed a bug22:48
x58marcoceppi: https://gitlab.com/bertjwregeer/juju_snmpd/tree/master22:49
x58I don't think I did anything out of the ordinary...22:49
marcoceppix58: yeah, I hit the error to on 2.1.4, <insert canned you should still upgrade message>, but I'll see if I can hunt down the reason for this error22:50
marcoceppix58: is there a reason you ignore the readme?22:51
x58marcoceppi: I use a .rst README22:52
x58not .MD22:52
x58so I would end up with README.rst and README.md22:53
x58which caused issues when rendering on the charmstore.22:53
marcoceppix58: that's a good reason, could you just delete README.md ?22:53
marcoceppibleh22:53
marcoceppiof course22:53
x58No, because charm build would pull it back in from the basic layer.22:53
marcoceppix58: I understand now, so that ignore line seems to be causing the problems, let me see why. I know we had a few fixes around ignore and exclude22:54
x58Nevermind the fact that .rst rendering on the charmstore is currently broken (yes, I have a bug open for it)22:54
x58marcoceppi: Works fine for: https://gitlab.com/bertjwregeer/juju_staticroutes22:54
x58Which doesn't have the layer:apt in it though (only the basic layer)22:54
marcoceppix58: ingore is getting overhauled in charm-tools 2.2, fwiw.22:55
marcoceppiwhat you really want is exclude22:56
x58I used ignore because exclude is what I tried first but that didn't exclude.22:56
marcoceppias in "exclude this file from the final charm" and ignore is more for "don't include this file from my layer"22:56
x58Also, the documentation is severely lacking in that area :-/22:56
marcoceppix58: exclude doesn't exist (yet)22:56
marcoceppiwhich is why it didnt' work22:56
x58I saw exmaples using "exclude"22:56
marcoceppialso, yeah, that's my bad. I've nto been super strict on documentation22:57
x58That makes sense. lol.22:57
marcoceppix58: you on xenial?22:57
x58Yes.22:57
marcoceppix58: so, this https://github.com/juju/charm-tools/pull/235 is in master which will be in 2.2 of charm-tools22:57
marcoceppiand I think it address your problems with exclude, which was the right idea22:58
marcoceppiactually, I had that reversed22:58
marcoceppiignore is the right key, it's just not really working well in 2.122:58
bdxmarcoceppi, bac: https://bugs.launchpad.net/postgresql-charm/+bug/161824822:59
x58This is the second charm that I am writing, and documentation is all over the place. I like the reactive framework, but documentation is hit or miss, mostly miss.22:59
x58The charmhelpers stuff is also inadequately documented, and I've spent an awful lot of time looking at source code to try and reverse engineer why something works the way it does.22:59
bdxoh, you prob can't see that huh23:00
marcoceppix58: even using https://pythonhosted.org/charmhelpers ?23:00
x58Yes.23:01
marcoceppix58: I apprecaite the feedback, our documentation is definitely lacking in a lot of areas, I'm sure there are numerous examples but if you had time (after all this charm build stuff) to just highlight a few examples we're eager to fix23:01
x58Sure. I can put some stuff together.23:01
marcoceppix58: so this is defininitely a bug, and I think it's because there's no layer.yaml in apt which is making the build tactic choke23:02
marcoceppix58: I'll file a bug and see if I can get a patch up for review23:02
x58marcoceppi: Thanks. Is there a temporary fix I can use in the mean time to get this charm build completed?23:03
x58Should I remove the ignore?23:03
marcoceppix58: comment out the ignore then manually remote the .md for now, sadly, is the quickest workaround23:03
x58It'll get me where I need to be for now.23:03
x58Which is a charm I can start testing ;-)23:04
x58I can worry about publishing later.23:04
marcoceppix58: are you going to the charmer summit in Sept?23:04
x58Nope.23:04
x58I wish. I only write charms to get my work completed :P23:09
x58And they are probably not even that great... Just the bare minimum to support my requirements.23:09
bdxx58: thats how it all starts ;-)23:18
x58bdx: haha =)23:20
marcoceppix58: here's the bug for your particular build issue https://github.com/juju/charm-tools/issues/25123:20
x58Awesome +1. Will watch it later.23:22
x58Not logged into Github on my work machine.23:22
=== alexisb is now known as alexisb-afk

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