2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-12-23 19:52:10 +00:00

Fix node[group][attrib|define] handling of =

Attributes with = in the value were not handled correctly,
fix by only doing one split.
This commit is contained in:
Jarrod Johnson 2018-07-20 09:54:17 -04:00
parent a1ba5f59a8
commit fab177e077
4 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@ session = client.Command()
exitcode = 0
attribs = {'name': noderange}
for arg in args[1:]:
key, val = arg.split('=')
key, val = arg.split('=', 1)
attribs[key] = val
for r in session.create('/noderange/', attribs):
if 'error' in r:

View File

@ -47,7 +47,7 @@ session = client.Command()
exitcode = 0
attribs = {'name': noderange}
for arg in args[1:]:
key, val = arg.split('=')
key, val = arg.split('=', 1)
attribs[key] = val
for r in session.create('/nodegroups/', attribs):
if 'error' in r:

View File

@ -530,7 +530,7 @@ def updateattrib(session, updateargs, nodetype, noderange, options):
if "=" in updateargs[1]:
try:
for val in updateargs[1:]:
val = val.split('=')
val = val.split('=', 1)
if val[0][-1] in (',', '-', '^'):
key = val[0][:-1]
if val[0][-1] == ',':

View File

@ -406,8 +406,8 @@ class IpmiHandler(object):
ipmisess = persistent_ipmicmds[(node, tenant)].ipmi_session
begin = util.monotonic_time()
while ((not (self.broken or self.loggedin)) and
(util.monotonic_time() - begin) < 180):
ipmisess.wait_for_rsp(180)
(util.monotonic_time() - begin) < 80):
ipmisess.wait_for_rsp(80)
if not (self.broken or self.loggedin):
raise exc.TargetEndpointUnreachable(
"Login process to " + connparams['bmc'] + " died")