9 Commits

Author SHA1 Message Date
Bruce Jones
4e09b61d0d Revert "Fix kickstarts patching"
This reverts commit 0366f8552d5ac9784de9992b6ae98958c9a40381.

Reason for revert: breaks sanity

Change-Id: Ie580ae328a80abfc2a1964157ac1b14b70dc98e9
2023-09-26 22:28:49 +00:00
Salman Rana
0366f8552d Fix kickstarts patching
Ostree doesn't manage the /var filesystem. Anything
installed there during initial filesystem setup becomes
unpatchable [1]. As a result, the kickstart install dir
/var/www/pages/feed/rel-${platform_release}/kickstart
is not updated according to patch changes.

This commit changes the platform-kickstarts install paths
to a place that ostree handles,
/usr/share/platform-kickstarts/rel-${platform_release}
in this case and symlinks it to
/var/www/pages/feed/rel-${platform_release}/kickstarts.

[1] https://review.opendev.org/c/starlingx/ha/+/890918

Test Plan:
1. PASS: ISO install and verify symlink created:
         /var/www/pages/feed/rel-${platform_release}/kickstarts ->
         /usr/share/platform-kickstarts/rel-${platform_release}
2. PASS: Verify that the centos/ dir, kickstart.cfg & miniboot.cfg
         are installed to /usr/share/platform-kickstarts/
         rel-${platform_release}
3. PASS: Verify PATCH apply, ensure that changes are applied to
         /var/www/pages/feed/rel-${platform_release}/kickstarts
4. PASS: Manually remove/re-install the platform-kickstarts package
         and verify kickstarts dir and symlink

Closes-Bug: 2034753
Closes-Bug: 2035109

Change-Id: I307d28c086bb3d9f0e4d6792db44e55c99358a50
Signed-off-by: Salman Rana <salman.rana@windriver.com>
2023-09-18 15:37:31 -04: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
Al Bailey
a975004cb6 Update platform-kickstarts debian package ver based on git
Update debian package versions to use git commits for:
 - platform-kickstarts

Old version was: 5
New version is: 167

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-kickstarts

Story: 2010550
Task: 47400

Signed-off-by: Al Bailey <al.bailey@windriver.com>
Change-Id: Id5fb0c329840c89a8559125cbac4f77315132d1c
2023-02-22 20:06:43 +00:00
Eric MacDonald
b5d22ef3e7 Create new pxeboot feed refresh script and service
This update introduces a new script that can be called
by patching to refresh the kernel, initrd and other
system node install feed staged files in support of
kernel patching.

This update also introduces and enables new service file
that triggers the creation of the pxeboot feeds or refreshes
the pxeboot feeds if what they contain does not match the
content in /boot.

Both new script and service files are added to the
pxe-network-installer package so they get installed
into the filesystem properly.

Lastly, there are 2 kickstart changes implemented.
 1. The kickstart code that copied the kickstart files from
      /var/www/pages/feed/rel-xx.xx/
      to
      /var/www/pages/feed/rel-xx.xx/kickstart
    is removed in favor of the pxe-network-installer package
    doing that automatically.
 2. The kickstart is modified to remove the previous pxeboot
    feed fetch and creation function.
    One exception to this is the efi.img file, its fetch remains.
    Note the efi image is currenly not included in the /boot dir.

Test Plan:

PASS: Verify Debian build and AIO DX install (cd and pxe installs)
PASS: Verify Debian Standard 2+1 DX system install
PASS: In above cases verify end-to-end handling of the following
      test case staging.
PASS: Verify pxeboot feed staging on subcloud controller-0 install
PASS: Verify pxeboot feed file positioning in
      - /var/pxeboot/rel-xx.xx (kernel and initrd images)
      - /var/www/pages/feed/rel-xx.xx/pxeboot (kernel/initrd images)
      - /var/www/pages/feed/rel-xx.xx/pxeboot/EFI/BOOT (other files)
      - /var/pxeboot and /var/www/pages/feed/rel-xx.xx (efi.img)
PASS: Verify rsync bypass for the above cases when the files match
      - complete and partial cases
PASS: Verify staging when the stage dirs are missing
      - complete and partial cases
PASS: Verify staging when stage files mismatch
      - complete and partial cases
PASS: Verify service enable on controllers for AIO and STD configs
PASS: Verify kickstart file position change
PASS: Verify shellcheck static analysis
PASS: Verify pxeboot_feed.sh script error handling
PASS: Verify pxeboot_feed.sh script logging

Story: 2009968
Task: 46789
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Change-Id: Ic98b2686c417103749cb777adb28ac73ac1d397c
2022-11-20 15:36:23 +00:00
Eric MacDonald
492dfeec48 Debian: Package instead of fetch pxeboot utilities
This update packages the pxeboot utilities into the
pxe-network-installer and modifies the kickstart to
no longer fetch them.

Once packaged they no longer need to be staged in feed.
Once packaged then they can be patched.

Test Plan:

PASS: Build and install AIO DX
PASS: Compare /var/pxeboot dir before and after update
PASS: Verify system host-reinstall controller-0 from controller-1
PASS: Verify unlock of reinstalled controller-0
PASS: Verify kickstart logs now exclude pxeboot utility staging

Story: 2009968
Task: 46619
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Change-Id: I75bcfe06724cbfc7203b187cb7c131694de69920
2022-10-23 11:07:47 +00:00
Shrikumar Sharma
fb157cf447 Add miniboot.cfg to enable subcloud add via USB install
miniboot.cfg is the debian kickstart required for subcloud
addition (miniboot). In this commit, this file is added and
copied to the relevant locations in order to include it into the
final ISO.

Test Plan:

PASS: Verify that miniboot.cfg is included in the iso under
      kickstart.

PASS: Verify that the installation of the subcloud succeeds with
      this kickstart (USB Install).

Story: 2010118
Task: 45739

Signed-off-by: Shrikumar Sharma <shrikumar.sharma@windriver.com>
Change-Id: I18e48bb468ff51b8f7132b971e7f2a3bbf157451
2022-07-12 14:15:42 +00:00
Eric MacDonald
c18df887d8 Debian KS: Setup /var/pxeboot utilities from install source
This update enhances the kickstart to populate /var/pxeboot
directory with pxeboot utilities from the install source.

This setup is required for controller function to support
pxebooting system nodes.

The addition of menu.c32 is temporary. It will be removed
once it is added to LAT.

Test Plan:

PASS: Verify /var/pxeboot setup from usb install source
PASS: Verify /var/pxeboot setup from pxeboot install source
PASS: Verify /var/.../feed/<rel> setup from pxeboot install source
PASS: Verify pxeboot of AIO controller-1 (uefi and bios)
PASS: Verify pxeboot of AIO controller-0 from controller-1
PASS: Verify lock and unlock both controllers several times
PASS: Verify swact back and forth several times
PASS: Verify system host-reinstall controller-1
PASS: Verify look and feel
PASS: Verify logging

Note: Secure boot of system node is not yet verified
      to be supported

Story: 2009301
Task: 45305
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Change-Id: Ibba23eb82113e218daa60a318ec5f03c6dc4b887
2022-07-09 14:13:21 +00:00
emacdona
dd727fe1e7 debian: Add Debian packaging for platform-kickstarts
Add Debian packaging infrastructure for platform-kickstarts

Test Plan:

PASS: Verify CentOS package build and iso create
PASS: Verify Debian package build and iso create
PASS: Verify PXE Boot install with kickstart (single disk)
PASS: Verify kickstart xxxPLATFORM_RELEASExxx variable replacement
PASS: Verify platform backup partition creation and persistence
PASS: Verify single disk vg and lv setup ; log and scratch
PASS: Verify install traits=controller,worker boot paramter handling
PASS: Verify disk boot kernel parameter cmdline update (aio)
PASS: Verify platform.conf setup
PASS: Verify INSTALL_UUID setup
PASS: Verify boot interface setup, dhcp and login support
PASS: Verify install script and logs preserved over an install
PASS: Verify instdev with by-path notation
PASS: Verify ostree repo pull to feed dir

Limitations:
- Single Disk install - Currently investigating lv leaking to other disks
- Do not specify lowlatency trait without low latency kernel
- USB install does not use this kickstart yet ; its not in the iso

Story: 2009101
Task: 44658
Depends-On: https://review.opendev.org/c/starlingx/tools/+/834375
Co-authored-by: Eric MacDonald <Eric.Macdonald@windriver.com>
Co-authored-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
Signed-off-by: emacdona <eric.macdonald@windriver.com>
Change-Id: I50bb797bedd9fb7f7ab1bbdae6e6f22b1023f1fb
2022-03-24 23:46:42 +00:00