/srv/irclogs.ubuntu.com/2016/12/02/#juju.txt

kjackalGood morning Juju world!08:03
=== frankban|afk is now known as frankban
ionutbalutoiuHello, guys! Do you know if I'm able to release a charm on charm store without uploading any resources ? My use case is that I have a charm that uses resources, but I don't want to upload them to charm store due to EULA. Still I want users to get the resources and deploy the charm specifying them at deploy.09:55
ionutbalutoiuUsers will get the resources separately as described in the README, thus we don't get into trouble because we redistribute software.09:57
kjackalionutbalutoiu: Hi, yes you can do that10:16
kjackalionutbalutoiu: this is practicaly how all charms written prior to juju 2.0 work10:17
kjackallet me grab you an example10:17
ionutbalutoiuibalutoiu@samba:~/work/juju/charms/windows/azure-service-fabric$ charm release cs:~cloudbaseit/azure-service-fabric-810:17
ionutbalutoiuERROR cannot release charm or bundle: bad request: charm published with incorrect resources: resources are missing from publish request: asf-zip-package, dotnet-installer10:17
ionutbalutoiuThis is what I get when trying to release a charm that has resources defined but not uploaded. Remember, I mean 'release/publish' not push to the charm store.10:18
kjackalionutbalutoiu: Ah I see now what you are saying10:19
kjackalionutbalutoiu: you want to use the resources mechanism but not upload a binary10:19
ionutbalutoiuyep10:19
kjackalionutbalutoiu: yes we do have exmple for that too10:19
ionutbalutoiuas I want users to specify them at deploy.10:19
kjackalionutbalutoiu: the idea is that you upload a dummy empty file as a resource10:20
kjackalionutbalutoiu: let me grab an example :)10:20
ionutbalutoiukjackal, yea. I thought about that too. But hoped that there might be a switch of something which I didn't find in the help to publish without resources.10:21
kjackalionutbalutoiu: I am not aware of any such switch10:22
kjackalunfortunately the example I had in mind is not that helpfull10:22
ionutbalutoiukjackal, people will now go the charm page and they can download the resources, a file will pop up for the download, but instead will be a fake file.10:23
ionutbalutoiukjackal, that would do the work for now. But still imo it would've been better if resources remained grayed as it is now: https://jujucharms.com/u/cloudbaseit/azure-service-fabric/8 even after the publish.10:24
ionutbalutoiuUse case it is that sometimes EULA doesn't permit redistributing the software. So people using my resources have to go the original website, accept eula there, and provide the resource for my charm manually at deploy time.10:25
kjackalI see your point. True, exposing the resources like this some times might be wrong. There might be resources there essoteric to th internal operation of the charm10:25
ionutbalutoiuYep10:26
kjackalGood point, would you want to send an email with your use-case on the list? Best case schenario there might be a way around this already, worst case the teams responsible for this would hear you.10:29
ionutbalutoiuYep. Please do send. That would be awesome.10:29
kjackalWhat should I tell them? Who are you? What is your affiliation & email?10:30
ionutbalutoiuI'm Ionut Balutoiu, Cloud Engineer at Cloudbase Solutions. The guys writing Juju charms for Windows. :)10:30
kjackalThanks10:31
ionutbalutoiunp10:31
ionutbalutoiukjackal, For now, question is: When I upload an empty file as resource so I can publish the charm, if someone manually specifies the resource at deploy as I want them to, will the resource specified by the user get uploaded to state machine and not the default empty file from charm store, right?10:31
kjackalYes. You can even get the size of the resource you got from the store so that you detect that this is not the right file and display the right message10:33
ionutbalutoiuCool10:33
ionutbalutoiukjackal, and btw, ibalutoiu@cloudbasesolutions.com is my e-mail. You asked for this one also, sorry.10:34
kjackalthanks I will put you in cc in case you want to add-up anything10:35
ionutbalutoiuThank-you10:41
ionutbalutoiuThere's also another topic that I have question for, if you still have some time or anyone else. Context, you have 4 peer units, you remove one unit, only in relation departed you still have access to relation data, I need relation data info, so I want to do my business logic here.10:45
ionutbalutoiuHow do I find out which is the unit leaving and the ones staying ? As far as I noticed, relation departed triggers on all of them like this: once on the units remaining in the peer relation and N number of times on the unit leaving (where N is the number of units remaining).10:45
kjackalionutbalutoiu: Email sent10:51
ionutbalutoiukjackal, received, thanks.10:51
kjackalionutbalutoiu: here is how we query for the nodes in spark: https://github.com/juju-solutions/interface-spark-quorum/blob/master/peers.py10:51
kjackalwe iterate over the conversations10:52
ionutbalutoiuYes. I understand, but is there a way to figure out which is the unit leaving?10:53
ionutbalutoiuThat would give you a list of all the peer units, right ? The one leaving and the others. I would like to know which is the one leaving.10:53
stubionutbalutoiu: A unit cannot tell if it is the one being torn down, or if it is $REMOTE_UNIT that is being torn down.10:54
stubI'm sure there is an open bug on this... looking10:54
ionutbalutoiustub, I just got into this use base when writing my last charm. Sometimes is if useful to know if you're leaving or not.10:55
ionutbalutoiuuse case*10:55
stubYes. I have some data loss issues it causes.10:55
stubIf a Cassandra unit is leaving the cluster, it needs to decomission itself cleanly. If a different unit is leaving the cluster, it doesn't care.10:56
stubIts tied up in https://bugs.launchpad.net/juju-core/+bug/1417874, but a separate bug report may help10:56
mupBug #1417874: [RFE] Impossible to cleanly remove a unit from a relation <canonical-is> <charms> <feature> <hooks> <sts> <sts-rfe> <juju:Triaged> <juju-core:Won't Fix> <https://launchpad.net/bugs/1417874>10:56
stubionutbalutoiu, kjackal : I opened up https://github.com/juju/charmstore-client/issues/103 on optional resources. I realized this problem is going to hit all the charms we have in development using snaps.13:50
kjackalthanks stub13:50
ionutbalutoiuthank-you stub13:52
skayhi, I was using 'waiting' for things like waiting for a database relation, but after reading https://jujucharms.com/docs/stable/reference-status I should use 'blocking' for things like that, yes or no?14:02
rick_hskay: yes, if your application doesn't function without a database then blocked is best14:03
rick_hskay: it indicates that the user needs to pay attention here14:03
rick_hskay: waiting is only temp and does not alarm the user14:03
skay_rick_h: thanks14:11
skay_(I'm also building up to some questions about reactive states)14:11
skayok, reactive states question. the docs don't show @hooks mixed with reactive state decorators. am I allowed to mix them?14:16
skayif I can't mix them, then I'd just have conditionals inside my hook14:17
stubWhoops, ranting on bug reports. Must be dinner time.14:28
rick_hstub: :)14:29
* stub wanders off to find a baby to eat14:31
SpauldingHi guys15:27
lazyPowerHeyo Spaulding  (belated)16:10
skayquestion, I'm not sure I should keep my install hook. I have a function that does some installation stuff @when_not('snap.installed.yadda')16:13
skayso, I could just get rid of my install hook and use a reactive function instead. do I understand correctly?16:13
marcoceppiskay: sounds about right16:20
=== urulama is now known as urulama|off
skay_cool16:21
marcoceppiskay: to clarify, you're removing like @hook('install'), yeah?16:22
skay_marcoceppi: yes. because it doesn't seem necessary anymore16:22
marcoceppiskay: totally, you almost never need to use @hook16:23
skay_the relation-joined/changed/departed hooks still get used a lot?16:23
marcoceppiskay: oh, sure, but in the charm layers (not the interfaces)16:25
skaymarcoceppi: is there a state that gets set when a resource is attached?16:30
skaymarcoceppi: I didn't find it but maybe I overlooked it16:30
marcoceppiskay: not at the moment, that's triggered in the @hook('upgrade-charm')16:30
marcoceppior, if provided during deploy, then it'll just be available16:31
skaycurrently I'm just checking resource_get before deciding to install the snap16:31
skayand in the upgrade-charm hook I check to see if the resource has actually changed16:31
marcoceppiskay: yeah, resource_get will either get latest, or return current path16:32
skay_I'm doing that, and then checking any_file_changed([resource_file]) before calling snap.install16:32
skay_you or someone may have explained that the any_file_changed was good for checking for that16:33
marcoceppiskay: it wasn't I, but it's actually a pretty good idea. I think we'll work to adding a resource.changed state into the base layer, but it'll need a bit more time to mature to figure out what that would look like form a usability perspective17:05
=== frankban is now known as frankban|afk
cholcombeare we no longer allowed to use the juju-info relation?17:38
cholcombei'm seeing: ERROR charm "preserve" using a reserved relation name: "juju-info"17:38
cholcombefor 2.0.1 juju17:38
cholcombeoh nvm i had juju-info in the wrong place :)17:39
cholcombehah17:39
skay_when I try to destroy-model it doesn't work because it cannot connect to API17:54
skay_what do I need to kick?17:54
=== redir is now known as redir_travel
skay_help, how did I kill juju this time18:56
rick_hskay_: ? what's up?19:04
rick_hskay_: use kill-controller if the controller is down and it should tear everything down bypassing the api server?19:05
skay_aha, I'll try that19:05
skay_the api server is not responding19:06
rick_hyea, it should try, and then fail, and then go straight to the cloud provider to remove the machines using the provider's apis19:06
=== hml_ is now known as hml
petevgbcsaller, cory_fu: hadoop-processing working! (modulo the reset issue, at least) https://github.com/juju-solutions/matrix/pull/3420:41
petevgbcsaller: any objections to me merging cory_fu's updated color handling? https://github.com/juju-solutions/matrix/pull/3221:14
bcsallerpetevg: sounds good21:16
petevgbcsaller: merged cory_fu's branch. Rebased and pushed an update for https://github.com/juju-solutions/matrix/pull/3421:28
cory_fupetevg: Just added a minor comment / question to your PR21:29
petevgcory_fu: answered your question :-)21:30
petevgcory_fu: basically, lots of empty parens made me sad, and made me worry about bugs.21:31
cory_fuYeah, fair enough.  I think the no-parens vs empty-parens thing with Python decorators is kind of dumb.21:32
cory_fupetevg: I made @only_once work either way in charms.reactive: https://github.com/juju-solutions/charms.reactive/blob/master/charms/reactive/decorators.py#L21721:33
petevgcory_fu: yeah. Admittedly, they are two separate beasts. Add the parens, and you either need another level of wrapper function, or another method in the class. The implementation would get really messy if you had to figure which one the user meant ...21:33
cory_fuBut to do that with your decorator would be more of a hassel21:33
cory_fu*hassle21:33
petevgcory_fu: fancy :-)  But yeah, too late on a Friday to figure out how to do that with the monster that I've built ...21:33
cory_fupetevg: Yeah, it's not worth worrying about21:34
petevgCool.21:34
cory_fupetevg: Actually, now that I think about it, I don't really like the potential for errors with tag name typos, either.  What about something like this: http://pastebin.ubuntu.com/23569587/21:39
petevgcory_fu: if anyone wants to add actions and tags, they'll need to add a bunch of arguments to the tagged_action decorator. The idea with the tags was that outside actions could add to them, without messing with core.21:40
cory_fupetevg: What would such tags be useful for if they're not understood by the plan generator?21:41
petevgcory_fu: They might not be. But you're still looking at adding an arg in two places (plan, action) rather than three, plus checking to make sure that nobody has messed things up by making assumptions about positional arguments.21:42
petevgcory_fu: I guess another approach could be to make a list of constants in tags.py. That saves typos (or at least, surfaces them quickly).21:43
=== scuttlemonkey is now known as scuttle|afk
petevgcory_fu: updated my PR with the constants thing. If you want to argue strongly for just doing args, feel free. I think that the constants will be neater in the long run, though.22:08
petevgbcsaller ^22:08
petevgcory_fu, kwmonroe: do we have the sauce for the hadoop-spark bundle checked in anywhere?22:09
kwmonroepetevg: https://github.com/juju-solutions/bigtop/tree/feature/hadoop-spark-bundle/bigtop-deploy/juju/hadoop-spark22:10
petevgkwmonroe: got it. Is that close to being checked into master, by any chance?22:11
kwmonroeno petevg, i haven't created a pr to link to https://issues.apache.org/jira/browse/BIGTOP-2561 yet22:12
kwmonroei mean, i could if you need it.  it's not hard.  i just haven't done it yet.22:12
petevgkwmonroe: I was going to brag about how we were in Apache bigtop in D.C., but then the bundle isn't actually in trunk. I can point the the source on the store, though, and then look at the apache repo once I get to the layer ...22:13
petevgcory_fu: heh. I had misspelled "subordinate" in my docstring. Thank you for pushing to less typo bugs :-)22:20
lucacomehello22:27
kwmonroepetevg: if you're still around, care to gander at this?  https://github.com/apache/bigtop/pull/16622:38
kwmonroeno worries if you can't get to it tonight petevg.  i can def get it merged before Monday.22:39
petevgkwmonroe: looking ...22:39
petevgkwmonroe: +1 thank you :-)22:40
kwmonroethar she blows petevg:  https://github.com/apache/bigtop/tree/master/bigtop-deploy/juju  have a good time in DC!22:49
petevgkwmonroe: yay! You rock. Thank you :-)22:50
lucacomeI'm creating a charm for NGINX, is there someone that can help me/review what I've done so far?23:05
kwmonroelucacome: unfortunately, it's already EOD for a lot of people that hang out here (i've got 1 foot out the door myself), but there is an nginx layer that may be helpful to consume/tweak:  https://github.com/battlemidget/juju-layer-nginx23:10
kwmonroelucacome: to keep your issues from being lost in irc ether, i'd suggest firing off an email to the list (juju@lists.ubuntu.com) if you have specific charming questions or want to have some eyeballs on your work so far.23:11
lucacomekwmonroe, yes I started from that implementat23:12
lucacome*implementation23:12

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