diff --git a/confluent_client/bin/nodeconfig b/confluent_client/bin/nodeconfig index b68888b3..5b752826 100755 --- a/confluent_client/bin/nodeconfig +++ b/confluent_client/bin/nodeconfig @@ -99,6 +99,7 @@ assignment = {} queryparms = {} printsys = [] printbmc = [] +printallbmc = False setsys = {} forceset = False needval = None @@ -123,7 +124,7 @@ def _assign_value(): def parse_config_line(arguments): - global setmode, forceset, key, value, needval, candidate, path, attrib + global setmode, printallbmc, forceset, key, value, needval, candidate, path, attrib for param in arguments: if param == 'show': continue # forgive muscle memory of pasu users @@ -155,6 +156,8 @@ def parse_config_line(arguments): if setmode != False: bailout('Cannot do set and query in same command') if '.' not in param: + if param == 'bmc': + printallbmc = True matchedparms = False for candidate in cfgpaths: if candidate.startswith('{0}.'.format(param)): @@ -266,7 +269,7 @@ else: NullOpt(), queryparms[path]) if rc: sys.exit(rc) - if printbmc: + if printbmc or printallbmc: rcode = client.print_attrib_path( '/noderange/{0}/configuration/management_controller/extended/all'.format(noderange), session, printbmc, options, attrprefix='bmc.') diff --git a/confluent_server/confluent/discovery/handlers/xcc.py b/confluent_server/confluent/discovery/handlers/xcc.py index 1ae0b160..d7809dde 100644 --- a/confluent_server/confluent/discovery/handlers/xcc.py +++ b/confluent_server/confluent/discovery/handlers/xcc.py @@ -386,11 +386,17 @@ class NodeHandler(immhandler.NodeHandler): raise exc.NotImplementedException('IPv6 remote config TODO') netconfig = netutil.get_nic_config(self.configmanager, nodename, ip=newip) newmask = netutil.cidr_to_mask(netconfig['prefix']) - # do not change the ipv4_config if the current config looks - statargs = {'ENET_IPv4Ena': '1', 'ENET_IPv4AddrSource': '0', 'ENET_IPv4StaticIPAddr': newip, 'ENET_IPv4StaticIPNetMask': newmask} - if netconfig['ipv4_gateway']: - statargs['ENET_IPv4GatewayIPAddr'] = netconfig['ipv4_gateway'] - wc.grab_json_response('/api/dataset', statargs) + currinfo = wc.grab_json_response('/api/providers/logoninfo') + currip = currinfo.get('items', [{}])[0].get('ipv4_address', '') + # do not change the ipv4_config if the current config looks right already + if currip != newip: + statargs = { + 'ENET_IPv4Ena': '1', 'ENET_IPv4AddrSource': '0', + 'ENET_IPv4StaticIPAddr': newip, 'ENET_IPv4StaticIPNetMask': newmask + } + if netconfig['ipv4_gateway']: + statargs['ENET_IPv4GatewayIPAddr'] = netconfig['ipv4_gateway'] + wc.grab_json_response('/api/dataset', statargs) elif self.ipaddr.startswith('fe80::'): self.configmanager.set_node_attributes( {nodename: {'hardwaremanagement.manager': self.ipaddr}}) diff --git a/confluent_server/confluent/forwarder.py b/confluent_server/confluent/forwarder.py index 676c2e57..a6b5b80b 100644 --- a/confluent_server/confluent/forwarder.py +++ b/confluent_server/confluent/forwarder.py @@ -49,6 +49,7 @@ def forward_port(sock, target, clientip, sessionid): continue try: client = socket.create_connection((target, 443)) + client.setsockopt(socket.IPPROTO_TCP, socket.TCP_MAXSEG, 1456) except Exception: conn.close() continue @@ -68,6 +69,7 @@ def forward_video(): try: vidclient = socket.create_connection((vidtargetbypeer[cli[0]], 3900)) + vidclient.setsockopt(socket.IPPROTO_TCP, socket.TCP_MAXSEG, 1456) except Exception: conn.close() continue