sonofspike / cluster_mgnt_roles

OpenShift 4 Management Cluster Seed Playbook
Apache License 2.0
9 stars 8 forks source link

Set Dell OneTimeBoot VirtualCD does not work with recent iDRAC9 versions #60

Open akiselev1 opened 3 years ago

akiselev1 commented 3 years ago

I found that node discovery fails for a Dell baremetal server with iDRAC9 version 4.40.40. Task Set Dell OneTimeBoot VirtualCD in cluster_mgnt_roles/boot_iso/tasks/dell_redfish.yml succeeds, but Dell server with iDRAC 4.40.40 still boots from HDD. Node discovery fails because of that.

I am not sure why this task uses a direct API call, which works only up to a certain iDrac version. Probably there is some historical reason for that. I suggest using this block instead:

- block:
    - name: Set Dell OneTimeBoot VirtualCD (VCD-DVD)
      community.general.redfish_command:
        category: Systems
        command: SetOneTimeBoot
        bootdevice: VCD-DVD
        baseuri: "{{ hostvars[inventory_hostname]['bmc_address'] }}"
        username: "{{ hostvars[inventory_hostname]['bmc_user'] }}"
        password: "{{ hostvars[inventory_hostname]['bmc_password'] }}"
  rescue:
    - name: Set Dell OneTimeBoot VirtualCD (Cd)
      community.general.redfish_command:
        category: Systems
        command: SetOneTimeBoot
        bootdevice: Cd
        baseuri: "{{ hostvars[inventory_hostname]['bmc_address'] }}"
        username: "{{ hostvars[inventory_hostname]['bmc_user'] }}"
        password: "{{ hostvars[inventory_hostname]['bmc_password'] }}" 

It works with the latest community.general version. Just make sure you got the latest: ansible-galaxy collection install community.general --force

Workaround: roll back iDRAC version to 4.22. This original task API call works with that.

dylwong commented 3 years ago

This was fixed in redhat-partner-solutions/cluster_mgnt_roles

akiselev1 commented 3 years ago

That's correct. Can we port this fix here?

dylwong commented 3 years ago

Yeah, once I get approval from the team, I am porting the fixes along with some of my own. You can privately message me aswell for the file.