mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 11:01:09 +00:00
Clean up errors on bad ipv4 addresses
confluent errors are better now
This commit is contained in:
parent
a9485706d1
commit
675dc966c7
@ -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']
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user