From fab177e07789bdab73a2e3a10d0106846c669223 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 20 Jul 2018 09:54:17 -0400 Subject: [PATCH] Fix node[group][attrib|define] handling of = Attributes with = in the value were not handled correctly, fix by only doing one split. --- confluent_client/bin/nodedefine | 2 +- confluent_client/bin/nodegroupdefine | 2 +- confluent_client/confluent/client.py | 2 +- confluent_server/confluent/plugins/hardwaremanagement/ipmi.py | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/confluent_client/bin/nodedefine b/confluent_client/bin/nodedefine index b5184757..3ea1fbcc 100755 --- a/confluent_client/bin/nodedefine +++ b/confluent_client/bin/nodedefine @@ -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: diff --git a/confluent_client/bin/nodegroupdefine b/confluent_client/bin/nodegroupdefine index bf79d5e5..068f86ad 100755 --- a/confluent_client/bin/nodegroupdefine +++ b/confluent_client/bin/nodegroupdefine @@ -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: diff --git a/confluent_client/confluent/client.py b/confluent_client/confluent/client.py index 2cc92996..d18cc152 100644 --- a/confluent_client/confluent/client.py +++ b/confluent_client/confluent/client.py @@ -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] == ',': diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index d59ee2bd..9073cec0 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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")