[YB-1] The update_bios_settings.py has a incorrect path for the serverrc_raid.j2 file Created: 26/Apr/19  Updated: 14/May/19  Due: 03/May/19  Resolved: 14/May/19

Status: Done
Project: YAML Builds
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Roddric Boswell Assignee: David Plunkett
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: HTML File MTN2_201904261928+0000_2genesis     File Unicycle.yaml     HTML File install_server_os_2019-04-26T19-28-55+0000     Text File scriptexecutor.log     File update_bios_settings.py    

 Description   

During the Unicycle deployment, the Genesis node completed the installation and started with the next Master node.

When executing the update_bios_settings.py script, it failed with the following error:

server-config/aknode23rc.raid
tools/j2/serverrc_raid.j2 -> server-config/aknode23rc.raid
Traceback (most recent call last):
File "/opt/akraino/yaml_builds/scripts/update_bios_settings.py", line 81, in <module>
create_node_rcfile(siteyaml["masters"], defaults, "tools/j2/serverrc_raid.j2", "rc.raid")
File "/opt/akraino/yaml_builds/scripts/update_bios_settings.py", line 50, in create_node_rcfile
command = '/opt/akraino/redfish/apply_dellxml.sh --rc {0} --template {1} --no-confirm'.format(rcfile, newnode["bios_template"])
KeyError: 'bios_template'

 

After looking at the script we noticed that the path for the serverrc_raid.j2 file in the update_bios_settings.py script is incorrect.  The script shows the following path: 

if 'masters' in siteyaml:
create_node_rcfile(siteyaml["masters"], defaults, "tools/j2/serverrc_raid.j2", "rc.raid")

But the tools directory isn't in the parent directory of scripts.  The serverrc_raid.j2 directory path is as follows:

root@aknode29:/opt/akraino/yaml_builds/tools/j2# ls
serverrc.j2 serverrc_raid.j2 set_site_env.sh

The update_bios_settings.py script needs to be correct to reflect the correct directory path for the serverrc_raid.j2 file.

 



 Comments   
Comment by David Plunkett [ 29/Apr/19 ]

The error is occurring because no bios_template has been specified in the Unicycle.yaml for the master nodes.  The stack trace shows that the error is occurring during the create_node_rcfile step for the siteyaml["masters"] nodes.  There are two ways to specify the template for the master nodes. 

1) The bios_template key can be put in the hardware section of the input yaml.  That will be the default value used unless a node (genesis, master or worker) has a value that "overrides" the default.  This is the recommended option.

hardware:
   vendor: DELL
   generation: '10'
   hw_version: '3'
   bios_version: '2.8'
   bios_template: dell_r740_g14_uefi_base.xml.template
   boot_template: dell_r740_g14_uefi_httpboot.xml.template

2) The bios_template key can be specified for each master node.

masters:
   - name : aknode23
     oob: 10.51.35.143
     host: 10.51.34.233
     storage: 10.224.160.7
     pxe: 10.51.34.200
     ksn: 10.224.160.134
     neutron: 10.224.161.7
     bios_template: dell_r740_g14_uefi_base.xml.template

   - name : aknode31
     oob: 10.51.35.147
     host: 10.51.34.229
     storage: 10.224.160.8
     pxe: 10.51.34.201
     ksn: 10.224.160.136
     neutron: 10.224.161.8
     bios_template: dell_r740_g14_uefi_base.xml.template

Generated at Sat Feb 10 06:07:32 UTC 2024 using Jira 9.4.5#940005-sha1:e3094934eac4fd8653cf39da58f39364fb9cc7c1.