[Server Guide] do-release-upgrade test-case(s)

Greg Beam ki7mt at yahoo.com
Fri Jan 17 22:36:30 UTC 2014


Hello all,

I just finished writing up several server-upgrade test cases for use in
Ubuntu-QA tracker >> Image Testing.

Attached is a "draft" of the test cases, (4) in total. Final edits will
be made after review. The cases are formated for use in the testing
tracker, so may be a bit tricky to read (could use a bit of off-line
yelp-help Mallard wizardry :-) ..). I felt the information may be useful
in updating the server-upgrade Wiki, so I'm passing it along.

If you have recommendations for test inclusion or improving the methods,
please feel free to pass them back.


Commit Log:
---------------------------------------------------------------------
lp1172452
https://bugs.launchpad.net/ubuntu-manual-tests/+bug/1172452

Server Upgrade Reference:
https://help.ubuntu.com/12.04/serverguide/installing-upgrading.html

Hardware Setup
Host-OS: 14.04 Native Desktop Install
Guest-OS: VM server installs, no DE
Virtualbox: v4.3.2 from Ubuntu repositories
Test Method: Local CLI and via SSH
SSH: openssh-server installed on all Guest VM's

Performing do-release-upgrade seems straight forward on the surface,
however, a number of factors will determine which release the server
ends up with. The servers current version, upgrade prompt and the use of
the -d (development) flag all affect what version the final server
release will be. Unexpected results are noted in the comments below.

Roughly 30 upgrade combinations were tested. Select testing was
performed on versions 10.10, 12.10 and 13.04 which yielded expected
results.

Flags Tested, for details see: /etc/update-manager/release-upgrades
-- Never: Never check for new release
-- Normal: Upgrade to the next release following lsb_release -r
-- Normal -d: Upgrade to the current development release.
-- LTS: Attempt upgrade to the next LTS release
-- LTS -d: Upgrade to the current development release

Test Case Results:

* Prompt=never  using do-release-upgrade
-- All versions, passed, the server was NOT upgraded

* Prompt=normal  using do-release-upgrade
-- 10.04, 10.10, 12.10, 13.04, passed, upgraded to the next release
-- 12.04 passed, upgraded to 12.10
-- 13.10 passed, did NOT upgrade to 14.04

* Prompt=lts  using do-release-upgrade
-- 10.10, 12.10 and 13.04 were not tested, they are not LTS
-- 10.04 passed, upgraded to 12.04
-- 12.04 passed, the server was NOT upgraded, 14.04 is not released yet

* Development: Prompt=normal, using do-release-upgrade -d
-- 10.04, 10.10, 12.10, 13.04 were not tested
-- 12.04 undetermined, Prompt=normal overrides -d flag
-- 13.10 passed, upgraded to 14.04

Note: I expected 12.04-LTS to upgrade to 14.04 when using the -d flag.
It appears Prompt=normal overrides the -d flag when the current release
is LTS. End result was server release 12.10

* Development: Prompt=lts, using do-release-upgrade -d
-- 10.04 undetermined, upgrades to 12.04, should be 14.04?
-- 12.04 passed, upgrades to 14.04

Note: I expected 10.04-LTS to upgrade to 14.04 when using the -d flag.
It appears Prompt=lts also overrides the -d flag. End result was server
release 12.04-LTS
---------------------------------------------------------------------

Best Regards

Greg
ki7mt at yahoo.com
-------------- next part --------------
Test-case name:server_upgrade_cli_NEVER
This will test protection from do-release-upgrade
<dl>
    <dt>Login into the system locally, or via SSH if openssh-server is installed</dt>
    <dt>In the terminal or console: sudo apt-get update && sudo apt-get upgrade</dt>
        <dd>APT should update</dd>
		<dd>If asked to install files, type "Y"</dd>
		<dd>New version files should install</dd>
	<dt>Check release-upgrade setting: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd>If Prompt=normal then: sudo sed -i 's/Prompt=never/Prompt=never/'</dd>
		<dd>If Prompt=lts then: sudo sed -i 's/Prompt=lts/Prompt=never/'</dd>
	<dt>Check release-setting again: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd> If sed command fails, edit manually, changing to: Prompt=never</dd>
	<dt>Start the upgrade: sudo do-release-upgrade</dt>
		<dd>Checking for new Ubuntu release</dd>
		<dd>No new release found</dd>
		<dd>You should be returned to the command prompt</dd>
</dl>

Test-case name:server_upgrade_cli_NORMAL
This will test upgrading to the next sequential release
<dl>
    <dt>Login into the system locally, or via SSH if openssh-server is installed</dt>
    <dt>In the terminal or console: sudo apt-get update && sudo apt-get upgrade</dt>
        <dd>APT should update</dd>
		<dd>If asked to install files, type "Y"</dd>
		<dd>New version files should install</dd>
	<dt>Check release-upgrade setting: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd>If Prompt=never then: sudo sed -i 's/Prompt=never/Prompt=normal/'</dd>
		<dd>If Prompt=lts then: sudo sed -i 's/Prompt=lts/Prompt=normal/'</dd>
	<dt>Check release-setting again: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd> If sed command fails, edit manually, changing to: Prompt=normal</dd>
	<dt>Check current release: lsb_release -r</dt>
		<dd>Note the release version</dd>
	<dt>Start the upgrade: sudo do-release-upgrade</dt>
		<dd>APT will check for available release data</dd>
		<dd>APT will update the current package list</dd>
		<dd>If a new release if found, APT will add new repositories and start the upgrade</dd>
	<dt>When asked to start the upgrade, type "y"</dt>
		<dd>The installation should continue</dd>
	<dt>When asked, Restart services during package upgrades without asking, select "Yes"</dt>
	<dt>When asked, Remove obsolete packages, type "y"</dt>
		<dd>Old packages should be removed</dd>
	<dt>Login into the system locally, or remote via SSH.</dt>
	<dt>Check the release version: lsb_release -r</dt>
		<dd>Compare results to step(5), it should be the next sequential release.</dd>
</dl>

Test-case name:server_upgrade_cli_LTS
This will test upgrading LTS to LTS
<dl>
    <dt>Login into the system locally, or via SSH if openssh-server is installed</dt>
    <dt>In the terminal or console: sudo apt-get update && sudo apt-get upgrade</dt>
        <dd>APT should update</dd>
		<dd>If asked to install files, type "Y"</dd>
		<dd>New version files should install</dd>
	<dt>Check release-upgrade setting: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd>If Prompt=normal then: sudo sed -i 's/Prompt=normal/Prompt=lts/'</dd>
		<dd>If Prompt=never then: sudo sed -i 's/Prompt=never/Prompt=lts/'</dd>
	<dt>Check release-setting again: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd> If sed command fails, edit manually, changing to: Prompt=LTS</dd>
	<dt>Check current release: lsb_release -r</dt>
		<dd>Note the release version</dd>
	<dt>Start the upgrade: sudo do-release-upgrad</dt>
		<dd>APT will check for available release data</dd>
		<dd>APT will update the current package list</dd>
		<dd>If a new release if found, APT will add new repositories and start the upgrade</dd>
	<dt>When asked to start the upgrade, type "y"</dt>
		<dd>The installation should continue</dd>
	<dt>When asked, Restart services during package upgrades without asking, select "Yes"</dt>
	<dt>When asked, Remove obsolete packages, type "y"</dt>
		<dd>Old packages should be removed</dd>
	<dt>At, To finished the upgrade, restart required, type "y"</dt>
		<dd>The system should reboot. If logged in via SSH, you will be logged out</dd>
	<dt>Login into the system locally, or remote via SSH if openssh-server is installed</dt>
	<dt>Check the release version: lsb_release -r</dt>
		<dd>Compare results to step(5), it should be the next sequential LTS release.</dd>
</dl>

Test-case name:server_upgrade_cli_DEV
This will test upgrading to a development release
<dl>
    <dt>Login into the system locally, or via SSH if openssh-server is installed</dt>
    <dt>In the terminal or console: sudo apt-get update && sudo apt-get upgrade</dt>
        <dd>APT should update</dd>
		<dd>If asked to install files, type "Y"</dd>
		<dd>New version files should install</dd>
	<dt>Check release-upgrade setting: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd>If Prompt=never then: sudo sed -i 's/Prompt=never/Prompt=normal/'</dd>
		<dd>If Prompt=LTS then: sudo sed -i 's/Prompt=lts/Prompt=normal/'</dd>
	<dt>Check release-setting again: grep '^Prompt=' /etc/update-manager/release-upgrades</dt>
		<dd>Should return: Prompt=normal</dd>
		<dd> If sed command fails, edit manually, chainging to: Prompt=LTS</dd>
	<dt>Check current release: lsb_release -r></dt>
		<dd>Note the release version</dd>
	<dt>Start the upgrade: sudo do-release-upgrade -d</dt>
		<dd>APT will check for available release data</dd>
		<dd>APT will update the current package list</dd>
		<dd>If a new release if found, APT will add new repositories and start the upgrade</dd>
	<dt>When asked to start the upgrade, type "y"</dt>
		<dd>The installation should continue</dd>
	<dt>When asked, Restart services during package upgrades without asking, select "Yes"</dt>
	<dt>When asked, Remove obsolete packages, type "y"</dt>
		<dd>Old packages should be removed</dd>
	<dt>At, To finished the upgrade, restart required, type "y"</dt>
		<dd>The system should reboot. If logged in via SSH, you will be logged out</dd>
	<dt>Login into the system locally, or remote via SSH if openssh-server is installed</dt>
	<dt>Check the release version: lsb_release -r</dt>
		<dd>Compare Should return the current development branch</dd>
</dl>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-doc/attachments/20140117/cdcad81d/attachment.pgp>


More information about the ubuntu-doc mailing list