We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2206f2 commit e787dbbCopy full SHA for e787dbb
examples/jira/jira_dc_remove_stale_nodes.py
@@ -0,0 +1,8 @@
1
+# coding=utf-8
2
+from atlassian import Jira
3
+"""Remove stale nodes from cluster before version 8.10
4
+See https://confluence.atlassian.com/jirakb/remove-abandoned-or-offline-nodes-in-jira-data-center-946616137.html
5
+"""
6
+jira = Jira(url="http://localhost:8080", username="admin", password="admin")
7
+stale_node_ids = [_ ["nodeId"] for _ in jira.get_cluster_all_nodes() if not _["alive"] and _["state"] == "OFFLINE"]
8
+for _ in stale_node_ids: jira.delete_cluster_node(_)
0 commit comments