Skip to content

Commit

Permalink
Added 6049p to list of supermicros in config.
Browse files Browse the repository at this point in the history
Fixed badfish init on supermicros.

Change-Id: I1f017b9a4467f1f9db8528b993df29aa5870ac6d
  • Loading branch information
grafuls committed Jun 12, 2019
1 parent 560f4aa commit b1c4ba3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion quads/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def quads_load_config(quads_config):
QUADSVERSION = "1.1.0"
QUADSCODENAME = "gaúcho"
SUPPORTED = ["r620", "r630", "r720", "r730xd", "r930", "r730", "r740xd", "r720xd"]
SUPERMICRO = ["1029p", "1029u", "1028r", "6029p", "6018r", "6048r", "5039ms"]
SUPERMICRO = ["1029p", "1029u", "1028r", "6029p", "6018r", "6048r", "5039ms", "6049p"]
OFFSETS = {"em1": 0, "em2": 1, "em3": 2, "em4": 3}
TEMPLATES_PATH = os.path.join(os.path.dirname(__file__), "templates")
INTERFACES = {
Expand Down
11 changes: 4 additions & 7 deletions quads/tools/move_and_rebuild_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ def move_and_rebuild(host, old_cloud, new_cloud, rebuild=False):
execute_ipmi(host, arguments=ipmi_set_operator)

if rebuild and _new_cloud_obj.name != "cloud01":
badfish = Badfish("mgmt-%s" % host, conf["ipmi_username"], conf["ipmi_password"])

if "pdu_management" in conf and conf["pdu_management"]:
# TODO: pdu management
pass
Expand All @@ -145,6 +143,8 @@ def move_and_rebuild(host, old_cloud, new_cloud, rebuild=False):
execute_ipmi(host, arguments=ipmi_pxe_persistent)

if is_supported(host):
badfish = Badfish("mgmt-%s" % host, conf["ipmi_username"], conf["ipmi_password"])

try:
badfish.change_boot(
"director",
Expand All @@ -155,9 +155,7 @@ def move_and_rebuild(host, old_cloud, new_cloud, rebuild=False):
)
except SystemExit:
logger.exception("Could not set boot order via Badfish.")
logger.info("Rebooting via IPMI for next run")
badfish.reset_idrac()
ipmi_reset(host)
badfish.clear_job_queue(force=True)
return False

foreman_success = foreman.remove_extraneous_interfaces(host)
Expand Down Expand Up @@ -190,8 +188,7 @@ def move_and_rebuild(host, old_cloud, new_cloud, rebuild=False):
badfish.reboot_server(graceful=False)
except SystemExit:
logger.exception("Error setting PXE boot via Badfish on: %s." % host)
logger.info("Rebooting via IPMI for next run")
badfish.reset_idrac()
badfish.clear_job_queue(force=True)
return False
else:
if is_supermicro(host):
Expand Down

0 comments on commit b1c4ba3

Please sign in to comment.