diff --git a/confluent_client/bin/nodeconfig b/confluent_client/bin/nodeconfig index 170fe335..e0f19885 100755 --- a/confluent_client/bin/nodeconfig +++ b/confluent_client/bin/nodeconfig @@ -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'] diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index ae93d8e9..e2e9ecd6 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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