DC prestaged.iso overwrites existing images even when force parameter is not specified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Kyle MacLeod |
Bug Description
Brief Description
DC Debian - Prestaged.iso overwrites existing images even when we don't provice force parameter
Note:
It does not impact the local install functionality, however it impacts its robustness.
Test Steps:
Create prestaged.iso without force parameter
INFO: Calculating new checksum for ostree_repo at /var/home/
INFO: ostree_repo checksum: 8d86a2e91690e84
INFO: Generating prestage.iso from params: boot_device=
INFO: Setting instdev=
INFO: Setting instdev=
INFO: Parameters: boot_device=
INFO: Setting Kickstart patch from the kickstart directory
INFO: COMMON_ARGS: initrd=/initrd instdate=
INFO: Prestage ISO created successfully
Install prestaged.iso on a subcloud with an existing image
The install should halt with a message saying that there is an existing image
Error: (No existing installation found)
2022-12-20 06:15:31.022 kickstart ks-early info: controller Found rootfs /dev/disk/
2022-12-20 06:15:31.039 kickstart ks-early info: controller Searching for existing installation...
2022-12-20 06:15:31.040 kickstart ks-early info: controller Searching on /dev/nvme0n1p1
2022-12-20 06:15:31.090 kickstart ks-early info: controller Searching on /dev/nvme0n1p2
2022-12-20 06:15:31.110 kickstart ks-early info: controller Searching on /dev/nvme0n1p3
2022-12-20 06:15:31.131 kickstart ks-early info: controller Searching on /dev/nvme0n1p4
mount: /mnt/temp_mount: unknown filesystem type 'LVM2_member'.
2022-12-20 06:15:31.138 kickstart ks-early warn: controller Unable to mount /dev/nvme0n1p4
2022-12-20 06:15:31.142 kickstart ks-early info: controller Installing Prestaged content. No existing installation found.
2022-12-20 06:15:31.163 kickstart ks-early info: controller Partition id = 1
2022-12-20 06:15:31.164 kickstart ks-early warn: controller Deleting platform backup at partition 1 on /dev/nvme0n1
2022-12-20 06:15:31.207 kickstart ks-early info: controller Deleted partition 1 on /dev/nvme0n1
Installing to: /dev/nvme0n1
Last Time passed: Build from Nov, 30th
Severity
<Major: System/Feature is usable but degraded>
Steps to Reproduce
Create prestaged.iso without force parameter
Install prestaged.iso on a subcloud with an existing image
Expected Behavior
The install should halt with a message saying that we have an existing image
Actual Behavior
The install with prestaged.iso without force parameter overwrites the existing image
Reproducibility
100% reproducible
System Configuration
DC
Load info (eg: 2022-03-
SW_VERSION="22.12"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID=
Last Pass
build from Nov, 30th
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
assignee: | nobody → Kyle MacLeod (kmacleod) |
importance: | Undecided → Medium |
tags: | added: stx.me |
tags: |
added: stx.9.0 stx.metal removed: stx.me |
Reviewed: https:/ /review. opendev. org/c/starlingx /metal/ +/883734 /opendev. org/starlingx/ metal/commit/ d807f6b65e68905 5f1328fd56c0d3d aca0cc603e
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d807f6b65e68905 5f1328fd56c0d3d aca0cc603e
Author: Kyle MacLeod <email address hidden>
Date: Fri May 19 21:24:45 2023 -0400
Fix prestage ISO install abort if previous subcloud install exists
This commit fixes the detection of www/pages/ feed/rel- xx.x/install_ uuid vg/var- lv'. There was a bug which was always
via device '/dev/cgts-
mounting the same device, rather than the proper device_list.
The code is also slightly refactored for simplification and clarity.
Test Plan
installation exists or not
PASS:
- Generate ISO using gen-prestage-iso.sh without --force-install option
- Verify installation failure (drop to boot prompt) if previous
subcloud installation exists
- Verify successful subcloud installation if no previous
subcloud installation exists
- Generate ISO using gen-prestage-iso.sh with --force-install option
- Verify successful installation regardless if previous subcloud
Closes-Bug: 2020526 fa29d365da7813b 226c4ef310b
Change-Id: Ib83d72fa07335f
Signed-off-by: Kyle MacLeod <email address hidden>