2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-24 10:30:01 +00:00
4 Test Design of rspconfig python version
tingtli edited this page 2018-03-29 14:20:39 +08:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Test Design of rspconfig python version

Introduction

This document provides an overview of test of command rspconfig that is conducted on the IBM Witherspoon Physical Machine. This test plan is intended for the use of xCAT FVT team.

The test is against xCAT version 2.14. The build of xCAT will be picked up from the xcat.org

Overview of xCAT FVT

Test Software Requirements

Operating System Red Hat Enterprise Linux Server release 7.5

Other Softwares

xCAT 2.14

Test Hardware Requirements

MN: any machines with latest xcat installed
CN: Witherspoon node (p9)

xCAT Test Detail Section

Test environment preparation

  • new OpenBMC python version rpm installation steps:

    Please refer to following link to install python dependency.

    http://xcat-docs.readthedocs.io/en/latest/references/coral/cluster_mgmt/scalability/python/install/rpm.html
    
  • enable OpenBMC python version:

    export XCAT_OPENBMC_PYTHON=YES
    

Test cases

Automation cases

We have some rspconfig automation cases in file cases0 under /opt/xcat/share/xcat/tools/autotest/testcase/rspconfig. After you install xcat-test, you will find the file.

[root@briggs01 rspconfig]# pwd
/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig
[root@briggs01 rspconfig]# ls
cases0

The steps to run automation cases.

  1. Install xcat-test on your testing nodes
  2. Define node. The node's definition should have bmc's ip. BMC should work correctly.
  3. create rspconfig cases bundle file by yourself.
[root@briggs01 bundle]# pwd
/opt/xcat/share/xcat/tools/autotest/bundle
[root@briggs01 bundle]# cat rspconfig.bundle
rspconfig_set_ip
rspconfig_ip_invalid
rspconfig_ip_null
rspconfig_set_netmask
rspconfig_netmask_invalid
rspconfig_set_gateway
rspconfig_gateway_invalid
rspconfig_node_invalid
rspconfig_list_all
rspconfig_list_gateway
rspconfig_list_ip
rspconfig_list_netmask
rspconfig_list_vlan
rspconfig_noderange_invalid
rspconfig_set_all_invalid
rspconfig_set_vlan
rspconfig_set_vlan_invalid
rspconfig_set_hostname_equal_star_with_bmc_is_ip
rspconfig_set_hostname_equal_star_with_bmc_is_hostname
rspconfig_get_hostname
rspconfig_hostname_with_error_input
rspconfig_set_hostname
rspconfig_set_admin_passwd_with_error_input
rspconfig_set_admin_passwd_with_error_origin_password
rspconfig_sshcfg_with_error_input
  1. Run following commands to start your test.
[root@briggs01 testcase]# XCATTEST_CN=mid05tor12cn05 xcattest -b rspconfig.bundle
  1. Check the result under following directory
[root@briggs01 result]# pwd
/opt/xcat/share/xcat/tools/autotest/result
[root@briggs01 result]# vi failedcases.20180201192605

Manually cases

The test cases is given according to the rspconfig' help information for machines managed by openbmc.

 OpenBMC specific:
       rspconfig <noderange> [ipsrc|ip|netmask|gateway|vlan]
       rspconfig <noderange> admin_passwd=<currentpasswd,newpasswd>
       rspconfig <noderange> dump [-l|--list] [-g|--generate] [-c|--clear {<id>|all}] [-d|--download {<id>|all}]
       rspconfig <noderange> gard -c|--clear
       rspconfig <noderange> [hostname|ntpservers]
       rspconfig <noderange> [hostname=<*|hostname>|ntpservers=<ntpservers>]
       rspconfig <noderange> sshcfg
       rspconfig <noderange> powerrestorepolicy
       rspconfig <noderange> powerrestorepolicy={always_on|restore|always_off}
       rspconfig <noderange> powersupplyredundancy
       rspconfig <noderange> powersupplyredundancy={disabled|enabled}
       rspconfig <noderange> timesyncmethod
       rspconfig <noderange> timesyncmethod={ntp|manual}
       rspconfig <noderange> bootmode
       rspconfig <noderange> bootmode={safe|regular|setup}
       rspconfig <noderange> autoreboot
       rspconfig <noderange> autoreboot={0|1}

Test log list

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -l
f6u03: [1] Generated: 03/21/2018 01:17:01, Size: 89704
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [1] Generated: 03/21/2018 01:17:01, Size: 89704

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -d 1
f6u03: Downloading dump 1 to /var/log/xcat/dump/20180321-0133_f6u03_dump_1.tar.xz
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [1] Generated: 03/21/2018 01:17:01, Size: 89704

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -c 1
[1] clear
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: No attributes returned from the BMC.

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -l
f6u03: No attributes returned from the BMC.
[root@c910f03c11k08 ~]# echo $?
0

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --generate
f6u03: [2] success
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [2] Generated: 03/21/2018 01:21:34, Size: 90112


[root@c910f03c11k08 ~]# rspconfig f6u03 dump --download 2
f6u03: Downloading dump 2 to /var/log/xcat/dump/20180321-0137_f6u03_dump_2.tar.xz

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --download all
Downloading all dumps...
f6u03: Downloading dump 2 to /var/log/xcat/dump/20180321-0137_f6u03_dump_2.tar.xz
[root@c910f03c11k08 ~]# ls /var/log/xcat/dump
20180321-0137_f6u03_dump_2.tar.xz

[root@c910f03c11k08 ~]# rspconfig f6u03 dump
Capturing BMC Diagnostic information, this will take some time...
f6u03: Dump requested. Target ID is 3, waiting for BMC to generate...
f6u03: Still waiting for dump 3 to be generated...
f6u03: Downloading dump 3 to /var/log/xcat/dump/20180321-0138_f6u03_dump_3.tar.xz
[root@c910f03c11k08 ~]# ls /var/log/xcat/dump
20180321-0137_f6u03_dump_2.tar.xz  20180321-0138_f6u03_dump_3.tar.xz

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -c
f6u03: Error: No dump file ID specified. To clear all, specify 'all'.
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -c all
[all] clear
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: No attributes returned from the BMC.

[root@c910f03c11k08 ~]# rspconfig f6u03 dump
Capturing BMC Diagnostic information, this will take some time...
f6u03: Dump requested. Target ID is 4, waiting for BMC to generate...
f6u03: Still waiting for dump 4 to be generated...
f6u03: Downloading dump 4 to /var/log/xcat/dump/20180321-0140_f6u03_dump_4.tar.xz
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [4] Generated: 03/21/2018 01:27:26, Size: 90612

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --generate
f6u03: [5] success
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [4] Generated: 03/21/2018 01:27:26, Size: 90612
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -l
f6u03: [4] Generated: 03/21/2018 01:27:26, Size: 90612

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [4] Generated: 03/21/2018 01:27:26, Size: 90612
f6u03: [5] Generated: 03/21/2018 01:28:44, Size: 90792

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --download all
Downloading all dumps...
f6u03: Downloading dump 4 to /var/log/xcat/dump/20180321-0146_f6u03_dump_4.tar.xz
f6u03: Downloading dump 5 to /var/log/xcat/dump/20180321-0146_f6u03_dump_5.tar.xz
[root@c910f03c11k08 ~]# ls /var/log/xcat/dump
20180321-0146_f6u03_dump_4.tar.xz  20180321-0146_f6u03_dump_5.tar.xz

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: [4] Generated: 03/21/2018 01:27:26, Size: 90612
f6u03: [5] Generated: 03/21/2018 01:28:44, Size: 90792
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --clear all
[all] clear
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: No attributes returned from the BMC.

[root@c910f03c11k08 ~]# rspconfig f6u03 dump --list
f6u03: No attributes returned from the BMC.
[root@c910f03c11k08 ~]# rspconfig f6u03 dump --download all
Downloading all dumps...
f6u03: No attributes returned from the BMC.

[root@c910f03c11k08 ~]# rspconfig f6u03 dump -g
f6u03: [6] success
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -g
f6u03: [7] success
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -g
f6u03: [8] success
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -l
f6u03: [6] Generated: 03/21/2018 01:35:38, Size: 91068
f6u03: [7] Generated: 03/21/2018 01:35:46, Size: 91136
f6u03: [8] Generated: 03/21/2018 01:35:52, Size: 92008
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -c 7
[7] clear
[root@c910f03c11k08 ~]# rspconfig f6u03 dump -l
f6u03: [6] Generated: 03/21/2018 01:35:38, Size: 91068
f6u03: [8] Generated: 03/21/2018 01:35:52, Size: 92008

[root@c910f03c11k08 /]# rspconfig f6u03 ipsrc
f6u03: BMC IP Source: DHCP

[root@c910f03c11k08 /]# rspconfig f6u03 ip
f6u03: BMC IP: 10.6.3.100

[root@c910f03c11k08 /]# rspconfig f6u03 netmask
f6u03: BMC Netmask: 255.0.0.0

[root@c910f03c11k08 /]# rspconfig f6u03 gateway
f6u03: BMC Gateway: 0.0.0.0 (default: 10.0.0.101)

[root@c910f03c11k08 /]# rspconfig f6u03 vlan
f6u03: BMC VLAN ID: Disable

[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd
f6u03: Error: Unsupported command: rspconfig admin_passwd

[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd=0penBmc,0penBMC
f6u03: BMC Setting Password...
[root@c910f03c11k08 /]# echo $?
0
[root@c910f03c11k08 /]# ssh -l root 10.6.3.100
root@test_bogus_bmc_hostname:~# exit
logout
Connection to 10.6.3.100 closed.

[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd=0penBMC,0penBmc
f6u03: Error: Current BMC password is incorrect, cannot set the new password.
(should change node's bmc password definition first)

[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd=0penBmc,0penBMC
f6u03: Error: [401] Invalid username or password
[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd=0penBMC,0penBmc
f6u03: Error: Current BMC password is incorrect, cannot set the new password.
[root@c910f03c11k08 /]# chdef f6u03 bmcpassword=0penBMC
1 object definitions have been created or modified.
[root@c910f03c11k08 /]# rspconfig f6u03 admin_passwd=0penBMC,0penBmc
f6u03: BMC Setting Password...
[root@c910f03c11k08 /]# chdef f6u03 bmcpassword=0penBmc
1 object definitions have been created or modified.
[root@c910f03c11k08 /]# packet_write_wait: Connection to 9.114.120.101: Broken pipe


[root@briggs01 /]# rspconfig mid05tor12cn05 ipsrc
mid05tor12cn05: BMC IP Source: Static
[root@briggs01 /]# rspconfig mid05tor12cn05 ip
mid05tor12cn05: BMC IP: 172.11.139.5
[root@briggs01 /]# rspconfig mid05tor12cn05 netmask
mid05tor12cn05: BMC Netmask: 255.255.0.0
[root@briggs01 /]# rspconfig mid05tor12cn05 gateway
mid05tor12cn05: BMC Gateway: 0.0.0.0 (default: 172.11.253.27)
[root@briggs01 /]# rspconfig mid05tor12cn05 vland
mid05tor12cn05: Error: Unsupported command: rspconfig vland
[root@briggs01 /]# rspconfig mid05tor12cn05 vlan
mid05tor12cn05: BMC VLAN ID: 11
[root@briggs01 /]# rspconfig mid05tor12cn05 vlan=4097
mid05tor12cn05: Error: VLAN must be configured with IP, netmask and gateway
[root@briggs01 /]# rspconfig mid05tor12cn05 ipsrc=dynamic
mid05tor12cn05: Error: Unsupported command: rspconfig ipsrc=dynamic
[root@briggs01 /]# rspconfig mid05tor12cn05 netmask=255.255.255.0
mid05tor12cn05: Error: IP, netmask and gateway must be configured together.
[root@briggs01 /]# rspconfig mid05tor12cn05 gateway=172.11.253.15
mid05tor12cn05: Error: IP, netmask and gateway must be configured together.
[root@briggs01 /]# rspconfig mid05tor12cn05 ip=172.11.139.5 netmask=255.255.0.0
mid05tor12cn05: Error: IP, netmask and gateway must be configured together.
[root@briggs01 /]# rspconfig mid05tor12cn05 ip=172.11.139.5 netmask=255.255.0.0 gateway=0.0.0.0
mid05tor12cn05: BMC IP: 172.11.139.5
mid05tor12cn05: BMC Netmask: 255.255.0.0
mid05tor12cn05: BMC Gateway: 0.0.0.0