[Spce-user] Upgrade from 7.5.4 to 8.5.4 fails on grub

Alex Lutay alutay at sipwise.com
Wed May 12 02:26:05 EDT 2021


Hi Alexander,

Thank you for pointing. Reported internally as TT#122036.

Due to the long list of possible CE disks configurations, we are
still facing unknown for us grub upgrade cases.
We will expand our autotests with your case.
JFYI, commercial installations have strict and known partitioning
schema as a result fully covered with nightly autotests.

Using this opportunity I would like to pre-announce mr9.5 LTS
which will be bullseye-based (Sipwise trunk has been migrated already) 
and will use the second "/ngcp-fallback" partition for
the upgrade (like Android A/B upgrade mode):
https://source.android.com/devices/tech/ota/ab/

Community, please raise your voice if you would like to
participate with alpha/beta testing here to improve it and
adopt for your needs (if necessary).

Thank you for being part of Sipwise community!

On 5/12/21 12:40 AM, [ EXT ] Alexander Griesser wrote:
> Hey there,
> 
> I stumbled upon this problem with the grub updater today too, here are 
> my findings + a potential fix (upgrading from 8.5.2 to 8.5.4 in that 
> case) for a slightly different edge case.
> 
> For reasons only known to the person who did that in the past, we’re 
> currently having two physical volumes in the volumegroup ngcp:
> 
> root at spce:~# pvs
> 
>    PV         VG   Fmt  Attr PSize    PFree
> 
>    /dev/sdb1  ngcp lvm2 a--  <128.00g     0
> 
>    /dev/sdb2  ngcp lvm2 a--   <12.00g <2.00g
> 
> This causes the script 
> /usr/share/ngcp-upgrade/steps/mr7.5/run_grub_install to fail after the 
> upgrade from 8.5.2 to 8.5.4 with the following error message:
> 
> 2021-05-11 23:29:34: [38/63] 'spce' Running: 
> /usr/share/ngcp-upgrade/steps/mr7.5/run_grub_install
> 
> Debconf configuration install_devices for grub-pc currently set to 
> '/dev/sda,/dev/sdb'.
> 
> Debconf configuration install_devices_disks_changed for grub-pc seems to 
> be unset.
> 
> NGCP system running with LVM detected.
> 
> Unknown device "/dev/sdb1
> 
> /dev/sdb2": No such file or directory
> 
> ERROR: the step 'mr7.5/run_grub_install' failed, upgrade aborted!
> 
> Please fix the root of the issue and restart 'ngcp-upgrade'
> 
> (see error details in log file 
> /var/log/ngcp-upgrade-mr8.5.4-1620768567-failed-38-of-63.log ).
> 
> The script assumes, that only one physical volume is present when 
> running the following part in the script:
> 
> ++ pvs --noheadings --separator :
> 
> ++ awk -F: '/:ngcp:/ {print $1}'
> 
> ++ tr -d ' '
> 
> + BOOT_DISK='/dev/sdb1
> 
> /dev/sdb2'
> 
> I did quickfix that for our installation like that:
> 
> /--- /usr/share/ngcp-upgrade/steps/mr7.5/run_grub_install.orig   
> 2021-05-11 23:47:41.144053246 +0200/
> 
> /+++ /usr/share/ngcp-upgrade/steps/mr7.5/run_grub_install        
> 2021-05-11 23:46:32.252057533 +0200/
> 
> *@@ -41,7 +41,7 @@*
> 
> if grep -q 'root=/dev/mapper/ngcp-root' /proc/cmdline ; then
> 
>     echo "NGCP system running with LVM detected."
> 
>     LVM=true
> 
> -  BOOT_DISK="$(pvs --noheadings --separator : | awk -F: '/:ngcp:/ 
> {print $1}' | tr -d ' ')" # e.g. "/dev/sda1"
> 
> +  BOOT_DISK="$(pvs --noheadings --separator : | awk -F: '/:ngcp:/ 
> {print $1}' | tr -d ' ' | head -1)" # e.g. "/dev/sda1"
> 
>     PART_INFO="$(udevadm info -n "${BOOT_DISK}" -q path)" # e.g. 
> "/devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sda/sda1"
> 
>     DISK="${PART_INFO%/*}"                                # e.g. 
> "/devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sda"
> 
>     GRUB_DISK="/dev/${DISK##*/}"                          # e.g. "/dev/sda"
> 
> It’s not pretty, but I think it’s safe to assume that we’re looking for 
> the disk on which the first PV resides to install the bootloader, so 
> there shouldn’t be any situation where this fix would cause problems AFAICS.
> 
> Best,
> *Alexander Griesser*
> Head of Systems Operations
> ANEXIA Internetdienstleistungs GmbH
> 
> E-Mail: AGriesser at anexia-it.com <mailto:AGriesser at anexia-it.com>
> Web: http://www.anexia-it.com <http://www.anexia-it.com/>
> Anschrift Hauptsitz Klagenfurt: Feldkirchnerstraße 140, 9020 Klagenfurt
> Geschäftsführer: Alexander Windbichler
> Firmenbuch: FN 289918a | Gerichtsstand: Klagenfurt | UID-Nummer: AT 
> U63216601

-- 
Alex Lutay
Vice President Development
Sipwise GmbH | an ALE Company
Europaring F15 | 2345 Brunn am Gebirge

Office: +43 1 30120436
Email: alutay at sipwise.com
Website: https://www.sipwise.com

Particulars according Austrian Companies Code paragraph 14
"Sipwise GmbH“ - Europaring F15 – 2345 Brunn am Gebirge
FN:305595f, Commercial Court Wr. Neustadt, ATU64002206




More information about the Spce-user mailing list