[06:04] morning all [09:29] * Chipaca struggles to find his voice [09:35] * bthomas recommends some ginger tea [09:55] PR operator#369 closed: use yaml instead of json for pod-spec-set call [09:56] oops [09:56] PR operator#369 opened: use yaml instead of json for pod-spec-set call [10:15] ยกMuy buenos dรญas a todos! === facundo__ is now known as facubatista [10:17] ๐”Š๐”ฌ๐”ฌ๐”ก ๐”๐”ฌ๐”ฏ๐”ซ๐”ฆ๐”ซ๐”ค [10:17] [10:18] hola bthomas :) [10:18] :) [11:46] PR operator#370 closed: Update README.md [11:56] ballot: have you been able to set aside a bit of time for testing the fix to #293? [11:56] Issue #293: passing k8s_resources to pod.set_spec does not work [11:57] heh, i just realised why you said "if pjdc doesn't have the time" [11:57] Chipaca: hello ! Not yet, was planning to do this afternoon. Since I need to compile juju and I have only go 1.12 setup on my laptop, I might have to do some tweak. The fix is committed but not released so I guess I need that to test fully the code [11:58] ballot: why comile juju? [11:58] ohh.... no i meant just the fix on operator side, ie #369 [11:58] PR #369: use yaml instead of json for pod-spec-set call [11:58] because after noticing the fix on juju side, i realised we'd still be broken on older jujus so we really should work around it ourselves as well [11:58] Chipaca: aaaah, ok, much easier then :) [11:59] I thought I needed the fix on both sides [11:59] PR operator#368 closed: Clarify ops.testing.Harness.update_config usage [12:01] ballot: both fixes fix the issue independently :) [12:18] off to lunch, bbl [13:17] facubatista: #113 could use a re-review [13:17] Issue #113: Automatically transform config into pod spec [13:17] er [13:17] charmcraft#113 [13:17] PR charmcraft#113: init: include series in metadata.yaml [13:18] narindergupta: ๐Ÿ‘‹ [13:19] Chipaca, hey I am starting work on writing a new k8s charm from scratch for Cassandra on k8s just need to know how to start with the k8s component in framework? [13:20] narindergupta: so I pulled mark's work into https://github.com/chipaca/ops-lib-k8s [13:21] narindergupta: the way you use it, add that to your requirements.txt, and then 'k8s = ops.lib.use("k8s", 0, "chipaca@canonical.com")' [13:22] narindergupta: the "that" is "git+https://github.com/chipaca/ops-lib-k8s.git", but it'll be in pip as soon as it's "done" (at which point the API will bump to 1) [13:22] narindergupta: am i making sense? [13:22] Chipaca, so start with charm craft init then make the change [13:23] yep! [13:28] Chipaca, ok I think I can see that [13:28] ops_lib_k8s-0.0.dev0+unknown.dist-info/ and ops-0.8.0.dist-info/ in c=venv [13:29] After charm build [13:29] 'charmcraft build' i hope :') [13:29] narindergupta, you should not use the 'charm' tool [13:29] facubatista, I am using charmcraft [13:30] great [13:30] narindergupta, what is "c=venv"? [13:31] What I meant is in venv directory [13:43] Chipaca, yes I am able to start the work now and still has to go through the pod status to make sure I set the status in charm application as well. Do we still explicitly set the status? [13:45] narindergupta: sorry i didn't follow that [13:46] Chipaca, in my earlier charm I explicitly set the status of the application using activestatus call based on the pods status. Are we following the same as well? [13:46] Like _on_start(self) [13:47] if (self.model.pod.is_leader()): [13:47] self.model.app.status = ActiveStatus('ready') [13:49] Basically I wanted to set the application status as pod status if it is leader [13:58] narindergupta, I'm lost if you attempted to do that and didn't work, if it worked but you're not sure if it's the best way of doing it [14:01] narindergupta: that is something the charm would do, yes [14:01] narindergupta: I'm not sure if that's your question though [14:01] Chipaca, yes that answers it and currently seeing to pass app data to k8s pod [14:02] Will let you know if come across any issues [14:02] narindergupta: also note you can write self.app.status (it's the same, just shorter) [14:03] Chipaca, gotchu you that is helpful [14:03] narindergupta: and AFAIK it's not pod.is_lader but unit.is_leader :) [14:04] so you can write self.unit.is_leader [14:04] Chipaca, thank you [17:08] ok, i'm out of here [17:08] ttfn! [17:38] qq, I'm moving from using submodule to pull mod/operator for the ops module to using charmcraft to build my charm. What should be done with the dead symlink from $CHARM_ROOT/lib/ops that prior pointed to ../mod/operator/ops? charmcraft dies on looking for where this symlinks to. https://pastebin.ubuntu.com/p/GKmQy44jTm/ [17:38] is there a specific path I should look for when doing import ops? [17:39] or is it just available in my built venv? [17:39] and I shouldn't worry about pathing [17:58] ok, I did a build of my charm. the venv directory didn't get created....I see that requirements.txt at the top level is actually equivalent of wheelhouse for reactive. [17:58] that seems really weird, but I'll roll with it [17:59] I think long term it'll make more sense for people joinnig into charming, so I'm okay with the rename [18:26] answer: use requirements.txt to get the modules you want installed from pip into the charm's venv. [18:26] and remove symlinks and calls to lib paths for anything that was submoduled. [18:26] because the import will work because it's part of the venv [18:38] Chipaca do you know why am I getting this error ERROR cannot repackage charm: symlink "config.yaml" is absolute: "/home/ubuntu/narinder/charm-k8s-cassandra/config.yaml" [18:39] I am trying to deploy the charm but getting this error [18:50] how do I make charmcraft build include my CHARM_ROOT/files directory? [18:50] or /templates, or any other path for that matter [18:50] seems it pulls in /lib and /src and several .yaml/version files [18:51] I'd expected it to pull everything not in .jujuignore [18:51] facubatista: ^ [18:53] drewn3ss, it will do that, I'm currently working on it: https://github.com/canonical/charmcraft/issues/39 [18:54] narindergupta, how are you deploying the charm? [18:54] I see https://github.com/canonical/charmcraft/blob/master/charmcraft/commands/build.py#L123 if your entrypoint dir for build is same as your whole charm dir, then it skips all files [18:55] drewn3ss, the "entrypoint" is your main Python file, not a directory [18:56] ack [18:56] drewn3ss, to hack it until a proper solution is ready, you could include your files in the CHARM_OPTIONAL list [18:56] drewn3ss, in that build.py, line ~38 [18:56] is that environmental, arg-able or am I forking the code? [18:56] forking the code...cool. [18:56] that's...a non-starter [18:57] drewn3ss, as I said, I'm working on the proper solution [18:57] thank you :) [18:58] I can also move my files dir to src [18:58] as it seems all of src is included [18:58] that's reasonable for now [21:12] * facubatista eods