/srv/irclogs.ubuntu.com/2020/08/07/#juju.txt

=== ulidtko|kk is now known as ulidtko
iceyhey, I'm seeing a new error: ERROR cannot add relation "prometheus:target prometheus-snmp-exporter:snmp-exporter": establishing a new relation for prometheus:target would exceed its maximum relation limit of 1 (quota limit exceeded)11:50
iceyany suggestions for how to resolve it?11:50
achilleasaicey: passing --force will allow the relation to be established. Can you point me to the charm versions that you are using?11:53
iceyachilleasa: prometheus (prometheus2): 1811:54
iceyprometheus-snmp-exporter: 111:54
iceyI've removed the snmp-exporter and re-added it11:54
icey(testing something out)11:54
achilleasaFYI: juju 2.8 enforces relation limits as specified in charm metadata; there has been a related bug (https://bugs.launchpad.net/juju/+bug/1887095) but we have not been able to reproduce11:55
mupBug #1887095: Default relation limit of 1 prevents adding relations <juju:Incomplete by achilleasa> <https://launchpad.net/bugs/1887095>11:55
icey$ juju add-relation --force prometheus:target prometheus-snmp-exporter:snmp-exporter11:55
iceyERROR option provided but not defined: --force11:55
iceyweird that, apparently, removing an application doesn't reduce that count back to zero :)11:55
iceyachilleasa: also, doing a `juju deploy $bundle --force` shows the same erorr about not being able to add the relation11:56
achilleasaicey: interesting. can you please add a comment to the above bug? the relation count should certainly not be 1 if you remove the application11:58
achilleasaicey: just curious, did you happen to deploy prometheus to a 2.7.x model and then upgraded to 2.8.x?12:00
iceyI did12:00
icey(this lab of mine is a lovely source or finding weird bugs :-P )12:01
achilleasaicey: ok... I see what happened here... the charm parser in 2.7 juju used to set a default relation limit of 1 (even if not present in the metadata). That got persisted to the controller and triggers the error after the upgrade12:02
iceyhaha wow12:02
iceyeven if the application is removed...12:02
iceyI can remove the application and try again, if you think it's worth it12:03
achilleasaplease do12:03
icey(alternately, db surgery to update it?)12:03
achilleasathis explains why we couldn't reproduce the problem12:03
iceyhttps://pastebin.ubuntu.com/p/TDPzsjghJr/12:05
achilleasamanadart_: this will probably cause issues when attempting to add relations after a 2.7->2.8 upgrade. any thoughts on how we can fix it? We could play it safe and add an upgrade step to reset the limit in the stored charm metadata12:06
iceyachilleasa: let me redact those ipv6 addresses and I'll post that on the bug as well12:07
achilleasaicey: thanks12:07
iceyachilleasa: in the mean time, any suggestions for db surgery that I can do to get my snmp-exporter working again?12:08
achilleasaicey: sure; give me a min to write a fix query12:09
iceyachilleasa: and, I suspect that the issue I'm hitting isn't related to the app reggint removed, it's that there are other consumers of the prometheus-exporter relation (telegraf)12:10
iceyachilleasa: thanks :)12:10
achilleasaicey: in the meantime, is that the latest version of the charm? If not, doing an upgrade-charm --force should reset the limit12:14
iceyachilleasa: it seems to be - what if I do an upgrade-charm --force on it anyways?12:15
iceyachilleasa: my bundle just has: charm: cs:prometheus212:15
iceywell that's cool: $ juju upgrade-charm --force prometheus12:15
iceyERROR already running latest charm "cs:prometheus2-18"12:15
iceyinterestingly, my first attempt to redeploy this bundle on the model should have upgraded the _other_ consumer of the exporter relation :-P12:16
manadart_achilleasa: Need to discuss it with you. Later this afternoon?12:23
achilleasamanadart_: sure12:27
achilleasaicey: can you try this? https://pastebin.canonical.com/p/fb9W78NYRV/12:27
achilleasaI am assuming that this is a disposable model, right?12:28
iceyachilleasa: heh well12:28
iceyit's my controller model :)12:28
iceyas well as where I've stuck my monitoring12:29
iceybut it is in my lab12:29
iceyso, while I'd rather keep it around, it is rebuildable :-D12:29
achilleasait just resets the limit in the charm metadata so it should be a pretty harmless change12:29
iceyyeah, I did read the query before looking at hoe to actually connect to juju's mongo :)12:30
iceybah, not on the master12:30
* icey retries12:30
iceywell that's odd12:31
iceyhttps://pastebin.ubuntu.com/p/vKB8yQMYZd/12:31
iceysame thing worked on the first unit I tried to connect12:32
iceyweird, has a different passsword saved, other one works12:32
achilleasaerrr not sure about that one12:32
iceyachilleasa: tried https://paste.ubuntu.com/21232100/12:33
iceythe three units (who doesn't run juju in HA) had different passwords stored, apparently12:33
iceyanyways, query seems to have worked, and I can still talk to juju12:33
achilleasadoes add-relation work now?12:33
iceyachilleasa: I did successfully redeploy that bundle :)12:35
iceyso, yes!12:35
achilleasaI will add this as a quick fix solution to the bug and chat with manadart_ about the best way to fix this12:38

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