Skip to content

Commit

Permalink
Merge pull request #7 from inouekazu/RHEL8.4
Browse files Browse the repository at this point in the history
Rhel8.4
  • Loading branch information
inouekazu authored Apr 23, 2021
2 parents bf73e5e + 757f3ed commit 8f0642a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT(pm_extra_tools, 1.2)
AC_INIT(pm_extra_tools, 1.3)
AM_INIT_AUTOMAKE

# Checks for programs.
Expand Down
15 changes: 6 additions & 9 deletions pm_pcsgen/pm_pcsgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# pm_pcsgen : Pacemaker CIB(xml) and PCS(sh) generator
#
# Copyright (C) 2020 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
# Copyright (C) 2020-2021 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
Expand Down Expand Up @@ -261,7 +261,7 @@ def parse_option(self):
description=f"To set 'cluster node (NODE table)', cluster must be live.\n{d}",
prog='pm_pcsgen',
formatter_class=argparse.RawTextHelpFormatter)
p.add_argument('-$','--version',action='version',version='1.1',
p.add_argument('-$','--version',action='version',version='1.2',
help='Print %(prog)s version information.')
p.add_argument('-V','--verbose',action='count',dest='loglv',default=Log.WARN,
help='Increase debug output.')
Expand Down Expand Up @@ -1643,11 +1643,6 @@ def xml_chk_resources(self):
elif not self.xml_get_childs(x,['rsc']):
log.fmterr_l(f'{x.nodeName}リソース「id: {id}」にリソースが設定されていません',
x.getAttribute(ATTR_C))
elif x.nodeName == Mode.CLNE.value or x.nodeName == Mode.PROM.value:
expect = '%s-clone'%(self.xml_get_childs(x,['rsc'])[0].getAttribute('id'))
if id != expect:
log.fmterr_l(f'{x.nodeName}リソースのIDには「{expect}」を設定してください',
x.getAttribute(ATTR_C))

def xml_chk_location_rule(self):
for x in [x for y in self.root.getElementsByTagName(Mode.LOCR.value)
Expand Down Expand Up @@ -1893,8 +1888,8 @@ def x2p_util(node):
def x2p_rsc_advanced(self,node):
#
# pcs resource group add <group id> <resource id>...
# pcs resource clone <resource id | group id>
# pcs resource promotable <resource id | group id>
# pcs resource clone <resource id | group id> <clone id>
# pcs resource promotable <resource id | group id> <clone id>
# +
# pcs resource meta <group id | clone id> <name>=<value>
#
Expand All @@ -1903,6 +1898,8 @@ def x2p_rsc_advanced(self,node):
z.append(node.getAttribute('id'))
for x in [x for x in node.childNodes if x.nodeName == 'rsc']:
z.append(x.getAttribute('id'))
if node.nodeName == Mode.CLNE.value or node.nodeName == Mode.PROM.value:
z.append(node.getAttribute('id'))
s.append(CMNT[node.nodeName])
s.append('%s %s'%(PCSF[node.nodeName],' '.join(z)))
self.run_pcs(s[-1],node.getAttribute(ATTR_C))
Expand Down
Binary file modified pm_pcsgen/pm_pcsgen_sample.xlsx
Binary file not shown.

0 comments on commit 8f0642a

Please sign in to comment.