Skip to content

Commit 1201782

Browse files
authored
Run upgrade node script on the controller agent (#1808)
Controller agent is a pod on the controller which can access management pod easily when using this agent we don't run into trouble when the controller itself get's an update Signed-off-by: Jo De Boeck <[email protected]>
1 parent 93377b3 commit 1201782

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libs/agent-scripts/cloudbroker/grid/check_node_version.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ def is_up_to_date(current, target):
3838

3939

4040
def action():
41+
if j.system.platformtype.isVirtual():
42+
return
4143
scl = j.clients.osis.getNamespace("system")
4244
status = scl.node.get(j.application.whoAmI.nid).status
4345
if not scl.version.count({"status": "INSTALLING"}) and status == "ENABLED":
@@ -52,7 +54,7 @@ def action():
5254
acl.executeJumpscript(
5355
"greenitglobe",
5456
"update_node",
55-
role="controllernode",
57+
role="controller",
5658
gid=whoami.gid,
5759
args=args,
5860
wait=False,

libs/agent-scripts/cloudbroker/grid/update_node.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,8 @@
1414

1515

1616
def action(nodename):
17-
cmd = "kubectl --kubeconfig /root/.kube/config get service management-ssh -o=jsonpath='{.spec.clusterIP}'"
18-
host = j.system.process.execute(cmd)[1]
1917
try:
20-
mgt = j.remote.cuisine.connect(host, 22)
18+
mgt = j.remote.cuisine.connect('management', 2205)
2119
mgt.run("installer node jsaction upgrade --name {}".format(nodename))
2220
except:
2321
j.errorconditionhandler.raiseOperationalWarning(

0 commit comments

Comments
 (0)