Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport #933 and #938 to 0.21.2 #937

Merged
merged 4 commits into from
Dec 7, 2021
Merged

Backport #933 and #938 to 0.21.2 #937

merged 4 commits into from
Dec 7, 2021

Conversation

mudler
Copy link
Contributor

@mudler mudler commented Dec 7, 2021

This is a multi-fold PR:

cc @johnliu55tw @bk201

Signed-off-by: Ettore Di Giacinto edigiacinto@suse.com

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Fixes #938

Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
Signed-off-by: Ettore Di Giacinto <edigiacinto@suse.com>
@mudler
Copy link
Contributor Author

mudler commented Dec 7, 2021

Backport only tests #943

fi
}

installer_cleanup2()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a bit more descriptive name here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not really new code here, I'd try to keep the changes stick to the patch backport, or we might introduce new bugs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the real diff between the two cos.sh:

--- packages/installer/cos.sh   2021-12-07 15:27:19.112633623 +0100
+++ cos.sh      2021-12-07 15:29:08.209264737 +0100
@@ -198,6 +198,12 @@ prepare_passive() {
 
 part_probe() {
     local dev=$1
+
+    # Don't require udevadm necessarly, but run it best-effort
+    if hash udevadm 2>/dev/null; then
+        udevadm settle
+    fi
+
     partprobe ${dev} 2>/dev/null || true
 
     sync
@@ -240,8 +246,11 @@ do_format()
         if [ "$BOOTFLAG" == "esp" ]; then
             parted -s ${DEVICE} mkpart primary fat32 0% 50MB # efi
             parted -s ${DEVICE} set 1 ${BOOTFLAG} on
+
+            part_probe $DEVICE
+
             PREFIX=${DEVICE}
-            if [ ! -e ${PREFIX}${STATE_NUM} ]; then
+            if [ ! -e ${PREFIX}1 ]; then
                 PREFIX=${DEVICE}p
             fi
             BOOT=${PREFIX}1
@@ -250,6 +259,7 @@ do_format()
         elif [ "$BOOTFLAG" == "bios_grub" ]; then
             parted -s ${DEVICE} mkpart primary 0% 1MB # BIOS boot partition for GRUB
             parted -s ${DEVICE} set 1 ${BOOTFLAG} on
+            part_probe $DEVICE
         fi
 
         yip -s partitioning $COS_PARTITION_LAYOUT

Copy link
Contributor

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, we doing backports now? How deep is that rabbit hole...

@mudler mudler linked an issue Dec 7, 2021 that may be closed by this pull request
@mudler mudler linked an issue Dec 7, 2021 that may be closed by this pull request
@mudler mudler changed the title Backport #933 to 0.21.2 Backport #933 and #938 to 0.21.2 Dec 7, 2021
@mudler
Copy link
Contributor Author

mudler commented Dec 7, 2021

Basic installation tests seems to pass in #943, altought the full suite can't run as it was created afterwards, and is already testing features that aren't in 0.21.x. Merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants