projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0860cf3
)
Feature 8720: Get leader unit to execute action
23/8723/2
author
David Garcia
<david.garcia@canonical.com>
Wed, 25 Mar 2020 15:23:14 +0000
(16:23 +0100)
committer
David Garcia
<david.garcia@canonical.com>
Thu, 26 Mar 2020 08:58:37 +0000
(09:58 +0100)
Change-Id: I745bdadd96e7af0c4ef00fc5c0b41e71708cb489
Signed-off-by: David Garcia <david.garcia@canonical.com>
n2vc/n2vc_juju_conn.py
patch
|
blob
|
history
diff --git
a/n2vc/n2vc_juju_conn.py
b/n2vc/n2vc_juju_conn.py
index
f57b008
..
9230e6d
100644
(file)
--- a/
n2vc/n2vc_juju_conn.py
+++ b/
n2vc/n2vc_juju_conn.py
@@
-1025,7
+1025,10
@@
class N2VCJujuConnector(N2VCConnector):
application = await self._juju_get_application(model_name=model_name, application_name=application_name)
- unit = application.units[0]
+ unit = None
+ for u in application.units:
+ if await u.is_leader_from_status():
+ unit = u
if unit is not None:
actions = await application.get_actions()
if action_name in actions: