Programmable Internetworking & Communication Operating System Docs ... Click Spaces -> Space Directory to see docs for all releases ...
Page tree
Skip to end of metadata
Go to start of metadata

 

Introduction

NOTE

This document applies to upgrade from version 3.1.0 or the later version using the upgrade2 command. If you want to upgrade from 2.11.x (x indicates any version number of 2.11) to PICOS 3.1.0 or later versions, use upgrade command. For details, see Upgrading PICOS from Release 2.11 or Later.

PICOS supports upgrade2 method for system upgrade from version 2.11, it can be implemented when needing to upgrade the system from version 2.11 or the later versions.

There will be two separate systems on the device after the upgrade2 operation: PICOS and PICOS2. One of them will be the running system and the other will stay inactive. PICOS and PICOS2 system files and their respective configuration files are located in /mnt/open/picos/ of the flash. A list and brief description of these files is as follows.

* uImage1.itb

* pica1.sqsh

* config1/backup_files                 //User-defined backup files list

* config1/backup.tar.gz                       //Backup of latest.tar.gz

* config1/latest.tar.gz                   //The newest configuration files

* uImage2.itb

* pica2.sqsh

* config2/backup_files

* config2/backup.tar.gz

* config2/latest.tar.gz

The upgrade2 installer installs the new system into the inactive system’s file. The inactive system will be overwritten. After this operation, the new system is the inactive system and then the installer modifies the boot menu to make the newly installed system to be the default boot system. Finally, the system will come up running the new network operating system when boots up normally after the upgrading is finished,.

Upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system. This can reduce the network interruption risk due to the failure of system upgrade process and ensure the systems’ continuous availability. You can refer to section Rollback Procedure  for details.

The system still supports the upgrade command method for PICOS version upgrade, the usage is the same as before. As this article only introduces upgrade2 command method, you can refer to the document Upgrading PicOS from Release 2.1 or Later Using Upgrade for details of upgrade command method. We recommend using upgrade2 method to upgrade the NOS as there are functions of system backup and rollback.

Preparation before Upgrading

Table 1. Checklist before Upgrading

No.

Checking Items

Checking Standard

Results

1

Checking the Running PICOS Version

The currently running system software version is lower than the software version to be installed.


2

Building Upgrade Environment

Build an upgrade environment  to get the upgrade software according to the need.


3

Getting the Required Upgrade Software

Obtain the required supporting upgrade software.


4

Backing up Important Data in Flash

All the important data in Flash is backed up.


5

Checking Whether ONIE is Pre-loaded

The ONIE should be pre-loaded.


Checking the Running PICOS Version

Use the version command to check the version of the running system software.

admin@Xorplus:~$version
Copyright (C) 2009-2019 Pica8, Inc.
===================================
Hardware Model                : aN3048EP-ON
Linux System Version/Revision : 3.1.0/4b5f523
Linux System Released Date    : 11/27/2018
L2/L3 Version/Revision        : 3.1.0/4b5f523
L2/L3 Released Date           : 11/27/2018
OVS/OF Version/Revision       : 3.1.0/4b5f523
OVS/OF Released Date          : 11/27/2018

Building Upgrade Environment

Please make sure that you have set up an HTTP, TFTP or FTP protocol upgrading environment to get the upgrade software, the basic requirements are as follows:

  •    PC can log in to the device through serial or SSH.
  •    The communication between the server and the device works well.
  •    The upgrading file used by the device has already been stored on the server.

Getting the Required Upgrade Software

Please contact Pica8 technical support engineers at the following website for the latest version of upgrade software.

http://www.pica8.com/support/customer

Backing up Important Data in Flash

Before upgrading, save the important data in Flash to the local PC through FTP or TFTP, and then upload it to the switch after the upgrade is completed.

Checking Whether ONIE is Pre-loaded

Use the fw_printenv command to check whether the switch is pre-loaded with ONIE, which will be used to load PICOS on the switch. When using upgrade2 to upgrade the switch, you should make sure that ONIE is pre-loaded.

 If the information displayed contains keywords like onie_initargs and onie_machine, the switch is pre-loaded with ONIE.

admin@Xorplus$ fw_printenv
active=image1
autoload=no
baudrate=115200
bootcmd=run check_boot_reason;run PicOS_bootcmd;run onie_bootcmd
bootdelay=10
check_boot_reason=if test -n $onie_boot_reason; then setenv onie_bootargs boot_reason=$onie_boot_reason; run onie_bootcmd; fi;
consoledev=ttyS0
......
onie_initargs=setenv bootargs quiet console=$consoledev,$baudrate
onie_machine=agema_n3048ep-poe
onie_machine_rev=0
onie_platform=arm-agema_n3048ep-poe-r0
onie_platformargs=setenv bootargs $bootargs serial_num=${serial#} ${platformargs} eth_addr=$ethaddr $onie_bootargs $onie_debugargs
onie_recovery=nand read ${loadaddr} onie2 ; nand erase.part onie ; nand write ${loadaddr} onie
onie_rescue=setenv onie_boot_reason rescue && boot
onie_start=onie
onie_sz.b=0x00c00000
onie_uninstall=setenv onie_boot_reason uninstall && boot
onie_update=setenv onie_boot_reason update && boot
onie_vendor_id=27658
onie_version=master-201603091701-dirty
PicOS_bootcmd=usb start;run platformargs;setenv bootargs root=/dev/sda1 rw noinitrd console=$consoledev,$baudrate rootdelay=10 $mtdparts;ext2load usb 0:1 $loadaddr boot/uImage;bootm $loadaddr
platform=agema_n3048ep-poe
platformargs=mtdparts=nand_iproc.0:1m(uboot),2m(shmoo),1m(nenv),12m(onie),3992m(open),12m(onie2),2m(vpd),6m(sys_eeprom),16m(diags),16m(diags2),32m(diags_fs)  maxcpus=2 mem=1024M
ramdiskaddr=0x3000000
serial#=A626P1DL174300014
serverip=192.168.0.10
stderr=serial
stdin=serial
stdout=serial
ubifscfg=ubi part nand0,4 0x0; ubifsmount fs
ver=U-Boot 2012.10-gcbef171 (Aug 09 2018 - 17:01:14) - ONIE master-201603091701-dirty
 
Environment size: 3992/65532 bytes


Upgrading Notes

  •    From PICOS 2.4, a license check has been added.
    • If PICOS has a license installed before the upgrade, the license will be copied and active after the upgrade. Please check this section for the license installation procedure.
    • If there is no license installed before the upgrade, upgrade2 process can be implemented but only the first four ports on the system can be used after successfully upgrading.
    • If the license has expired, it is not allowed to upgrade a major release (e.g. 2.11 to 2.12). However, it will not affect to upgrade a minor release (e.g. 2.11.1 to 2.11.2).
  •    You can log in to a device through its console port or using SSH. After successful login, you can run commands on the command line interface (CLI) to upgrade the device.
  •    Downgrade to an earlier version is NOT supported by using upgrade2 command. 
  •    When using FTP/TFTP to download the image, user should verify that the "binary" mode is being used. If the "binary" transfer mode is not being used, the image can be modified during download, and the upgrade will fail during the md5 check.
  •    The image is platform dependent, that is, the image_name should be consistent with the platform, otherwise the upgrade script will abort.
  •    The image file of PICOS 3.1.0 and the later versions is a .bin file that can be used for both installation and upgrade, for example onie-installer-picos-s3048-3.1.0.bin.

Upgrading Procedure

The upgrading procedure in this document gives an example of upgrading on N3048EP-ON from PICOS 3.1.0 to 3.1.1 using upgrade2 command.

NOTE

Usage of upgrade2 command:

USAGE

Upgrade system with local new image

SYNOPSIS

upgrade2 [image_name] [factory-default] [use-prev-config]

DESCRIPTION

image_name - Image with bin format file(*.bin)
factory-default - Recovery configuration to factory default
use-prev-config - Use previous config, and syslog trace


PICOS upgrade is done via the command "upgrade2" in bash (launching a shell script named "upgrade2.sh"). This script will upgrade the image and back up configuration files automatically.

Image name is in the form of .bin from version 3.1.0, which should be copied to the /cftmp directory before running upgrade2 command.

The no-md5-check option is removed from PICOS 3.1.0. If there is an MD5 file in the /cftmp directory, the upgrade script will check package integrity with MD5. Else if there is no MD5 file in the /cftmp directory, then skip the MD5 check step.

The option factory-default is used to reset the configuration to factory default when performing upgrade, but it retains the license files from the previous version.

If you want to use the old configuration file in the new version, you can add the use-prev-config option when issuing upgrade2 command. The usage of option use-prev-config is described in the section Usage of Use-prev-config Option.

Usage of Use-prev-config Option

The main function of use-prev-config option is to decide whether to load the previous configuration file after a system reboot when performing upgrade2 or rollback. If there is a command line in the old version configuration file that is not supported in the new system, with use-prev-config option it will not affect loading the remaining configuration, the system skips it and continues loading the remaining configuration.

The differences of upgrade2/rollback with or without use-prev-config option are described in the following table. By default, upgrade2 and rollback are performed without use-prev-config option.


upgrade2

(From old version to new version)

rollback

(From current version to old version)

with use-prev-config

1. Load the configuration file of old version after system rebooting.

2. If there is a command line in the old version configuration file that is not supported in the new system, skip it and continue loading the remaining configuration.

1. Load the configuration file of current version after system reboot.

2. If there is a command line in the current configuration file that is not supported in the old system, skip it and continue loading the remaining configuration.

without use-prev-config

1. Load the configuration file of old version after rebooting.

2. If there is a command in the old version configuration file that is not supported in the new system, load default configuration file.

Load the old version configuration file after rebooting.


Upgrade2 Procedure

Step1         Copy the upgrade package (in the form of .bin) and the MD5 file to /cftmp directory by either FTP, TFTP, HTTP or SCP according to the actual upgrade environment. The following example uses the SCP method.

admin@XorPlus$sudo scp pica8@10.10.50.22:/tftp/build/daily/n3048/picos-3.7.1-DELL_N3048EP-ON-2382c03.bin  /cftmp
admin@XorPlus$sudo scp pica8@10.10.50.22:/tftp/build/daily/n3048/picos-3.7.1-DELL_N3048EP-ON-2382c03.bin.md5  /cftmp

NOTE:

If management VRF is enabled, and the FTP/TFTP/HTTP/SCP server is connected via the Eth0/1 port, you need to add the string sudo ip vrf exec mgmt-vrf before the SCP command when executing the scp operation. The format is as follows:

admin@Xorplus:~$ sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/3.7.1/n3048/picos-3.7.1-DELL_N3048EP-ON-2382c03.bin /cftmp

admin@Xorplus:~$sudo ip vrf exec mgmt-vrf scp pica8@10.10.50.22:/tftp/build/3.7.1/n3048/picos-3.7.1-DELL_N3048EP-ON-2382c03.bin.md5 /cftmp

If sudo ip vrf exec mgmt-vrf is not added, find the next hop routing information from the default VRF. For the usage of VRF, refer to the VRF configuration guide.

Step2         Execute the sync operation.

admin@XorPlus$sync

Step3         Change directory to /cftmp.

admin@XorPlus$cd /cftmp

Step4         Run upgrade2 command to begin upgrading.

admin@XorPlus$sudo upgrade2 picos-3.7.1-DELL_N3048EP-ON-2382c03.bin

                  After finishing upgrade, the switch will reboot automatically, the system will come up running the new network operating system.

NOTE

It will take 20 - 30 minutes to finish upgrading PICOS. During the upgrade process, please be patient and do not perform any operation until the upgrade is complete, otherwise, the upgrade may be interrupted.

Rollback Procedure

The upgrade2 method supports system rollback function. The "nos-rollback" command can be used to revert to a previous version of the installed software package. Moreover, if it fails to upgrade, the system can automatically rollback to the old system.

NOTE

Usage of nos-rollback command:

admin@Xorplus$sudo nos-rollback

USAGE

    Rollback to the previous system after next reboot

SYNOPSIS

    nos-rollback [use-prev-config]

DESCRIPTION

    use-prev-config - Use previous config, and syslog trace                 

       

For details about the usage of use-prev-config, please refer to Usage of Use-prev-config Option.

The rollback procedure is as follows:

Step1         Run nos-rollback command for manually rollback.

admin@XorPlus$sudo nos-rollback

Step2         Reboot system manually to finish rollback.

admin@XorPlus$sudo reboot

You need to manually reboot the system after issued "nos-rollback" command and the system switching takes effect. After rebooting successfully, the system will come up running the previous version of network operating system.

Verifying Version after Upgrading

admin@Xorplus:~$version
Copyright (C) 2009-2018 Pica8, Inc.
===================================
Hardware Model                : aN3048EP-ON
Linux System Version/Revision    : 3.1.1/4b5f523
Linux System Released Date       : 12/27/2018
L2/L3 Version/Revision           : 3.1.1/4b5f523
L2/L3 Released Date             : 12/27/2018
OVS/OF Version/Revision         : 3.1.1/4b5f523
OVS/OF Released Date           : 12/27/2018
  • No labels