Commit Graph

223 Commits

Author SHA1 Message Date
Guilherme Schons bf5162bc20 Add patch extract from load
This commit adds extracting the patches files (metadata) from the
load being imported.

Test Plan:
    Passed: load from previous version imported as inactive
    Passed: load from new version imported

Story: 2010611
Task: 48546

Change-Id: I12a2c9f62523f6b08294f2538ad77b5c8338a751
Signed-off-by: Guilherme Schons <guilherme.dossantosschons@windriver.com>
2023-08-08 12:15:00 -03:00
Bin Qian 005544b651 support import previous compatible load
Add support for importing load with import.sh from the current load.
This enables to always import load with higher version import.sh (in the
case of load-import --inactive)

TCs:
    passed: from system controller running 23.09 load, import 22.12 load
    passed: regression import N+1 load

Story: 2010611
Task: 48371

Change-Id: I4aec6eaa89019d4852979c27a708e409f32e27b0
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2023-07-25 19:10:12 +00:00
Kyle MacLeod 5f3c54297d Support CentOS previous release in subcloud remote install
This commit introduces support for installing CentOS-based previous
release (21.12) in Debian.

There are two main components in this commit:
1. Handle the label change for the backup partition:

Platform Backup in 21.12 vs 'platform_backup' in Debian
This is accomplished by ignoring the label/partlabel entirely when
searching for an existing backup partition. Instead, the partition
GUID is used to locate the partition. The GUID does not change
between distributions.

2. Use pre-bundled CentOS kickstarts for subcloud installs in Debian

Since modifications are required to the CentOS kickstart files for the
above, we copy the relevant pre-bundled centos kickstarts (for miniboot
and prestaged ISO only) into a centos-specific directory under the
Debian /var/www/pages/feed/rel-${platform_release}/kickstart directory
structure, in order to be available for the gen-bootloader-iso-centos.sh
utility. These files are included in the platform-kickstarts .deb
package.

NOTES on how the pre-bundled files are created:
- We cannot use the files under bsp-file/kickstarts/*.cfg, since they
  are not valid for 21.12 release (e.g. they refer to /var/www)
- Instead, files were taken from a valid 21.12 release and manually
  merged with the pre-bundled files generated from this repo

GOING FORWARD:
Only the bundled files at kickstart/files/centos/*.cfg will be
maintained. At a later time, we may choose to remove the partial
kickstarts under bsp-files/kickstarts/*.cfg, since they are not used
anywhere.

Test Plan

PASS:
- Build full ISO, verify that the
  /var/www/pages/feed/rel-23.09/kickstart/centos directory is populated
  with the pre-bundled kickstart files
- Verify previous-release CentOS subcloud install/deployment under
  Debian (requires patched 22.12 load)
- Verify current-release subcloud install under Debian

Story: 2010611
Task: 48268

Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
Change-Id: I1b7f76212e222dea7c6e586e4e9492f8a86a955e
2023-06-30 13:06:35 -04:00
Zuul fb1ab7114e Merge "Refactor from-load pxe setup in to-load kickstart" 2023-06-16 19:03:11 +00:00
Zuul 13592cafa6 Merge "miniboot: Use release-specific prestage data, handle subcloud downgrade" 2023-05-23 18:29:33 +00:00
Kyle MacLeod 018d06ccec miniboot: Use release-specific prestage data, handle subcloud downgrade
This commit handles the relocation of ostree_repo prestaging data from
/opt/platform-backup to /opt/platform-backup/<release>. The miniboot.cfg
kickstart now looks for prestaged data in the release-specific location.

We also handle the backup partition name change across CentOS/Debian. In
the case of a downgrade the CentOS miniboot kickstart code is updated to
use the partition GUID rather than LABEL or PARTLABEL. The GUID is
constant across all releases and is therefore a more reliable indicator
of the backup partition.

Tech debt: Fix the arbitrary wait sleep calls used when configuring
VLAN addressing. Now uses the more efficient wait_for_interface
approach for the VLAN links.

Test Plan
PASS:
- Boot with prestaged data under /opt/platform-backup/<release>/
  Ensure boot/install successfully uses prestaged data.
- Boot into older release under prestaged /opt/platform-backup/21.12
    - Test moving from 22.12 -> 21.12 and 21.12 -> 22.12
    - Ensure backup partition is found using GUID approach.
    - Ensure boot/install successfully uses prestaged data.
- Boot into both current and older release with no prestaged data
    - Test moving from 22.12 -> 21.12 and 21.12 -> 22.12
    - Ensure boot/install is successful.
- Boot subcloud with bootstrap_vlan, ensure that the wait_for_interface
  calls properly wait until the link is up.

Story: 2010611
Task: 47943
Depends-On: https://review.opendev.org/c/starlingx/distcloud/+/880789

Change-Id: I381b60285e9bfc375f01f45b79174b71da7f0565
Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
2023-05-18 13:46:30 -04:00
junfeng-li d9d7111cd8 Refactor from-load pxe setup in to-load kickstart
Details: Since this is the first Debian to Debian upgrade,
we need to refactor some existing code that is used for
centOS upgrade.

This commit is

	1. clean up CentOS related code
	2. copy to-load pxeboot-update.sh to /etc/ during the import
	   instead of /usr/sbin/
	3. install to-load pxeboot-update.sh in /etc/ instead of
	   /usr/sbin/ during iso installation
	4. update kickstart Upgrade Support accordingly to set up
    	   from-load feed

Test Plan:

PASS: built the iso for upgrade
PASS: upgraded from 22.12 to 23.09 in DX
PASS: downgrade from 23.09 to 22.12 in DX

Depends-on: https://review.opendev.org/c/starlingx/tools/+/881882

Task: 47805
Story: 2010651
Signed-off-by: Junfeng (Shawn) Li <junfeng.li@windriver.com>
Change-Id: Ia67f5f3e66f5b33c3d7fb8d93a15547d59eaa71e
2023-05-16 15:42:33 +00:00
Zuul 1455771c9c Merge "Enable upgrade from 22.12" 2023-05-03 15:17:55 +00:00
Bin Qian 4ec6fb2ffe Copy patch metadata so to display patch info
This is to copy patch metadata to patch metadata and feed
directory to properly setup patch info for N+1 release in
load-import.

TCs:
     Passed: Import pre-patched load to verify the patch info is
             visible with sw-patch query command before upgrade.
     Passed: Patch info is visible on controller-1 after it is upgraded.
     Passed: Patch info is visible on controller-0 after it is upgraded.

Closes-Bug: 2015110

Signed-off-by: Bin Qian <bin.qian@windriver.com>
Change-Id: I6cb330e7665bc170bf8206342643cfdefcb95ed1
2023-04-11 22:37:42 +00:00
Junfeng (Shawn) Li 7a4a14030b Enable upgrade from 22.12
Details: This commit enables the upgrade path
from 22.12.

Test Plan:

PASS: built the iso and upgrade is enabled.

Task: 47679
Story: 2010651

Signed-off-by: Junfeng (Shawn) Li <junfeng.li@windriver.com>
Change-Id: Id0b61f5c97b5364518226dd1b9b5136e2eef49c4
2023-03-17 15:39:01 -04:00
Al Bailey d3f64443f3 Update platform-upgrades debian package ver based on git
Update debian package versions to use git commits for:
 - platform-upgrades

bsp-files/upgrades contains the platform-upgrades package.

Old version was: 1
New version is: 7

The Debian packaging has been changed to reflect all the
git commits under the directory, and not just the commits
to the metadata folder.

This ensures that any new code submissions under those
directories will increment the versions.

Test Plan:
  PASS: build-pkgs -p platform-upgrades

Story: 2010550
Task: 47398

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Ib441b4ead97749dbf109f973752b7de774f1b21b
2023-02-22 19:54:13 +00:00
Junfeng (Shawn) Li d3a7f90c0b Fix 21.12 feed directory for 22.12 upgrade
Details: The 21.12 feed directory is in /www/pages/feed/rel-21.12/.
The import.sh script in 22.12 iso is looking for the feed directory
in /var/www/pages/feed/rel-21.12/.

This commit is to make sure the import.sh is looking at
the right feed directory in different CentOS release

Test Plan:

PASS: ran the upgrade from 21.12 and feed directory is set up
PASS: ran the upgrade from 22.06 and feed directory is set up

Task: 46918
Story: 2009303
Signed-off-by: Junfeng (Shawn) Li <junfeng.li@windriver.com>
Change-Id: I30ea6403c336daa618c9b650ba94cfa1f94533f8
2023-01-18 09:20:18 -05:00
Davi Frossard f644aa29b0 sysinv_fpga_agent merge with sysinv_agent
Merging services sysinv-fpga-agent with sysinv-agent
in order to reduce overall OS overhead.

Test Plan: (CentOS)

On AIO-DX env:
<sysinv-fpga-agent tests>
PASS: Check FPGA pod and its resources.
PASS: Check FPGA pod and its resources after lock/unlock.
PASS: Check FPGA pod and its resources after the system reboot.
PASS: Verify image upload with non-functional image with
retimer-included
PASS: Verify retimer_a_version and retimer_b_version after applying
BMC image with re-timer and bmc
PASS: Verify firmware update for BMC and retimer image with
retimer-include=False
PASS: Verify apply BMC image without re-timer first and then BMC
image with re-timer, only latest image is kept in
device-image-state-list
PASS: Test accelerator configuration is persistent after lock/unlock.
PASS: Test to verify that the accelerator configuration is persistent
after a graceful reboot.

<sysinv-agent tests>
PASS: Verify alarms raised by PTP feature
PASS: Verify the configuration and run of single ptp-instance
PASS: Verify the configuration and run of single phc2sys
PASS: Verify PTP CLI commands

Story: 2010087
Task: 45628

Depends-On: I1a7db97390f4e331e05aec68471ca9bd08ce63d0
Signed-off-by: Davi Frossard <dbarrosf@windriver.com>
Change-Id: I593722ac55478c57db80c2ff950a0574ae70d545
2022-10-03 18:45:03 +00:00
Rafael Cardoso Pereira 1d09cc08d8 Removing unused package python-ryu
After performing an analysis of the system it was recognized
that the following package: python-ryu; is not being used anymore
by the system. In order to clean it up, it was decided to
remove the package.

Test Plan:
PASS - All pkgs built successfully after removal of python-ryu
PASS - Successfully generated an openstack tarball
PASS - Stx-Openstack tarball successfully applied
PASS - Built CentOS ISO with the change and applied it to a lab

Partial-bug: #1985091
Depends-On: https://review.opendev.org/c/starlingx/integ/+/852863

Signed-off-by: Rafael Cardoso Pereira <rafael.cardosopereira@windriver.com>
Change-Id: I27d119c11d18c1ebbd0beafe154a32960c101529
2022-08-15 12:25:11 +00:00
Zuul 30030543c2 Merge "relocate /www to /var/www" 2022-08-05 10:28:59 +00:00
Zuul 85eb57baa6 Merge "relocate /pxeboot to /var/pxeboot" 2022-08-05 04:42:54 +00:00
lbonatti 8591dfae52 relocate /www to /var/www
Adapt filesystem usage to meet OSTree requirements
relocating folder /www to /var/www

Test Plan:

PASS:
CentOS -> CentOS upgrade:
- 22.06 -> 22.12

Story: 2009303
Task: 45896

Signed-off-by: lbonatti <LuizEduardo.Bonatti@windriver.com>
Change-Id: Iff532db14f65773375948e500764b96dc11d0d8a
2022-08-04 10:25:01 -03:00
Zuul b6dad0a071 Merge "Import Debian load" 2022-08-03 21:59:36 +00:00
Bin Qian e74544dd66 Import Debian load
Update import.sh to import Debian 22.12 load into Centos 22.06.

Test Cases:
    1. Import Debian 22.12 load into Centos 22.06. Visually inspect
    required files are in place.
    2. Import Centos 22.12 load into Centos 22.06. Start upgrade,
    and upgrade controller-1 started.

Story: 2009303
Task: 45865

Depends-on: https://review.opendev.org/c/starlingx/tools/+/850571
            https://review.opendev.org/c/starlingx/tools/+/850433

Change-Id: Id21d502db48a8fbf1c947415889cf2e0f481abed
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2022-08-03 14:31:35 +00:00
Bin Qian d6e0e22496 Include upgrades meta files to Debian ISO
Add upgrades meta files to /upgrades directory in Debian ISO.
Files include:
    version
        Version file to indicate the ISO release version
    metadata.xml
        Supportted upgrade path, and required patch
    import.sh
        Shell script to import the ISO load into StarlingX system
    pxeboot-update-<rel-ver>.sh
        Shell script to update pxeboot config file for new release

Test cases:
    Build Debian ISO and visually inspect the existance of files
    list above in /upgrades directory of Debian ISO.
    Build Centos ISO with no changes.

Story: 2009303
Task: 45830

Change-Id: I1f0b42c6c37943b19bdf5dd7baaf81da5d1eef7a
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2022-08-02 21:01:58 +00:00
lbonatti b2ef1f8c0a relocate /pxeboot to /var/pxeboot
Adapt filesystem usage to meet OSTree requirements
relocating /pxeboot to /var/pxeboot

Test Plan:

PASS:
CentOS -> CentOS upgrade:
- 22.06 -> 22.12

Story: 2009303
Task: 45898

Signed-off-by: lbonatti <LuizEduardo.Bonatti@windriver.com>
Change-Id: I30a35937cd6da1489e04fd1b0257f0fbe825af96
2022-08-02 12:59:44 +00:00
Bin Qian f1de4d9388 Support upgrade from 22.06
Make 22.06 as valid upgrade from version.

Story: 2009303
Task: 45682
Depends-on: https://review.opendev.org/c/starlingx/ansible-playbooks/+/847848
Change-Id: I195e95f7037e5a947164b87c260ca141aaba8fa7
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2022-07-20 15:34:38 +00:00
Shrikumar Sharma f31cd0b255 Copying the package_checksums file to
<platform_release>_packages_list.txt

The prestaging operation on the system controller requires the list
of packages and their checksums in a file named
"<platform_release>_packages_list.txt", where <software_version> is
the version of the system controller (i.e. the new version which the
subclouds are being upgraded to).

The list of packages and their checksums is obtained from different
sources as a file named "package_checksums". This file should be
copied to /usr/local/share/pkg-list as
<platform_release>_packages_list.txt. It is currently copied as
package_checksums.

This fix copies the file "package_checksums" to
/usr/local/share/pkg-list as <platform_release>_packages_list.txt.

Test Plan:

PASS: Verify that package_checksums is copied to
      /usr/local/share/pkg-list as <platform_release>_packages_list.txt
      when upgrading the system controller to a higher version.

PASS: Verify that package_checksums is copied to
      /usr/local/share/pkg-list as <platform_release>_packages_list.txt
      when installing a controller over pxeboot

PASS: Verify that package_checksums is copied to
      /usr/local/share/pkg-list as <platform_release>_packages_list.txt
      when adding a subcloud from the system controller (using dcmanager
      add)

PASS: Verify that package_checksums is copied to
      /usr/local/share/pkg-list as <platform_release>_packages_list.txt
      when installing a system controller in virtualbox from
      bootimage.iso.

Closes-Bug: 1978420
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
Change-Id: I6270a7c9169718b2096a83135eeadb634d37b76b
2022-06-13 13:55:22 -04:00
Shrikumar Sharma f1694be26d Delete Platform Backup partition first when installing Prestage iso
The size of a subcloud's platform backup partition can be increased
from a minimum of 30GB using a persistent_size entry in the file
install_values.yaml.

However, a failure to install prestage.iso is observed when a subcloud
has a platform backup partition size greater than 30GB. The failure to
install the prestage iso occurs, because "parted" attempts, by default
to create a 30GB platform backup partition in the prestaging kickstart.
"parted" fails when it encounters a partition size greater than 30GB.

This fix addresses this issue by always deleting the partition before
prestaging. This allows parted to create the partition with the default
value of 30GB, irrespective of what existed there previously.

Test Plan:
PASS: Verify that prestage ISO installation succeeds when the
      partition size of Platform Backup is greater than 30GB.

Regression:
PASS: Verify that prestage ISO installation succeeds when the
      force-install option is provided to gen_prestage_iso.sh

PASS: Verify that prestage ISO installation succeeds when the
      force-install option is not provided to gen_prestage_iso.sh
      and there is no pre-existing installation on the subcloud.

PASS: Verify that prestage ISO installation fails when the
      force-install option is not provided to gen_prestage_iso.sh
      and there is a pre-existing installation on the subcloud.

Closes-Bug: 1977975

Change-Id: I34fbf7bc6fb550deaee26e5c9a71402611834aa8
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-06-09 23:51:22 -04:00
Zuul 5e2f99943b Merge "Remote subcloud install failure in post-install script" 2022-06-02 19:26:00 +00:00
Shrikumar Sharma b4599522c1 Remote subcloud install failure in post-install script
When the kickstart tries to download packages_list from the
system controller, wget fails because the parameter to its
"-O" argument needs the full file path (including the file
name) as opposed to the full path to the directory that the
file resides in.

The argument has been fixed to use the full path name of the
file.

Test Plan:
PASS: Verify that the remote subcloud successfully downloads the
      file and installation passes.

Closes-Bug: 1976384

Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
Change-Id: I65b6bd66e62e7353e33f2694ca5bf99d413df836
2022-05-31 10:15:48 -04:00
Daian Cardoso Sganderlla 940b39b77e Delay time for boot to detect mpath disks
Give the boot enough time to be able to detect mpath disks.
In some cases boot was taking some time to detect mpath,
generating an error on installation.

Story: 2010046
Task: 45489

Test Plan:

PASS: AIO-DX Executed on lab with mpath

Signed-off-by: Daian Cardoso Sganderlla <Daian.CardosoSganderlla@windriver.com>
Change-Id: I4b79b00ff2e3f4db309284bcf7251b57ef524a9c
2022-05-27 20:16:59 +00:00
Zuul be95984d5c Merge "kickstarts: add support for mpath device" 2022-05-24 14:23:09 +00:00
Zuul dc584039f5 Merge "Add Ceph's mpath partition types" 2022-05-23 00:49:11 +00:00
Jackie Huang da68897268 kickstarts: add support for mpath device
The device node in /dev/ and device path in /dev/disk/by-path
can not be used directly for mpath devices, use /dev/mapper/mpathN
and /dev/disk/by-id/dm-uuid-mpath-<WWID> instead.

Test Plan:

* with local disks
PASS: install Standard with default boot menu
PASS: install AIO with default boot menu
PASS: install AIO (lowlatency) with boot_device= rootfs_device=

* with mpath device
PASS: install AIO with boot_device= rootfs_device=
PASS: install AIO with boot_device=mpatha rootfs_device=mpatha
PASS: install Standard with boot_device=mpatha rootfs_device=mpatha
PASS: install AIO (lowlatency)with boot_device=mpatha rootfs_device=mpatha
PASS: install AIO with boot_device=mpathb rootfs_device=mpathb
PASS: install AIO with boot_device=/dev/mapper/mpatha rootfs_device=/dev/mapper/mpatha

Failure Path:

* with local disks
PASS: install AIO with boot_device=mpatha rootfs_device=mpatha

* with mpath device
PASS: install AIO with default boot menu

Story: 2010046
Task: 45419

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Thiago Miranda <ThiagoOliveira.Miranda@windriver.com>
Change-Id: I60c5b2a7c7ca42d8e5e36ea517327c8a5431dde7
2022-05-21 21:20:02 +00:00
Zuul e86cf0de49 Merge "Install package_checksums in /usr/local/share/pkg-list" 2022-05-20 14:34:52 +00:00
Shrikumar Sharma 06626151de Install package_checksums in /usr/local/share/pkg-list
In order to prepare shared software packages on the system
controller for subcloud prestaging, the file
"package-checksums" containing a list of packages and
their checksums, must be copied to /usr/local/share/pkg-list
and renamed as packages_list.

The prestaging process needs the package-and-checksum list
for the version of the load on the controller and the version
of the load on the subcloud.

This file needs to be copied over to /var/www/pages/feed/rel-<id>
on the controller so that the subclouds can download it.

This file can be obtained by downloading from the system
controller. If the system is being installed directly from
a boot iso, the appropriate kickstart is called to install
the file from the mounted bootimage.iso.

There are a few cases which determine how to get the file.

Cases:
1. Install load directly from bootimage.iso (both controller and
   subcloud) - copy from mounted iso to location. The iso
   may be present on a peripheral device like a CD/DVD.

2. Install load over lan - download the file from server and copy
   to locations (all controllers)

3. Version upgrade by importing a new load - copy the file
   to the appropriate location on the system controller.
   The subcloud will download the package_checksums belonging
   to the imported load as part of the upgrade process.

Test Plan:
PASS: Verify that the file is copied over to /usr/local/share/
      pkg-list and /var/www/feed/rel-<rel-id>/ when installing
      System Controller or subcloud from bootimage.iso

PASS: Verify that the file is copied to the locations when
      installing controller-1 via pxeboot

PASS: Verify that the file is copied to the locations when upgrading
      the System Controller (using load-import)

PASS: Verify that the file is copied when adding a subcloud with
      dcmanager subcloud add

Depends On: https://review.opendev.org/c/starlingx/distcloud/+/841828
Story: 2009799
Task: 45376

Change-Id: If14b197999f2ae03e15fdc08ec27511ca1d41767
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-05-19 22:29:55 -04:00
Daian Cardoso Sganderlla dcdcadad22 Add Ceph's mpath partition types
Today StarlingX just checks for regular partition type while checking
some partitions. Because of that, when using a mpath disk there are
some cases that StarlingX will treat these partition as standard
partitions, instead of Ceph's partitions.

Test Plan:

PASS: Install AIO-SX
PASS: Install AIO-SX with one of the disks previously configured as an
OSD

Story: 2010046
Task: 45432

Signed-off-by: Daian Cardoso Sganderlla <Daian.CardosoSganderlla@windriver.com>
Change-Id: Ib63a48aacc790b266c2837cdd6eb58e412dc3490
2022-05-19 17:03:09 +00:00
Zuul 4f89a140d3 Merge "Filter out packages when installing with the prestage iso" 2022-05-06 18:22:20 +00:00
Shrikumar Sharma 75bcaca005 Filter out packages when installing with the prestage iso
In order to reduce the number of packages installed by the
prestage iso, more packages are added to
filter_out_from_prestaging. 635 packages are installed with
the current filter.

Test Plan:

PASS: Verify that the prestage iso installs with login option

PASS: Verify prestage iso is copied to /opt/platform-backup/xx.xx

Story: 2009948
Task: 45182

Change-Id: I242d5d0c04447c09f4dd25b5675f9fe2bc9eaa0a
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-05-06 12:39:15 -04:00
emacdona 1a6fd50e2c Support Redfish subcloud install with single packages fetch
This update modifies the miniboot kickstart so rpm Packages
repodata and patches are fetched from the system controller
only once during a Redfish subcloud install.

The existing packages mirror operation done in the %post phase
is moved to the %pre phase. However, since the in-service feed
dir does not exist at that time, the fetched content is
staged to /mnt/install/repo as

    /mnt/install/repo/Packages
    /mnt/install/repo/repodata
    /mnt/install/repo/patches

The %post phase fetch code that was moved is replaced with code
that positions the %pre fetched content to the local filesystem
here:

    # feed directory
    /var/www/pages/feed/rel-xx.xx/Packages
    /var/www/pages/feed/rel-xx.xx/repodata

    # updates directory
    /var/www/pages/updates/rel-xx.xx/Packages
    /var/www/pages/updates/rel-xx.xx/repodata

    # patching directory
    /opt/patching/packages
    /opt/patching/metadata

The miniboot kickstart is updated with a detailed description of
the various staging/prestaging install options along with logging
enhancements that show the source and destination flow of
packages, repodata and patches in the installation process.

Also modified kickstart to ensure that Prestaged Content takes
precedence over prestaged ISO. Both of which take precedence over
Staged Install.

Moved Prestaged content check to %pre stage som that the next
priority install option can be taken rather than a belated
install failure.

Test Plan

PASS: Verify single packages pull over subcloud controller-0 install
PASS: Verify with both UEFI and BIOS across various servers
PASS: Verify end-to-end subcloud installs (60+)

Packages

PASS: Verify install time is shorter
PASS: Compare feed directory before/after install
PASS: Compare package/repodata data transfer before/after install

Patch Handling

PASS: Compare patched content before/after installed subcloud
PASS: Verify patched updates are mirrored and auto applied
PASS: Verify patches can be applied and remove after install
PASS: Verify patch handling for both prestaged iso committed
      patches as well as non-committed patches.
PASS: Verify patch handling when installing subclouds from a system
      controller that has committed patches for all 3 install cases.

Failure Handling

PASS: Verify staging feed failure leads to installation
      failure ; parity behavior
PASS: Verify handling of failed lighttpd during packages download
PASS: Verify report_post_failure change handling

Robustness

PASS: Verify install to wiped disk
PASS: Verify reinstall of same controller
PASS: Verify expected lighttpd traffic logs
PASS: Verify success path logs
PASS: Verify install case logs show the install source/destination
PASS: Verify failure path error handling and messages

Prestaging Cases:

PASS: Verify prestaged ISO end-to-end install (25+)
PASS: Verify Prestaged Content install is priority 1
PASS: Verify Prestaged ISO install is priority 2
PASS: Verify Staged install is priority 3
PASS: Verify cascade of priority handling due to errors
PASS: Verify patches fetch from SC for Prestaged content install
PASS: Verify patches fetch from SC for Prestaged ISO install
PASS: Verify Prestaged Content Install with and without valid
      and invalid prestaged images
PASS: Verify Prestaged ISO install with and without prestaged valid
      and invalid prestaged images
PASS: Verify Prestaged ISO check failure leads to Prestaged Content
      Install
PASS: Verify Prestaged ISO check failure leads to Staged Install
      with incomplete prestaged content
PASS: Verify Prestaged ISO check failure leads to Staged install
      if prestaged repodata or Packages dir is not present or empty

Change-Id: I54ff9f7570d77efbb860904094adc5b6b8a3bf8d
Closes-Bug: 1971157
Signed-off-by: emacdona <eric.macdonald@windriver.com>
2022-05-04 07:42:57 -04:00
Zuul 3e0b66ec99 Merge "Prestaging rootfs and bootfs customization with script provided via the prestage iso" 2022-04-26 13:56:26 +00:00
Shrikumar Sharma 8928bf875e Prestaging rootfs and bootfs customization with script provided
via the prestage iso

When customizing the rootfs and bootfs, an external script is
provided via the prestage iso. The kickstart needs to execute
this script and obtain the rootfs and bootfs devices.

Test Plan:

PASS: Test the default prestaging operation on subclouds with
      different storage types (hard disk/ssd (nvme) )

PASS: Test the force install of prestage iso on different
      subclouds with different storage types with pre-existing
      installations

PASS: Test the graceful failure to install prestaging content
      when trying to install on subclouds (with different
      storage types) with pre-existing installations (and
      force-install is not used)

Regression:

PASS: Verify that autoinstaller installs successfully for all
      options

Story: 2009948
Task: 45048

Change-Id: Icc483d3430531a86c9a6488306a38e7d246ddd58
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-04-25 21:34:04 +00:00
Shrikumar Sharma 795cca3ec6 Prestaging package group and package filter
A new prestaging package group and package filter is created
for prestaging operations. It has fewer packages than the
platform-storage package group. Currently, 785 packages
are installed.

Test Plan:

PASS: Verify the creation of a new packagegroup,
      platform-prestaging, in the comps.xml file under the
      repodata directory of the prestage iso.

PASS: Verify that the number of packages to be installed
      decreases, when valid entries are included in the file
      filter_out_from_prestaging.

Story: 2009948
Task: 45146

Change-Id: Ied45039c83cbe181e74654d98f60cbae6ae14e5d
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-04-21 18:46:41 -04:00
Shrikumar Sharma dc3bfbf164 Force installation of prestage iso when force_install option is
provided through the kernel commandline

When there is an existing installation on the subcloud, the
kickstart will ensure that it is not overwritten by the prestaged
iso.

However, when the force_install option is provided via the kernel
commandline, the existing installation can be overwritten.

Test Plan:
PASS: Verify that the prestage iso overwrites the existing
      installation when the force_install option is provided at
      the kernel commandline.

PASS: Verify that the installation halts with a message, if there
      is an existing installation and force_install option is
      not provided at the kernel commandline.

PASS: Verify that the prestage iso installs when there is no
      pre-existing installation and force_install is provided

PASS: Verify that above tests pass on NVMe-based systems

Regression:
PASS: Verify that the prestage iso installs without force_install
      and no installation exists

Story: 2009948
Task: 44914

Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
Change-Id: I2491d80cb4e07aa2fb38381c9e92afd7549526ef
2022-04-07 15:23:24 -04:00
Zuul 3425ee8253 Merge "Precheck to avoid overwriting installed systems during prestaging" 2022-04-01 01:15:12 +00:00
Shrikumar Sharma 60dc6586d7 Precheck to avoid overwriting installed systems during prestaging
When booting the system with the prestaging ISO, check for the
presence of a valid installation.

Avoid overwriting an existing installation with a message to the
user.

Test Plan:

PASS: Verify that an existing installation is not overwritten by
      the prestaging operation

PASS: Verify failure handling of the prestaging operation with
      a message to the user, when an installation already exists
      on the subcloud.

PASS: Verify successful prestaging operation when there is no
      existing installation on the subcloud.

Story: 2009948
Task: 44872

Change-Id: I47e4f67f001da208f4e823ac699473c89b638ce5
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-03-31 11:35:36 -04:00
M. Vefa Bicakci d83d260aeb Filter out kmod-bnxt_en{,-rt} as necessary
This commit ensures that the kmod-bnxt_en package is not installed when
in the low-latency profile, and that the kmod-bnxt_en-rt package is not
installed when in the standard/non-low-latency profile.

This is achieved by adding the kmod-bnxt_en and kmod-bnxt_en-rt packages
to the filter_out_from_* and pre_pkglist* files as required.

Testing:
- An ISO image can be built using a monolithic build procedure.
- Installation of the ISO image is successful with standard and
  low-latency profiles.
- The kmod-bnxt_en package is only installed with standard profile,
  whereas the kmod-bnxt_en-rt package is only installed with low-latency
  profile.

Story: 2009915
Task: 44792

Depends-On: https://review.opendev.org/c/starlingx/kernel/+/833464

Change-Id: I7a5c6086183d6b04e587192012f37aa7d0a2c2b3
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
2022-03-16 12:13:28 -04:00
Shrikumar Sharma 710452d2e5 Install packages from platform backup if prestage iso is absent
When the %pre code in post_miniboot_controller.cfg kickstart is run,
it checks if a prestage iso is present; if one is not, then it
attempts to download from the systemcontroller. The solution is
to add /opt/platform-backup/<release-id> as a repo of higher
priority than download, but lesser than prestage-iso,
in the %pre section in post_miniboot_controller.cfg.

Test Plan

PASS: Verify that packages are retrieved from
      /opt/platform-backup/<release-id> if they have been prestaged

PASS: Verify that packages are downloaded from systemcontroller
      for installation if packages are not prestaged in
      /opt/platform-backup/<release-id>

Closes-Bug: 1963709
Change-Id: Ibd2fe8d555c47da16e181b03703374bfd73731e3
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-03-04 15:25:52 -05:00
Zuul 5635352596 Merge "Do not install N+1 release unless upgrade in progress" 2022-03-01 15:10:03 +00:00
Zuul 9fb1a258f0 Merge "Use alternative location if prestage iso does not exist" 2022-03-01 02:36:04 +00:00
Shrikumar Sharma 793ce1e7d2 Use alternative location if prestage iso does not exist
If the prestage iso does not exist, the kickstart looks for
for packages, repodata and patches under
/opt/platform-backup/<release-version>. If these or a subset
of, are not available, then download them from the system
controller.

Test Plan:
PASS: Verify that packages and repodata are retrieved
      from platform-backup when prestaging iso does not exist

PASS: Verify that patches are downloaded if not available in
      platform-backup and the prestaging iso does not exist

PASS: Verify all prestaged patches are used locally rather
      than downloaded

PASS: Verify that packages get downloaded if either prestage
      Packages or repodata directory is empty or does not
      exist

PASS: Verify that packages, repodata and patches are downloaded
      if neither platform-backup content nor prestaging iso is
      available.

Story: 2009799
Task: 44622

Change-Id: If2c63d2f3207b80073390d169e229945470f44eb
Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
2022-02-28 19:15:25 -05:00
Thales Elero Cervi 9485cf3c0c Filtering pci-irq-affinity package on Worker nodes
This change is part of an effort to move the pci-irq-affinity agent into
an openstack application container, instead of a platform service.

Since the agent is now containerized within the stx-openstack
application, AIO and Worker nodes don't need the agent package anymore.
Controller and storage nodes already filter out the package.

TEST PLAN:
PASS: Successfully build a platform ISO
PASS: Install the built ISO on an AIO-SX system
PASS: Verify that the pci-irq-affinity-agent.service is NOT activated
after system startup
PASS: Verify that there are no active alarms

Story: 2009299
Task: 43655

Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/814217

Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com>
Change-Id: I44f437b6b0d1aa3838858989112a8776af7ed38c
2022-02-22 12:11:31 -03:00
Bin Qian 46f41901d6 Do not install N+1 release unless upgrade in progress
During upgrade, installer RPMs from release N need to be installed
to host (release N+1).
During downgrade, installer RPMs from release N+1 don't need to be
installed to host (release N)
Currently installer from "the other release" is installed to host
regardless an upgrade is in progress or no by kickstarts. This
requires the kickstarts on release N to understand the structure of
installer RPM of future release. The installer from "the other
release" only useful is when an upgrade is in progress (to provide
installer when downgrade is required).

This change removes the step to install RPMs from other release to
host when upgrade is not in progress.

TCs:
    Upgrade from 21.05 -> 21.12 abort after controller-1
        upgrade completed
    Upgrade from 21.05 -> 21.12
    Upgrade from 21.12 -> 22.02 abort after controller-1
        upgrade completed
    Upgrade from 21.12 -> 22.02
    load delete after 21.05 -> 21.12 upgrade abort
    load delete after 21.05 -> 21.12 upgrade complete
    load delete after 21.12 -> 22.02 upgrade abort
    load delete after 21.12 -> 22.02 upgrade complete

Depends-on: https://review.opendev.org/c/starlingx/config/+/829943
Closes-bug: 1961424

Change-Id: I86edbe09410d3df9b9440d89208af90f0eb1fd09
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2022-02-18 11:16:45 -05:00
Zuul 3edbb7f778 Merge "Support upgrades from stx.6.0" 2022-01-05 16:51:24 +00:00