diff --git a/confluent_osdeploy/el8/profiles/default/scripts/configbmc b/confluent_osdeploy/el8/profiles/default/scripts/configbmc index 610b3c9c..50f1f170 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/configbmc +++ b/confluent_osdeploy/el8/profiles/default/scripts/configbmc @@ -321,7 +321,9 @@ def main(): vendor = open('/sys/devices/virtual/dmi/id/sys_vendor').read() vendor = vendor.strip() try: - model = open('/sys/devices/virtual/dmi/id/product_sku').read() + model = open('/sys/devices/virtual/dmi/id/product_sku').read().strip() + if model == 'none': + raise Exception('no sku') except Exception: model = open('/sys/devices/virtual/dmi/id/product_name').read() if vendor in ('Lenovo', 'IBM'): diff --git a/confluent_osdeploy/genesis/profiles/default/scripts/configbmc b/confluent_osdeploy/genesis/profiles/default/scripts/configbmc index 610b3c9c..b1afcda5 100644 --- a/confluent_osdeploy/genesis/profiles/default/scripts/configbmc +++ b/confluent_osdeploy/genesis/profiles/default/scripts/configbmc @@ -169,6 +169,7 @@ def set_port_tsm(s, port, model): raise Exception("Unsupported port for TSM") timer = 15 while timer: + timer = timer - 1 time.sleep(1.0) sys.stdout.write('.') sys.stdout.flush() @@ -178,7 +179,7 @@ def set_port_tsm(s, port, model): elif port == 'dedicated': iface = 1 s.raw_command(0x32, 0x71, b'\x00\x01\x03') - rsp = s.raw_command(0x32, 0x72, bytearray(4, iface, 0)) + rsp = s.raw_command(0x32, 0x72, bytearray([4, iface, 0])) print('Complete') return int(rsp['data'][0]) @@ -321,7 +322,9 @@ def main(): vendor = open('/sys/devices/virtual/dmi/id/sys_vendor').read() vendor = vendor.strip() try: - model = open('/sys/devices/virtual/dmi/id/product_sku').read() + model = open('/sys/devices/virtual/dmi/id/product_sku').read().strip() + if model == 'none': + raise Exception('No SKU') except Exception: model = open('/sys/devices/virtual/dmi/id/product_name').read() if vendor in ('Lenovo', 'IBM'): diff --git a/confluent_server/bin/osdeploy b/confluent_server/bin/osdeploy index cc059abc..1fbb3d53 100644 --- a/confluent_server/bin/osdeploy +++ b/confluent_server/bin/osdeploy @@ -114,7 +114,7 @@ def local_node_trust_setup(): 'IgnoreRhosts no']) if domain and not myname.endswith(domain): myprincipals.add('{0}.{1}'.format(myname, domain)) - if '.' in myname and myname.endswith(domain): + if domain and '.' in myname and myname.endswith(domain): myprincipals.add(myname.split('.')[0]) for pubkey in glob.glob('/etc/ssh/ssh_host_*_key.pub'): currpubkey = open(pubkey, 'rb').read() diff --git a/confluent_server/confluent/discovery/handlers/generic.py b/confluent_server/confluent/discovery/handlers/generic.py index abc0929b..aca0f864 100644 --- a/confluent_server/confluent/discovery/handlers/generic.py +++ b/confluent_server/confluent/discovery/handlers/generic.py @@ -21,7 +21,7 @@ class NodeHandler(object): https_supported = True is_enclosure = False devname = '' - maxmacs = 2 # reasonable default, allowing for common scenario of + maxmacs = 3 # reasonable default, allowing for common scenario of # shared nic in theory, but blocking enclosure managers # and uplink ports @@ -122,4 +122,4 @@ class NodeHandler(object): except Exception: self._certfailreason = 2 return None - return self._fp \ No newline at end of file + return self._fp