diff --git a/CHANGELOG.md b/CHANGELOG.md index e99d479..306f45e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 45drives-tools 2.2.2-6 +## 45drives-tools 2.2.3-1 -* added rudimentary bus address translation for ROMED8-2T Motherboards \ No newline at end of file +* updated server_identifier and lsdev to operate with ceph gateway servers more gracefully \ No newline at end of file diff --git a/manifest.json b/manifest.json index e8a25d3..b14baa4 100644 --- a/manifest.json +++ b/manifest.json @@ -2,9 +2,9 @@ "__version": "45D-R1", "name": "45drives-tools", "title": "45drives-tools", - "prerelease": false, - "version": "2.2.2", - "buildVersion": "6", + "prerelease": true, + "version": "2.2.3", + "buildVersion": "1", "author": "Mark Hooper ", "url": "https://github.com/45Drives/tools", "category": "utils", @@ -64,8 +64,8 @@ ], "changelog": { "urgency": "medium", - "version": "2.2.2", - "buildVersion": "6", + "version": "2.2.3", + "buildVersion": "1", "ignore": [], "date": null, "packager": "Mark Hooper ", diff --git a/packaging/el7/main.spec b/packaging/el7/main.spec index 890eb40..a4def4f 100644 --- a/packaging/el7/main.spec +++ b/packaging/el7/main.spec @@ -58,6 +58,13 @@ fi /usr/lib/udev/rules.d/* %changelog +* Fri Jun 23 2023 Mark Hooper 2.2.3-1 +- updated server_identifier and lsdev to operate with ceph gateway servers more gracefully +* Fri Jun 23 2023 Mark Hooper 2.2.2-8 +- added contingency in server_identifier for 2U Gateway servers +* Tue Jun 13 2023 Mark Hooper 2.2.2-7 +- added a check in server_identifier to ensure that the bus address of a given HBA + matches that found in /sys/bus/pci/devices * Mon Jun 12 2023 Mark Hooper 2.2.2-6 - added rudimentary bus address translation for ROMED8-2T Motherboards * Tue May 23 2023 Mark Hooper 2.2.2-5 diff --git a/packaging/el8/main.spec b/packaging/el8/main.spec index edeb001..3325f5b 100644 --- a/packaging/el8/main.spec +++ b/packaging/el8/main.spec @@ -58,6 +58,13 @@ fi /usr/lib/udev/rules.d/* %changelog +* Fri Jun 23 2023 Mark Hooper 2.2.3-1 +- updated server_identifier and lsdev to operate with ceph gateway servers more gracefully +* Fri Jun 23 2023 Mark Hooper 2.2.2-8 +- added contingency in server_identifier for 2U Gateway servers +* Tue Jun 13 2023 Mark Hooper 2.2.2-7 +- added a check in server_identifier to ensure that the bus address of a given HBA + matches that found in /sys/bus/pci/devices * Mon Jun 12 2023 Mark Hooper 2.2.2-6 - added rudimentary bus address translation for ROMED8-2T Motherboards * Tue May 23 2023 Mark Hooper 2.2.2-5 diff --git a/packaging/focal/changelog b/packaging/focal/changelog index bf9805e..1dcc9e9 100644 --- a/packaging/focal/changelog +++ b/packaging/focal/changelog @@ -1,3 +1,23 @@ +45drives-tools (2.2.3-1focal) focal; urgency=medium + + * updated server_identifier and lsdev to operate with ceph gateway servers more + gracefully + + -- Mark Hooper Fri, 23 Jun 2023 08:46:49 -0300 + +45drives-tools (2.2.2-8focal) focal; urgency=medium + + * added contingency in server_identifier for 2U Gateway servers + + -- Mark Hooper Fri, 23 Jun 2023 08:01:32 -0300 + +45drives-tools (2.2.2-7focal) focal; urgency=medium + + * added a check in server_identifier to ensure that the bus address of a given + HBA matches that found in /sys/bus/pci/devices + + -- Mark Hooper Tue, 13 Jun 2023 13:16:03 -0300 + 45drives-tools (2.2.2-6focal) focal; urgency=medium * added rudimentary bus address translation for ROMED8-2T Motherboards diff --git a/tools/dmap b/tools/dmap index 0404a63..3c7fb71 100755 --- a/tools/dmap +++ b/tools/dmap @@ -437,6 +437,9 @@ def create_vdev_id(server): "2USTORNADO":{ "2U":[16,16] }, + "2UTMSTORNADO":{ + "2UTM":[8,8,8,8] + }, "AV15-BASE":{ "AV15":[0] }, @@ -459,13 +462,13 @@ def create_vdev_id(server): # Make sure that the user didn't make any manual edits that can throw dmap. if server["Alias Style"] not in alias_template.keys(): log("/opt/45drives/tools/dmap: !! ERROR !! Invalid Alias Style set in /etc/45drives/server_info/server_info.json") - log(" Valid Options are: ", alias_template.keys()) + log(" Valid Options are: {o}".format(o=alias_template.keys())) log(" You can manually edit this file by setting \"Edit Mode\": true") log(" in /etc/45drives/server_info/server_info.json along with any other parameters") sys.exit(1) elif server["Chassis Size"] not in alias_template[server["Alias Style"]].keys(): log("/opt/45drives/tools/dmap: !! ERROR !! Invalid Chassis Size and Alias Style combination set in /etc/45drives/server_info/server_info.json") - log(" Valid Chassis Size Options for " + server["Alias Style"] + " are: ", alias_template[server["Alias Style"]].keys()) + log(" Valid Chassis Size Options for " + server["Alias Style"] + " are: {o}".format(o=alias_template[server["Alias Style"]].keys())) log(" You can manually edit this file by setting \"Edit Mode\": true") log(" in /etc/45drives/server_info/server_info.json along with any other parameters") sys.exit(1) diff --git a/tools/lsdev b/tools/lsdev index 55e2ed1..f75f2a7 100755 --- a/tools/lsdev +++ b/tools/lsdev @@ -306,6 +306,9 @@ def build_server(options): "2USTORNADO":{ "2U":[32] }, + "2UTMSTORNADO":{ + "2UTM":[32] + }, "AV15-BASE":{ "AV15":[15] }, @@ -331,6 +334,10 @@ def build_server(options): try: vdev_id = open(CONFIG_PATH + "/vdev_id.conf", mode='r') except IOError: + if "Chassis Size" in server_obj.keys() and server_obj["Chassis Size"] in ["2UGW"]: + print("This program is intended to display disk information for servers with dedicated storage bays.".format(astyle=server_obj["Alias Style"])) + print("Use command line utilities such as lsblk to see disk information for Ceph Gateways.".format(astyle=server_obj["Alias Style"])) + exit(1) print("Error opening " + CONFIG_PATH + "/vdev_id.conf. Run `dmap`.") exit(1) @@ -338,6 +345,10 @@ def build_server(options): print("Unable to determine Alias Style from /etc/45drives/server_info/server_info.json: ") print(json.dumps(server_obj,indent=4)) exit(1) + elif "Chassis Size" in server_obj.keys() and server_obj["Chassis Size"] in ["2UGW"]: + print("This program is intended to display disk information for servers with dedicated storage bays.".format(astyle=server_obj["Alias Style"])) + print("Use command line utilities such as lsblk to see disk information for Ceph Gateways.".format(astyle=server_obj["Alias Style"])) + exit(1) elif server_obj["Alias Style"] not in alias_template.keys(): print("Unknown Alias Style '{astyle}' encountered.".format(astyle=server_obj["Alias Style"])) exit(1) @@ -618,7 +629,7 @@ def print_bays(server, options, osd, server_info): table_print(ansi = options.colour, c_count = len(print_array), c_txt = print_array, c_labels = col_headers, h_txt = header_text, padding = 1) # legend - if "Alias Style" in server_info.keys() and server_info["Alias Style"] != "2USTORNADO": + if "Alias Style" in server_info.keys() and server_info["Alias Style"] not in ["2USTORNADO","2UTMSTORNADO"]: print(" <-- motherboard | front plate -->") print(" Legend:") if options.colour: diff --git a/tools/server_identifier b/tools/server_identifier index f63a1ce..af0f8f5 100755 --- a/tools/server_identifier +++ b/tools/server_identifier @@ -21,7 +21,7 @@ g_product_lut_idx = { "ALIAS_STYLE": 4 } -g_chassis_sizes = ["?","AV15","Q30","S45","XL60","F8X1","F8X2","F8X3"] +g_chassis_sizes = ["?","AV15","Q30","S45","XL60","F8X1","F8X2","F8X3","2U","2UGW","2UTM"] g_mobo_to_version_lut = { "Base": ["X11SSH-CTF","X11SSM-F"], @@ -29,11 +29,17 @@ g_mobo_to_version_lut = { "Enhanced": ["X11SPL-F","X10SRL-F"], "Enhanced-S":["X11SPL-F"], "Enhanced-AMD":["H11SSL-i"], - "Turbo": ["X11DPL-i","X10DRL-i"], - "Turbo-G":["X11SPL-F"], + "Turbo": ["X11DPL-i","X10DRL-i","X12DPi-N6"], + "Turbo-G":["X11SPL-F","X12DPi-N6"], } g_product_lut = { + "Gateway-2UGW-Base": [g_mobo_to_version_lut["Base"],0,0,"2UGW","2UGW"], + "Gateway-2UGW-Base-B": [g_mobo_to_version_lut["Base"],0,0,"2UGW","2UGW"], + "Gateway-2UGW-Enhanced": [g_mobo_to_version_lut["Enhanced"],0,0,"2UGW","2UGW"], + "Gateway-2UGW-Enhanced-S": [g_mobo_to_version_lut["Enhanced"],0,0,"2UGW","2UGW"], + "Gateway-2UGW-Turbo-G": [g_mobo_to_version_lut["Turbo"],0,0,"2UGW","2UGW"], + "Storinator-AV15-Base": [g_mobo_to_version_lut["Base"],0,0,"AV15","AV15-BASE"], "Storinator-AV15-Base-B": [g_mobo_to_version_lut["Base-B"],0,1,"AV15","STORINATOR"], "Storinator-AV15-Enhanced": [g_mobo_to_version_lut["Enhanced"],0,1,"AV15","STORINATOR"], @@ -184,6 +190,12 @@ g_product_lut = { "Stornado-2U-Turbo-G": [g_mobo_to_version_lut["Turbo-G"] ,0,2,"2U","2USTORNADO"], "Stornado-2U-Turbo": [g_mobo_to_version_lut["Turbo"] ,0,2,"2U","2USTORNADO"], + "Stornado-2UTM-Base-B": [g_mobo_to_version_lut["Base-B"] ,0,4,"2UTM","2UTMSTORNADO"], + "Stornado-2UTM-Enhanced-AMD": [g_mobo_to_version_lut["Enhanced-AMD"] ,0,4,"2UTM","2UTMSTORNADO"], + "Stornado-2UTM-Enhanced-S": [g_mobo_to_version_lut["Enhanced-S"] ,0,4,"2UTM","2UTMSTORNADO"], + "Stornado-2UTM-Turbo-G": [g_mobo_to_version_lut["Turbo-G"] ,0,4,"2UTM","2UTMSTORNADO"], + "Stornado-2UTM-Turbo": [g_mobo_to_version_lut["Turbo"] ,0,4,"2UTM","2UTMSTORNADO"], + "Destroyinator-AV15-Enhanced": [g_mobo_to_version_lut["Enhanced"],0,1,"AV15","DESTROYINATOR"], "Destroyinator-AV15-Enhanced-S": [g_mobo_to_version_lut["Enhanced-S"],0,1,"AV15","DESTROYINATOR"], "Destroyinator-Q30-Enhanced": [g_mobo_to_version_lut["Enhanced"] ,0,2,"Q30","DESTROYINATOR"], @@ -467,6 +479,8 @@ def hba_lspci(server): for pci_slot in pci_slots: for card in hba: if card["Bus Address"] in pci_slot["Bus Address"]: + # The bus address provided by dmidecode contains the bus address provided by lspci. + # we can assign the PCI Slot accordingly. card["PCI Slot"] = pci_slot["ID"] if len(sys_bus_addrs) > 0 and pci_slot["Bus Address"] not in sys_bus_addrs: # dmidecode gave a bus address that does not match the one used by the system @@ -481,14 +495,25 @@ def hba_lspci(server): # use the bus address provided by dmidecode # update the cards bus address to the full format (eg: 0000:01:00.0) card["Bus Address"] = pci_slot["Bus Address"] - - #sort the final list of hba cards by the Bus Address field. This ensures that - #the order in which they are stored resembles the lspci output. which has - #worked reliably in the past. + + #ensure that the bus address is the one in use by the system. + verify_bus_addresses(sys_bus_addrs,hba) + + #sort them in ascending order hba = sorted(hba, key=lambda k: k['Bus Address']) return hba, hybrid_flag +def verify_bus_addresses(sys_bus_addrs,hba_cards): + for card in hba_cards: + if len(sys_bus_addrs) > 0: + for j in range(0,len(sys_bus_addrs)): + if card["Bus Address"] in sys_bus_addrs[j]: + # we have found the system bus address that matches the substring + # address provided by lspci update the card's bus address field + card["Bus Address"] = sys_bus_addrs[j] + break + def hba(): # determine the model and count of hba cards present in the system # by parsing the output of /opt/45drives/tools/storcli64 show.