stackhpc / drac Goto Github PK
View Code? Open in Web Editor NEWAnsible role for DRAC BIOS and RAID configuration
Ansible role for DRAC BIOS and RAID configuration
Seen on a particular R630 server, simultaneous configuration of BIOS and RAID jobs can cause the server to go off the rails. The jobs are not applied by the lifecycle controller, and if the lifecycle controller is entered manually it triggers a reboot loop.
This seems to have been resolved by configuring BIOS and RAID separately.
Seen with Ansible 2.10.17 (kayobe stable/wallaby) while running kayobe overcloud bios raid configure
:
TASK [stackhpc.drac : Ensure that DRAC configuration is applied] ***********************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [myhost -> localhost]: FAILED! =>
msg: 'the field ''check_mode'' has an invalid value ({{ drac_check_mode | default(ansible_check_mode) }}), and could not be converted to an bool.The error was: The value '''' is not a valid boolean. Valid booleans include: 0, 1, ''t'', ''n'', ''no'', ''y'', ''1'', ''true'', ''on'', ''off'', ''false'', ''f'', ''0'', ''yes'''
I've some issue with this hardware :
When I apply this playbook :
hosts: all
gather_facts: no
roles:
- role: drac
drac_address: "{{ ip_drac }}"
drac_username: 'root'
drac_password: 'calvin'
drac_bios_config:
NumLock: 'On'
SysProfile: 'PerfOptimized'
drac_raid_config:
- name: SYSTEM
raid_level: 1
span_length: 2
span_depth: 1
pdisks:
- 'Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- 'Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- name: DATA
raid_level: 5
span_length: 4
span_depth: 1
pdisks:
- 'Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- 'Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- 'Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1'
- 'Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1'
reboot: True
timeout: 600
I must first force the disk from NON-RAID to RAID manually. Because otherwise I get :
The full traceback is: File "/tmp/ansible_A0_fAK/ansible_module_drac.py", line 1048, in commit_raid bmc.commit_pending_raid_changes(controller, False) File "/usr/lib/python2.7/site-packages/dracclient/client.py", line 478, in commit_pending_raid_changes cim_name='DCIM:RAIDService', target=raid_controller, reboot=reboot) File "/usr/lib/python2.7/site-packages/dracclient/resources/job.py", line 151, in create_config_job expected_return_value=utils.RET_CREATED) File "/usr/lib/python2.7/site-packages/dracclient/client.py", line 673, in invoke raise exceptions.DRACOperationFailed(drac_messages=messages)
And When I've done this manual change and I launch my playbook, it creates a wrong virtual volume size for the RAID5 DATA (4 x 1716352,MB = 1716351MB ).
We reboot to apply RAID or BIOS configuration but if the node is already powered off this will not work. A power on should be requested instead.
The RAID configuration being supplied is this:
- name: "disk0"
raid_level: 1
span_length: 2
span_depth: 1
size_mb: 256000
pdisks:
- "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1"
- "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
- name: "disk1"
raid_level: 1
span_length: 2
span_depth: 1
size_mb: 7069056
pdisks:
- "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1"
- "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
However, the output from the RAID process appears to be only 1 virtual disk, spanning the entire device and with the name of the second disk supplied:
"drac_virtual_disks": [
{
"controller": "RAID.Integrated.1-1",
"description": "Virtual Disk 0 on Integrated RAID Controller 1",
"id": "Disk.Virtual.0:RAID.Integrated.1-1",
"name": "disk1",
"pending_operations": null,
"physical_disks": [
"Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1",
"Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"
],
"raid_level": "1",
"raid_status": "online",
"size_mb": 7325056,
"span_depth": 1,
"span_length": 2,
"status": "unknown"
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.