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

jammorning all06:04
* Chipaca struggles to find his voice09:29
* bthomas recommends some ginger tea09:35
mupPR operator#369 closed: use yaml instead of json for pod-spec-set call <Created by chipaca> <Closed by chipaca> <https://github.com/canonical/operator/pull/369>09:55
Chipacaoops09:56
mupPR operator#369 opened: use yaml instead of json for pod-spec-set call <Created by chipaca> <https://github.com/canonical/operator/pull/369>09:56
facundo__ยกMuy buenos dรญas a todos!10:15
=== facundo__ is now known as facubatista
bthomas๐”Š๐”ฌ๐”ฌ๐”ก ๐”๐”ฌ๐”ฏ๐”ซ๐”ฆ๐”ซ๐”ค10:17
bthomas 10:17
facubatistahola bthomas :)10:18
bthomas:)10:18
mupPR operator#370 closed: Update README.md <Created by alejdg> <Merged by chipaca> <https://github.com/canonical/operator/pull/370>11:46
Chipacaballot: have you been able to set aside a bit of time for testing the fix to #293?11:56
mupIssue #293: passing k8s_resources to pod.set_spec does not work <juju-workaround> <Created by jetpackdanger> <https://github.com/canonical/operator/issues/293>11:56
Chipacaheh, i just realised why you said "if pjdc doesn't have the time"11:57
ballotChipaca: 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 code11:57
Chipacaballot: why comile juju?11:58
Chipacaohh.... no i meant just the fix on operator side, ie #36911:58
mupPR #369: use yaml instead of json for pod-spec-set call <Created by chipaca> <https://github.com/canonical/operator/pull/369>11:58
Chipacabecause 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 well11:58
ballotChipaca: aaaah, ok, much easier then :)11:58
ballotI thought I needed the fix on both sides11:59
mupPR operator#368 closed: Clarify ops.testing.Harness.update_config usage <Created by darkalia> <Merged by chipaca> <https://github.com/canonical/operator/pull/368>11:59
Chipacaballot: both fixes fix the issue independently :)12:01
Chipacaoff to lunch, bbl12:18
Chipacafacubatista: #113 could use a re-review13:17
mupIssue #113: Automatically transform config into pod spec <Created by knkski> <Closed by niemeyer> <https://github.com/canonical/operator/issues/113>13:17
Chipacaer13:17
Chipacacharmcraft#11313:17
mupPR charmcraft#113: init: include series in metadata.yaml <Created by chipaca> <https://github.com/canonical/charmcraft/pull/113>13:17
Chipacanarindergupta: ๐Ÿ‘‹13:18
narinderguptaChipaca, 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:19
Chipacanarindergupta: so I pulled mark's work into https://github.com/chipaca/ops-lib-k8s13:20
Chipacanarindergupta: the way you use it, add that to your requirements.txt, and then 'k8s = ops.lib.use("k8s", 0, "chipaca@canonical.com")'13:21
Chipacanarindergupta: 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
Chipacanarindergupta: am i making sense?13:22
narinderguptaChipaca, so start with charm craft init then make the change13:22
Chipacayep!13:23
narinderguptaChipaca, ok I think I can see that13:28
narinderguptaops_lib_k8s-0.0.dev0+unknown.dist-info/ and ops-0.8.0.dist-info/ in c=venv13:28
narinderguptaAfter charm build13:29
Chipaca'charmcraft build' i hope :')13:29
facubatistanarindergupta, you should not use the 'charm' tool13:29
narinderguptafacubatista, I am using charmcraft13:29
facubatistagreat13:30
facubatistanarindergupta, what is "c=venv"?13:30
narinderguptaWhat I meant is in venv directory13:31
narinderguptaChipaca, 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:43
Chipacanarindergupta: sorry i didn't follow that13:45
narinderguptaChipaca, 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
narinderguptaLike _on_start(self)13:46
narindergupta        if (self.model.pod.is_leader()):13:47
narindergupta            self.model.app.status = ActiveStatus('ready')13:47
narinderguptaBasically I wanted to set the application status as pod status if it is leader13:49
facubatistanarindergupta, 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 it13:58
Chipacanarindergupta: that is something the charm would do, yes14:01
Chipacanarindergupta: I'm not sure if that's your question though14:01
narinderguptaChipaca, yes that answers it and currently seeing to pass app data to k8s pod14:01
narinderguptaWill let you know if come across any issues14:02
Chipacanarindergupta: also note you can write self.app.status (it's the same, just shorter)14:02
narinderguptaChipaca, gotchu you that is helpful14:03
Chipacanarindergupta: and AFAIK it's not pod.is_lader but unit.is_leader :)14:03
Chipacaso you can write self.unit.is_leader14:04
narinderguptaChipaca, thank you14:04
Chipacaok, i'm out of here17:08
Chipacattfn!17:08
drewn3ssqq, 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
drewn3ssis there a specific path I should look for when doing import ops?17:38
drewn3ssor is it just available in my built venv?17:39
drewn3ssand I shouldn't worry about pathing17:39
drewn3ssok, 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
drewn3ssthat seems really weird, but I'll roll with it17:58
drewn3ssI think long term it'll make more sense for people joinnig into charming, so I'm okay with the rename17:59
drewn3ssanswer: use requirements.txt to get the modules you want installed from pip into the charm's venv.18:26
drewn3ssand remove symlinks and calls to lib paths for anything that was submoduled.18:26
drewn3ssbecause the import will work because it's part of the venv18:26
narinderguptaChipaca 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:38
narinderguptaI am trying to deploy the charm but getting this error18:39
drewn3sshow do I make charmcraft build include my CHARM_ROOT/files directory?18:50
drewn3ssor /templates, or any other path for that matter18:50
drewn3ssseems it pulls in /lib and /src and several .yaml/version files18:50
drewn3ssI'd expected it to pull everything not in .jujuignore18:51
drewn3ssfacubatista: ^18:51
facubatistadrewn3ss, it will do that, I'm currently working on it: https://github.com/canonical/charmcraft/issues/3918:53
facubatistanarindergupta, how are you deploying the charm?18:54
drewn3ssI 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 files18:54
facubatistadrewn3ss, the "entrypoint" is your main Python file, not a directory18:55
drewn3ssack18:56
facubatistadrewn3ss, to hack it until a proper solution is ready, you could include your files in the CHARM_OPTIONAL list18:56
facubatistadrewn3ss, in that build.py, line ~3818:56
drewn3ssis that environmental, arg-able or am I forking the code?18:56
drewn3ssforking the code...cool.18:56
drewn3ssthat's...a non-starter18:56
facubatistadrewn3ss, as I said, I'm working on the proper solution18:57
drewn3ssthank you :)18:57
drewn3ssI can also move my files dir to src18:58
drewn3ssas it seems all of src is included18:58
drewn3ssthat's reasonable for now18:58
* facubatista eods21:12

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