/srv/irclogs.ubuntu.com/2017/08/05/#juju.txt

ak_devkjackal: kjackal_: kjackal__ : what is the difference between relation_get and get_remote?11:44
ak_devand likewise, between relation_set and set_remote ?11:44
kjackal_ak_dev: let me see what relation_set is doing11:45
ak_devkjackal_: yeah okay11:46
kjackal_ak_dev: seems the set/get_remote is used to send/recieve data to/from the other side. The relation_set seems to be setting relation info for the current unit. Did you see relation_set in an example?11:51
ak_devi saw relation_set in the docs here : https://jujucharms.com/docs/2.1/reference-charm-hooks, which says that the [name]-relation-changed will trigger only when settings are changed (I am assuming via relation_set)11:53
ak_devdoes set_remote/get_remote trigger [name]-relation-changed hook?11:54
kjackal_ak_dev: yes it does11:54
ak_devkjackal_: ah okay, and i can do set/get_remote multiple time too right? and it should change the data11:55
kjackal_correct11:55
ak_devkjackal_: cool, thanks ! I am going forward with the peer relation thing itself, stub suggested against using leadership layer for this use case11:56
kjackal_ok ak_dev, you know best11:56
ak_devkjackal_: just trying to learn, going forward with what you and others are suggesting here :-)11:58
ak_devkjackal_: sorry to disturb you again, but will the [name]-relation-joined trigger for each new unit added? (in case of peer relation)12:05
ak_devalso, if I understand right, if the above happens, then in case of three units,  [name]-relation-joined should be run twice on each unit right?12:06
kjackal_ak_dev: I think so, yes. Usualy you handle the join and changed hooks in the same method12:07
ak_devkjackal_: oh alright, thanks again :-)12:08

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