Difference between revisions of "Upgrade Commands"

From OSNEXUS Online Documentation Site
Jump to: navigation, search
m (QuantaStor CLI Upgrade Commands)
m (QuantaStor CLI Upgrade Commands)
Line 5: Line 5:
 
-id
 
-id
 
</pre>
 
</pre>
'''--repoUrl''' optional that is Used to specify the package repository URL to use for the upgrade. If not specified, the package repository URL will be autodetected from the system’s /etc/apt/sources.list.d/osnexus.list file.
+
'''--repoUrl''' is an optional command that is Used to specify the package repository URL to use for the upgrade. If not specified, the package repository URL will be autodetected from the system’s /etc/apt/sources.list.d/osnexus.list file.
 
During an offline upgrade, this flag need not be used and is auto set to the location of the ISO image.
 
During an offline upgrade, this flag need not be used and is auto set to the location of the ISO image.
 
<pre>
 
<pre>

Revision as of 09:24, 22 August 2019

QuantaStor CLI Upgrade Commands

--id is an optional command that can be used to indicate the task ID for the upgrade if the upgrade was initiated via the web UI.

-id

--repoUrl is an optional command that is Used to specify the package repository URL to use for the upgrade. If not specified, the package repository URL will be autodetected from the system’s /etc/apt/sources.list.d/osnexus.list file. During an offline upgrade, this flag need not be used and is auto set to the location of the ISO image.

--repoUrl

Optional. Used to help locate which upgrade scripts to use. On a trusty box trying to get to xenial, this should be set to quantastor-xenial. On a xenial box trying to get to the latest xenial build, this should be set to quantastor-xenial. If not specified, the target dist will be autodetected from either the system’s /etc/apt/sources.list.d/osnexus.list file, or the preferredDist config file on the repo. During an offline upgrade, this flag need not be used and is auto set to ‘pool’ of the ISO image.

--targetDist

Optional. Can be set to True/true or False/false (capitalization does not matter). When specified as True/true, the kernel and driver upgrades are included. If the kernel or any drivers are upgraded during this process (if there are upgrades available and the system is not on the latest versions) then a reboot is required for the upgrades to take effect. This flag is set to True/true when ‘Full Upgrade’ is selected from the Upgrade Manager dialog in the web UI.

--includeKernel

For internal use only, need not be specified. This flag is used when the script calls itself again.

--runOnce

Optional. Can be set to True/true or False/false (capitalization does not matter). When specified as True/true, purges the package metadata from the system. This forces all packages and package info to be redownloaded from the package repository.

--force

Optional. Can be set to True/true or False/false (capitalization does not matter). When specified as True/true, the distribution upgrade is included. Distribution upgrades from trusty to xenial are the only distro upgrades currently supported. If the distribution is upgraded during this process, then a reboot is required for all the upgrades to take effect. The ‘includeKernel’ flag need not be supplied in additional to this flag, as the kernel and drivers will all be upgraded as a part of the distribution upgrade.

--distroUpgrade

Optional. Can be set to True/true or False/false (capitalization does not matter). Should be supplied when performing a fresh install on a plain xenial (16.04) ubuntu box. Can also be supplied to fix broken installations.

--install

Optional. Can be set to True/true or False/false (capitalization does not matter). Can be used with an upgrade when QuantaStor is present but not all xenial qstor packages are installed (for example, on a trusty box not all the same packages are installed that are on a xenial box).

--skipInstall

Optional. Can be set to True/true or False/false (capitalization does not matter). Used to perform an offline upgrade. User must copy the desired ISO image into the /mnt/qs-isos directory. Offline distribution upgrades are not yet supported.

--offline

Optional. Can be set to True/true or False/false (capitalization does not matter). For internal/support use only. Performs are the preparation steps involved with setting up an offline upgrade. Does not perform any upgrades.

--offlinePrep

Locate the ISO at /mnt/qs-isos. Mount the ISO at /mnt/cd-test. Verify the mountpoint. Edit apt preference file configuration to point to the ISO. --offlineCleanup Optional. Can be set to True/true or False/false (capitalization does not matter). For internal/support use only. Performs are the cleanup steps involved after an offline upgrade. Does not perform any upgrades. Unmount the ISO image. Restore apt preference file configuration. --dryrun Optional Can be set to True/true or False/false (capitalization does not matter). For internal/support use only. Performs the preparation and cleanup steps involved during an offline upgrade but does not perform any upgrades. --allowReboot Optional. Can be set to True/true or False/false (capitalization does not matter). Defaults to False/false When specified as True/true, the upgrade manager automatically reboots the system when one is required (after kernel, driver, and/or distribution upgrades). --coreOnly Optional. Can be set to True/true or False/false (capitalization does not matter). When specified to True/true, only the core qstor packages will be upgraded. qstormanager qstorservice qstortomcat Qstorrest No security patches will be applied (apt-get upgrade) --getConfigValues

Upgrade Manager Use Cases

Upgrade from Trusty 4.x to Xenial 5.x

Prepare for your upgrade by downloading the latest upgrade manager script:

curl -o /opt/osnexus/quantastor/bin/qs_upgrade.py

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --distroUpgrade=True --targetDist=trusty --includeKernel=True --allowReboot=True

Offline Upgrade from Xenial 5.x

First, prepare for your offline upgrade by making directories with the following command:

/mnt/qs-isos and /mnt/qs-isomount

Put the latest QuantaStor ISO into the folowing directory:

/mnt/qs-isos

Next, find and mount the ISO image:

mount -o loop 'find /mnt/qs-isos -name "*.iso"' /mnt/qs-isomount

Copy the upgrade script to a known location with:

cp /mnt/qs-isomount/pool/scripts/qs_upgrade.py /opt/osnexus/quantastor/bin/qs_upgrade.py

Perform a dry run test using:

/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True --dryrun=True

If the test works, run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --offline=True

This will take the QuantaStor ISO that is in /mnt/qs-isos and mount it to /mnt/cd-test, then configure the apt preference file to use the ISO files for the upgrades. The script then calls itself, specifying repoUrl as the location of the mounted ISO.

Kernel Upgrade on Xenial 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --includeKernel=True

This command will upgrade all QuantaStor core packages as well as the kernel. After the kernel upgrade is finished, the script stops and prints the message stdout advising the user to reboot the system. After the system reboot, the script will run again and verify the latest QuantaStor version.

If --allowReboot is supplied as true, then the script will reboot automatically instead of stopping and printing a message to stdout.

Service Upgrade from 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py --coreOnly=True

Core Service Upgrade only on 5.x

Run the upgrade script:

/opt/osnexus/quantastor/bin/qs_upgrade.py

This will upgrade the QuantaStor core packages and perform an apt-get upgrade.