/srv/irclogs.ubuntu.com/2020/09/09/#smooth-operator.txt

mupPR operator#400 opened: Fix trivial typo in docstring <Created by mthaddon> <https://github.com/canonical/operator/pull/400>07:19
bthomas!!!!08:10
bthomasGood Morning08:10
Chipacabthomas: goooooooooooooooooooooooooooooooooooooooooooooooood  morning!08:11
Chipacabthomas: does erc do colours?08:14
bthomasMorning Chipaca. Yes ERC does colours by default08:14
Chipacaphew08:15
bthomasWhat really love is it supports LaTeX too. I recently switched to ERC from Pidgin after finding this out.08:15
Chipacabthomas: right there insid erc?09:01
Chipacainside*09:01
bthomasChipaca: You mean LaTeX . If so yes it is using ERC-TeX https://www.emacswiki.org/emacs/erc-tex.el09:02
Chipacaneat09:02
bthomasI changed the delimiter to $$ from $ since $$ is what other IRC clients seem to use for TeX markup09:02
bthomasI presume you have seen https://github.com/millejoh/emacs-ipython-notebook09:03
bthomasand https://sites.google.com/site/imaximaimath/ which is now part of official upstream09:04
Chipacai had not, i will add them to my interesting-stuff backlog :)09:19
facubatista¡Muy buenos días a todos!09:43
bthomasनमस्ते facubatista10:01
facubatistahola bthomas !10:02
bthomasChipaca: I am seeing harness.update_config values set in one unit test persisting in a different unit test even though I have done self.addCleanup(self.harness.cleanup) in setUp(). Is this because I have not used the "unset" argument to update_config ?10:11
Chipacabthomas: sounds like you're carrying the stored state database between tests10:11
Chipacabthomas: this shouldn't happen (tm)10:12
bthomasChipaca: how to I clear StoredState() between tests ?10:14
Chipacabthomas: it's an in-memory sqlite, it should not be surviving between tests10:15
bthomasI do see if I add unset argument to update_config, I can resolve the problem. Is this good enough for now ?10:15
Chipacabthomas: i'd even say it can't10:15
bthomashmmm10:16
Chipacabthomas: something deeper is wrong, so no10:16
Chipacabthomas: this is using harness, yes?10:16
bthomasyes harness10:16
bthomasChipaca: ok let me dig, let us catchup after standup if you have time.10:16
Chipacabthomas: that's a long time away :) but sure10:17
bthomasChipaca: I split my time between writing documentation/unit tests for charm and writing documentation for charmhub.10:17
Chipacaok10:17
bthomasI will be understanding the reactive Charm Hook docs (https://discourse.juju.is/t/charm-hooks/1040) and adapting it for Operator Charms. I am writing my draft in Markdown so that it can be imported into a google doc. If either of this sounds like a bad idea please let me know.11:20
facubatistabthomas, google docs understand markdown?11:32
bthomasawesome11:33
bthomasfacubatista: I googled and there seems to be options to import markdown11:33
bthomasin any case I can always cut/pastes. Using my familar editor and familiar markup for now.11:34
facubatistaoh, nice! it has "export" too? but we'll end up in Discourse, so I don't want to loose that markdown11:34
bthomasok I will save it.11:34
facubatistabthomas, I'm writing in markdown too, I just don't want to lose it11:34
bthomasgot it11:35
Chipacafacubatista: are we having the bug revue today, or is it docs docs docs?11:57
Chipacacopy-pasting from google docs into discourse preserves formatting (but it's slightly less pretty than hand-written markdown)11:58
facubatistaChipaca, let's have it, it should be short11:58
Chipacaok11:59
mupIssue operator#398 closed: Improve opslib functionality <Created by facundobatista> <Closed by facundobatista> <https://github.com/canonical/operator/issues/398>12:12
Chipacafacubatista: https://k8syaml.com/ fwiw12:24
facubatistanice12:28
Chipacafacubatista: yes but also an idea of the size of the problem :)12:29
facubatistanot a problem! but an opportunity :p12:30
Chipacafacubatista: you say potato i say ghoughpteighbteau12:45
facubatistaja12:46
bthomasLooks like I have introduced a bug in my prometheus yaml by a recent code change. So I will switch track back to the charm and fix that before continuing on documentation.13:16
facubatistabthomas, a bug in the yaml because of a code change?13:24
facubatistaah, prometheus specific yaml? not cham's?13:24
bthomasfacubatista: looks like it13:24
bthomasyep prometheus yaml13:24
bthomasThe yaml is generated by code. If we use yaml loaded from disk then I could have validated the yaml by using it to launch prometheus on the host.13:25
jamo/13:26
facubatistabthomas, as it's being generated by code, you can test that code13:26
facubatistahola jam13:26
bthomasindeed13:27
jammorning facubatista13:27
bthomasmorning jam13:27
facubatistajam, question! when "dispatch" explodes in juju's face (because of a syntax error in the charm, *for example*), juju logs in DEBUG the problem: https://pastebin.canonical.com/p/gVnm9SsDV2/13:28
facubatistajam, how difficult it would be that that error is logged in ERROR?13:28
facubatista(so the user will see the problem by default, without needing her to get the model in DEBUG)13:28
jamfacubatista, IIRC, we log all of the stdout of a script at DEBUG, and we don't do anything special about content of that output13:29
jamI don't think all stderr should end up at ERROR, maybe WARNING?13:29
facubatistajam, I don't know if *all* stderr, but at least everything that was shown if the process not ends in 0?13:31
facubatistaor you log before knowing the final outcome?13:31
facubatistas/you/juju/ :p13:31
jamfacubatista, that would imply buffering everything so that you could change the log level, which is possible but has its own risks13:31
facubatistajam, which risks? we were thinking maybe about sending all stderr to a temp file and calling `juju-log` on that content, if retcode != 013:32
facubatista(doing that in the dispatch script, I mean)13:32
jamfacubatista, do we know whether it is stderr or stdout? (I'm guessing err)13:35
facubatistajam, stderr, as it's a standard "python crash"13:36
Chipacafacubatista: it sounds like dispatch should do this itself then13:38
bthomasseems like I fixed bug. will test and push to github13:59
* bthomas grabs coffee before getting back to writing eloquent prose for charmhub14:05
bthomasChipaca: Can I add a 20-30 min 1:1 at 5:00pm to your calendar today ?14:28
Chipacabthomas: can it be at 4pm?14:38
bthomasChipaca: sure. Adding it now14:38
jamfacubatista, so Juju currently puts stdout and stderr into the same stream and then logs it all at DEBUG: https://github.com/juju/juju/blob/7901bce5eef92c2f7af11f0e38cb3f482a25e013/worker/uniter/runner/runner.go#L51614:59
jamI don't see why we couldn't split that15:00
jamstderr feels more like Warning than Error to me, though tracebacks would be more Error.15:00
facubatistajam, the detail is if you wait to have the process finished before logging (so you can decide based on its retcode)15:01
bthomashttps://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html15:52
* facubatista -> lunch15:52
justinclarkFor a bit more info on the relations.. Both prometheus and grafana charms are deployed independently. However, "juju add-relation grafana prometheus" returns "ERROR no relations found"16:12
justinclarkIt seems like the metadata.yamls for grafana [1] and prometheus [2] are not the issue as they have corresponding endpoints.16:13
justinclark[1] https://github.com/justinmclark/grafana-charm-base/blob/master/metadata.yaml16:13
justinclark[2] https://github.com/balbirthomas/prometheus-charm/blob/master/metadata.yaml16:13
bthomasjustinclark: are you providing any more arguments to the the add-relation command line other than application names ?16:15
justinclarkbthomas - just the relation names16:17
bthomasIn that case I do not understand how the two applications know which port and IP to use16:17
bthomasjustinclark: I will give this a try too. Could you try adding --via arguments to add-relation16:18
bthomasjustinclark: I am able to access the prometheus web page from my host system so I know it is serving an http api.16:18
justinclarkSo the relation I'm struggling with is the juju relation itself. Regardless of the configuration that needs to happen between the two.16:19
justinclarkI have both apps deployed via juju and can access the grafana dashboard and even add the prometheus datasource to that manually. The problem is just the "juju add-relation" command.16:20
justinclarkbthomas: we can worry about how to set the relation data once we figure this out. Want to hop on a 1-1 call?16:21
bthomasjustinclark: ok will join stand up link in 30 sec16:22
bthomasjustinclark: your link froze and terminated16:27
jamfacubatista, we could do that, though it might be more straightforward if we just always put stderr into INFO/WARNING level, rather than conditional on return code.16:27
bthomasjustinclark: I have both grafana and prometheus charms running on my system16:31
justinclarkOkay - I'm about to rejoin the hangout16:32
* facubatista is back16:41
facubatistajam, my objective is that people will see errors in the called script by default16:42
facubatistajam, so all stderr to info/warning, is fine (also to ERROR, as it's stdERR...)16:43
facubatistaif the charm/script is sending stuff to stdERR that is not an ERRor, well, that scrip/charm needs to be fixed16:43
jamfacubatista, well, stderr is for any content that you don't want in your output. eg 'curl' uses it for a progress bar16:48
jamI don't think the "err" in stderr is that hard defined16:48
facubatistayeap16:48
facubatistathat's why I'm fine with anything that shows the error to the user by default16:48
facubatista(without needing to put the model in DEBUG, for example)16:49
facubatistajam, shall I open an issue about this or you take it?16:49
jamfacubatista, I believe we already have a bug around it, i'll try to track it down, I was using you as a part sounding board for working through it.16:49
facubatistajam, \o/ wonderful16:50
jamfacubatista, bug #189399316:50
jamfwiw16:50
facubatistajam, thanks16:54
facubatistabthomas, about using google docs but keeping markdown... for me when I paste into google docs it eats all my newlines, does it happen for you too?16:55
bthomasfacubatista: I have not tried yet16:55
facubatistabthomas, I'm not finding an "import" either16:59
facubatistaah! "paste without formatting" doesn't eat my newlines17:01
bthomasfacubatista: import was external plugins.17:01
bthomasthanks for the paste without formatting tip17:02
* bthomas bbiab17:49
mupPR operator#400 closed: Fix trivial typo in docstring <Created by mthaddon> <Merged by facundobatista> <https://github.com/canonical/operator/pull/400>18:11
bthomasjustinclark: I am back. Will be online for another hour or two.18:35
justinclarkbthomas: sounds good. I think I'm fairly close. The data is being passed correctly but for some reason isn't recognized by the grafana service. Possibly configuration issues but everything matches the grafana docs as far as I can tell. I'll keep you posted though18:50
bthomasthanks justinclark : there is always the possibility of bugs in the prometheus code. Do message me at the slightest possibility of this so I can have a look.18:51
justinclarkActually, I think it is working properly.18:52
bthomasyay!18:53
bthomasjustinclark: there is a "monitor-k8s" option in the prometheus config, that18:53
bthomaswill make it gather monitoring data from the k8s cluster. I will try this tomorrow. If you are starved for data :-) try that.18:54
mupPR operator#399 closed: Handle removal of non-existant relation data <Created by stub42> <Merged by facundobatista> <https://github.com/canonical/operator/pull/399>18:59
justinclarkI lied :(19:00
* justinclark punts computer19:00
bthomas:)19:03
jamfacubatista, to finish the thread we started here https://github.com/juju/juju/pull/11980 should address the tracebacks-by-default21:41
mupPR juju/juju#11980: Change hook stderr output to be logged at WARNING level <Created by jameinel> <https://github.com/juju/juju/pull/11980>21:41
facubatistajam, thanks22:26

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