DC local prestage: kickstart script copies ostree-repo to old prestage directory

Bug #2039282 reported by Kyle MacLeod
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Kyle MacLeod

Bug Description

Brief Description
--------

DC local prestage: kickstart script copies ostree-repo to old prestage directory

Error:
2023-09-01 05:14:34.761 kickstart post_nochroot  info: controller Prestage operation: copying repo to /opt/platform-backup
2023-09-01 05:14:34.763 kickstart post_nochroot  info: controller Temporary backup mount is /tmp/platform-backup
2023-09-01 05:14:34.773 kickstart post_nochroot  info: controller Copying repo to /tmp/platform-backup
2023-09-01 05:14:39.832 kickstart post_nochroot  info: controller Calculating new checksum for prestaged /tmp/platform-backup/ostree_repo
2023-09-01 05:14:46.818 kickstart post_nochroot  info: controller Calculated checksum: d18bbf8a063cccb62d90ec851230c03c
2023-09-01 05:14:46.819 kickstart post_nochroot  info: controller Copying images and patches to /tmp/platform-backup
2023-09-01 05:15:23.385 kickstart post_nochroot  info: controller Replacing ostree sysroot remote with: file:///var/www/pages/feed/rel-22.12/ostree_repo/ starlingx

-------------
prestage data:
prestage data:du -sh /opt/platform-backup/*
3.6G    /opt/platform-backup/22.12
80K    /opt/platform-backup/install.log
du: cannot read directory '/opt/platform-backup/lost+found': Permission denied
16K    /opt/platform-backup/lost+found
4.1G    /opt/platform-backup/ostree_repo
sysadmin@controller-0:/opt/platform-backup$ du -sh /opt/platform-backup/22.12/*
4.0K    /opt/platform-backup/22.12/container-image.tar.gz.md5
2.3G    /opt/platform-backup/22.12/container-image1.tar.gz
1.4G    /opt/platform-backup/22.12/container-image2.tar.gz{code}

Severity
--------

Critical: System/Feature is not usable after the defect

Steps to Reproduce
--------

deploy systemcontroller

deploy subcloud

backup subcloud

create prestaged.iso, use patch3 iso

wipe disks on subcloud

install prestaged.iso on subcloud

restore subcloud via dcmanager, use with-install option

Expected Behavior
--------

the subcloud should retrieve the prestage data during the restore

Actual Behavior
--------

the subcloud could not find the prestage data under /opt/platform-backup/22.12. The ostree_repo data was placed under /opt/platform-backup

Reproducibility
--------
100% reproducible

System Configuration
--------
Dc / subcloud

Load info
--------
SW_VERSION="22.12"
BUILD_DATE="2022-12-19 07:22:00 +0000"

Last Pass
--------
new test scenario.

Workaround
--------
move prestaged ostree-repo from /opt/platform-backup/ to /opt/platform-backup/22.12

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to metal (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/metal/+/898245

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to metal (master)

Reviewed: https://review.opendev.org/c/starlingx/metal/+/898245
Committed: https://opendev.org/starlingx/metal/commit/e81d0bf4e7f6c3ff0c814ac48b923dc8d889df03
Submitter: "Zuul (22348)"
Branch: master

commit e81d0bf4e7f6c3ff0c814ac48b923dc8d889df03
Author: Kyle MacLeod <email address hidden>
Date: Thu Oct 12 11:16:59 2023 -0400

    Prestaged ISO: copy ostree_repo to versioned platform-backup

    This commit applies to the prestaged ISO install. The kickstart.cfg is
    updated to copy the prestaged ostree_repo into release-specific
    /opt/platform-backup/<release> location.

    A minor change is also included in miniboot.cfg to sync the patching
    metadata for prepatched ISOs. This fills a potential hole in the
    patching metadata sync behaviour identified during testing.
    Normally the patching metadata is synchronized from the system
    controller down to the subcloud. For the prestaged ISO case, this change
    is necessary to ensure the patching metadata is seeded from the
    prepatched ISO created via gen-prestaged-iso.sh.

    Test Plan
    PASS:
    - Build prestaged ISO, including container images and a patch
        - Install subcloud using prestaged ISO
        - Verify contents of /opt/platform-backup/<release> are properly
          populated.
        - Verify subcloud is installed using prestaged data from
          /opt/platform-backup/<release>
        - Verify that included container images are installed
    - Build prestaged ISO using a pre-patched ISO. Install subcloud, ensure
      that patching metadata is properly synchronized on installation.

    Out of scope failure:
    - A new bug to be raised for the following:
        - Verify that the included patch is installed on the subcloud
          - It appears that this has never worked in Debian. The --patch
            option makes sense for a Debian installation, since the patches
            are contained in ostree commits. To fully support this
            functionality we need to implement a new mechanism to do a
            sw-patch upload and apply at some point during the installation.
          - Support for the gen-prestaged-iso.sh --patch option will be
            added in a future commit

    Closes-Bug: 2039282
    Signed-off-by: Kyle MacLeod <email address hidden>
    Change-Id: I973f4704eae09634a0c3fe2f7fbc31ac1835fcf8

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Kyle MacLeod (kmacleod)
importance: Undecided → Medium
tags: added: stx.9.0 stx.distcloud stx.metal
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.