Skip to content

Commit

Permalink
fix BMC update failed from slave
Browse files Browse the repository at this point in the history
  • Loading branch information
bolv authored and tiantianlv committed Jul 24, 2019
1 parent fc9f359 commit adcf58a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
flash = fw_extra_str if fw_extra_str in [
"master", "slave", "both"] else "both"
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
# flash = "master" if current_bmc == "slave" else "slave"
flash = "slave"
json_data["flash"] = flash

# Install BMC
Expand All @@ -290,6 +291,7 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
r = requests.post(self.bmc_info_url, json=json_data)
if r.status_code == 200 and 'success' in r.json().get('result'):
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
self.__update_fw_upgrade_logger(
"bmc_upgrade", "switch to boot from %s" % flash)
self.set_bmc_boot_flash(flash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
flash = fw_extra_str if fw_extra_str in [
"master", "slave", "both"] else "both"
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
#flash = "master" if current_bmc == "slave" else "slave"
flash = "slave"
json_data["flash"] = flash

# Install BMC
Expand All @@ -290,6 +291,7 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
r = requests.post(self.bmc_info_url, json=json_data)
if r.status_code == 200 and 'success' in r.json().get('result'):
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
self.__update_fw_upgrade_logger(
"bmc_upgrade", "switch to boot from %s" % flash)
self.set_bmc_boot_flash(flash)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
flash = fw_extra_str if fw_extra_str in [
"master", "slave", "both"] else "both"
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
#flash = "master" if current_bmc == "slave" else "slave"
flash = "slave"
json_data["flash"] = flash

# Install BMC
Expand All @@ -290,6 +291,7 @@ def firmware_upgrade(self, fw_type, fw_path, fw_extra=None):
r = requests.post(self.bmc_info_url, json=json_data)
if r.status_code == 200 and 'success' in r.json().get('result'):
if fw_extra_str == "pingpong":
flash = "master" if current_bmc == "slave" else "slave"
self.__update_fw_upgrade_logger(
"bmc_upgrade", "switch to boot from %s" % flash)
self.set_bmc_boot_flash(flash)
Expand Down

0 comments on commit adcf58a

Please sign in to comment.