2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 04:50:21 +00:00

Clean up errors on bad ipv4 addresses

confluent errors are better now
This commit is contained in:
Jarrod Johnson 2018-05-17 16:24:06 -04:00
parent a9485706d1
commit 675dc966c7
2 changed files with 14 additions and 8 deletions

View File

@ -191,10 +191,6 @@ if setmode:
for node in fr.get('databynode', []):
r = fr['databynode'][node]
exitcode |= client.printerror(r, node)
if 'error' in r:
sys.stderr.write(node + ': ' + r['error'] + '\n')
if 'errorcode' in r:
rcode |= r['errorcode']
if 'value' not in r:
continue
keyval = r['value']

View File

@ -597,10 +597,20 @@ class IpmiHandler(object):
))
elif self.op == 'update':
config = self.inputdata.netconfig(self.node)
self.ipmicmd.set_net_configuration(
ipv4_address=config['ipv4_address'],
ipv4_configuration=config['ipv4_configuration'],
ipv4_gateway=config['ipv4_gateway'])
try:
self.ipmicmd.set_net_configuration(
ipv4_address=config['ipv4_address'],
ipv4_configuration=config['ipv4_configuration'],
ipv4_gateway=config['ipv4_gateway'])
except socket.error as se:
self.output.put(msg.ConfluentNodeError(self.node,
se.message))
except ValueError as e:
if e.message == 'negative shift count':
self.output.put(msg.ConfluentNodeError(
self.node, 'Invalid prefix length given'))
else:
raise
def handle_users(self):
# Create user