2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2024-11-21 09:02:00 +00:00
22 Cumulus_OS_Upgrade_Support_Test
Weihua Hu edited this page 2017-10-20 16:11:48 +08:00

Test design for Cumulus OS Upgrade Support

The original test environment and resources:

xCAT version: 2.13.8

xCAT MN: briggs01, OS version is Pegas Beta

Cumulus switch: mid05tor25, OS version is 3.2.1

Cumulus switch OS binary: The binaries are saved in c910gpfs02:/gpfs/cnfs01/data/xcat/iso/cumulus

Reference links:

Test Case 1

Reinstall Cumulus switch by image

  • save one physical information about mid05tor25, such like mother board Serial Number
root@mid05tor25:/usr/cumulus/bin# dmidecode
        ......
	Serial Number: 11S01FT690YA50YD775ACN
        ......
  • Leverage mid05tor25 original dhcp configuration in briggs01
[root@briggs01 ~]# cat /var/lib/dhcpd/dhcpd.leases
.....
host mid05tor25 {
  dynamic;
  hardware ethernet a8:2b:b5:59:ac:40;
  fixed-address 172.11.205.25;
        supersede server.ddns-hostname = "mid05tor25";
        supersede host-name = "mid05tor25";
}
....
  • reinstall mid05tor25 by cumulus-linux-3.4.1-bcm-armel.bin
[root@briggs01 ~]# mkdir -p /install/onie/
[root@briggs01 ~]# cp cumulus-linux-3.4.1-bcm-armel.bin /install/onie/
[root@briggs01 ~]# xdsh mid05tor25 "/usr/cumulus/bin/onie-install -a -f -i http://172.11.253.27/install/onie/cumulus-linux-3.4.1-bcm-armel.bin && reboot"
  • After 30 minutes, check if the ip 172.11.205.25 pingable and it is `mid05tor25``
[root@briggs01 ~]#ping 172.11.205.25
[root@briggs01 ~]#ssh 172.11.205.25 -l <usrid> 

[root@172.11.205.25 ~]dmidecode
# To check the SN is 11S01FT690YA50YD775ACN

[root@172.11.205.25 ~]cat /etc/*release*
# To check VERSION="Cumulus Linux 3.4.1"

[root@172.11.205.25 ~] cat /etc/network/interfaces
#The ip should come from DHCP

Test Case 2

Switch discovery and configuration base on 3.4.1

  • Based on the result of Test Case 1 to do follow test
  • Do switch based switch discovery and setup against mid05tor25 which OS was 3.4.1.
# predefine mid05tor25 for discovery
[root@briggs01 ~]# lsdef mid05tor25
Object name: mid05tor25
    groups=switch,edge_switch
    ip=172.11.205.25
    mgt=switch
    nodetype=switch
    switch=mgmtsw01
    switchport=25 
    snmpauth=sha 
    snmppassword=xcatpassw0rd 
    snmpprivacy=DES 
    snmpusername=xcatadmin
    snmpversion=3 
    usercomment=Edgecore Networks Switch

[root@briggs01 ~]# makehosts mid05tor25

[root@briggs01 ~]# switchdiscover --range 172.11.205.25 -w --setup

[root@briggs01 ~]# lsdef mid05tor25
Object name: mid05tor25
    groups=switch,edge_switch
    ip=172.11.205.25
    mac=A8:2B:B5:59:AC:40
    mgt=switch
    nodetype=switch
    postbootscripts=otherpkgs
    postscripts=syslog,remoteshell,syncfiles
    snmpauth=sha 
    snmppassword=xcatpassw0rd 
    snmpprivacy=DES 
    snmpusername=xcatadmin
    snmpversion=3 
    status=configured
    switch=mgmtsw01
    switchport=25
    switchtype=onie
    updatestatus=synced
    updatestatustime=10-17-2017 17:03:07
    usercomment=Edgecore Networks Switch
  • Check the ip, login without password
[root@briggs01 ~]# ping 172.11.205.25
PING 172.11.205.25 (172.11.205.25) 56(84) bytes of data.
64 bytes from 172.11.205.25: icmp_seq=1 ttl=64 time=0.195 ms
--- 172.11.205.25 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.189/0.192/0.195/0.003 ms

[root@172.11.205.25 ~] cat /etc/network/interfaces
source /etc/network/interfaces.d/*.intf
auto eth0
iface eth0 inet static
    address 172.11.205.25
    netmask 255.255.0.0
    broadcast 172.11.255.255


[root@briggs01 ~]# makehosts
[root@briggs01 ~]# makedhcp

[root@briggs01 ~]# ssh mid05tor25
# can login without passwd
  • check SNMP V3
[root@briggs01 ~] snmpwalk -v 3 -u xcatadmin -l authPriv -a sha -x DES -A xcatpassw0rd -X xcatpassw0rd mid05tor25 1.3.6.1.2.1.1.1 
  • Activate the License
[root@briggs01 ~] xdsh mid05tor25 /usr/cumulus/bin/cl-license
# record output as A
[root@briggs01 ~] xdcp mid05tor25 /install/custom/sw_os/cumulus/licensefile.txt /root/
[root@briggs01 ~] xdsh mid05tor25 "/usr/cumulus/bin/cl-license -i /root/licensefile.txt"
[root@briggs01 ~] xdsh mid05tor25 /usr/cumulus/bin/cl-license
# record output as B
# A != B
[root@briggs01 ~] xdsh mid05tor25 reboot
  • Check switch_macmap
[root@briggs01 ~]# xcatprobe switch_macmap mid05tor25
#should work

Test Case 3

Upgrade Cumulus switch on line.

  • Download OS repo to MN briggs01.
  • install mid05tor25 by binary image which version is 3.2.1.
  • Discover and configure mid05tor25. The step refer to Test Case2
  • Make sure mid05tor25 work as expect
[root@briggs01 ~]# ping mid05tor25
#should pingable

[root@briggs01 ~]# ssh mid05tor25
#should login without password

[root@mid05tor25 ~] cat /etc/network/interfaces
source /etc/network/interfaces.d/*.intf
auto eth0
iface eth0 inet static
    address 172.11.205.25
    netmask 255.255.0.0
    broadcast 172.11.255.255

[root@briggs01 ~]# snmpwalk -v 3 -u xcatadmin -l authPriv -a sha -x DES -A xcatpassw0rd -X xcatpassw0rd mid05tor25 1.3.6.1.2.1.1.1 

[root@briggs01 ~]# xdsh mid05tor25 "cat /etc/*release*"
#should be 3.2.1

[root@briggs01 cumulus_test]# xdsh mid05tor25 "/usr/cumulus/bin/cl-license"
#license is A

  • Follow the first method of Cumulus OS upgrade to upgrade mid05tor25
  • check mid05tor25 os, should not be 3.2.1
[root@briggs01 ~]# xdsh mid05tor25 "cat /etc/*release*"
#should not be 3.2.1
  • original settings(specific ip/login without password/enable SNMP v3) should still work.
[root@briggs01 ~]# ping mid05tor25
#should pingable

[root@briggs01 ~]# ssh mid05tor25
#should login without password

[root@mid05tor25 ~] cat /etc/network/interfaces
source /etc/network/interfaces.d/*.intf
auto eth0
iface eth0 inet static
    address 172.11.205.25
    netmask 255.255.0.0
    broadcast 172.11.255.255

[root@briggs01 ~]# snmpwalk -v 3 -u xcatadmin -l authPriv -a sha -x DES -A xcatpassw0rd -X xcatpassw0rd mid05tor25 1.3.6.1.2.1.1.1 
#should get result

[root@briggs01 cumulus_test]# xdsh mid05tor25 "/usr/cumulus/bin/cl-license"
#license should also be A