Skip to content

Commit

Permalink
Dev: utils: Always get node list from cib.xml to keep result consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxin1300 committed Jul 5, 2021
1 parent e65ff36 commit 789c04a
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions crmsh/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1718,16 +1718,6 @@ def getname(toks):
return None

try:
# when pacemaker running
rc, outp = stdout2list(['crm_node', '-l'], stderr_on=False, shell=False)
if rc == 0:
return [x for x in [getname(line.split()) for line in outp] if x and x != '(null)']

# when corosync running
ip_list = get_member_iplist()
if ip_list:
return ip_list

# static situation
cib_path = os.getenv('CIB_file', '/var/lib/pacemaker/cib/cib.xml')
if not os.path.isfile(cib_path):
Expand Down

0 comments on commit 789c04a

Please sign in to comment.