balena-os / balenahup

BALENA Host os UPdater
https://balena.io/
36 stars 11 forks source link

HUP fails but partition swap happens anyway #376

Open alexgg opened 2 years ago

alexgg commented 2 years ago

A HUP log shows:

Status: Downloaded newer image for registry2.balena-cloud.com/v2/2bafd1e35fd27f7d810e35cfca2da7e5@sha256:12ba3f1df211b298f04e5263db9adbbba5660b
b57f940ecf8716473706916a13
registry2.balena-cloud.com/v2/2bafd1e35fd27f7d810e35cfca2da7e5@sha256:12ba3f1df211b298f04e5263db9adbbba5660bb57f940ecf8716473706916a13
Before hooks (old os) ran successfully
[INFO] Checking if boot partition can accommodate the new update... success.
[INFO] Updating timestamps for all files in /mnt/boot... done
[INFO] Deploying /mnt/boot/bcm2709-rpi-2-b.dtb...Failed to run the new hooks. Running current hooks... 

And then in the rollback:

[INFO] Running rollback hook 
[INFO] Switching uboot root partition index to 2...... done.
Update failed.

The partition switch should not happen if the update failed.

The complete log file is:

================upgrade-2.x.sh HEADER START====================
Thu Oct 20 00:07:52 UTC 2022
[000000000][LOG]Raw target version: 2.101.7+rev2
[000000003][LOG]Loading info from config.json
[000000005][LOG]Target version supports hostapps, no device type support check required.
[000000005][LOG]Target OS version "2.101.7+rev2" OK.
[000000005][LOG]OS variant: 2.58.3
[000000005][LOG]Host OS version "2.58.3+rev1" OK.
[000000009][LOG]Attempting host OS update using deltas
[000000012][LOG]No delta found, falling back to regular pull
[000000012][LOG]No resin-device-progress fix is required...
[000000012][LOG]No supervisor updater fix is required...
[000000012][LOG]hostapp-update command exists, use that for update
[000000023][LOG]Image type delta, location '' failed or not found, trying another source
[000000023][WARNING]Removing /mnt/boot/FSCK0000.REC from boot partition
[000000023][WARNING]Removing /mnt/boot/FSCK0001.REC from boot partition
[000000023][LOG]No device-specific pre-update fix for fincm3
[000000023][LOG]Starting hostapp-update
sha256:12ba3f1df211b298f04e5263db9adbbba5660bb57f940ecf8716473706916a13: Pulling from v2/2bafd1e35fd27f7d810e35cfca2da7e5
6473c4398f76: Pulling fs layer
6473c4398f76: Ready to download
6473c4398f76: Pull complete
Digest: sha256:12ba3f1df211b298f04e5263db9adbbba5660bb57f940ecf8716473706916a13
Status: Downloaded newer image for registry2.balena-cloud.com/v2/2bafd1e35fd27f7d810e35cfca2da7e5@sha256:12ba3f1df211b298f04e5263db9adbbba5660b
b57f940ecf8716473706916a13
registry2.balena-cloud.com/v2/2bafd1e35fd27f7d810e35cfca2da7e5@sha256:12ba3f1df211b298f04e5263db9adbbba5660bb57f940ecf8716473706916a13
Before hooks (old os) ran successfully
[INFO] Checking if boot partition can accommodate the new update... success.
[INFO] Updating timestamps for all files in /mnt/boot... done
[INFO] Deploying /mnt/boot/bcm2709-rpi-2-b.dtb...Failed to run the new hooks. Running current hooks... 
[INFO] Checking if boot partition can accommodate the new update... success.
[INFO] Deploying /mnt/boot/system-connections/README.ignore... done.
[INFO] Deploying /mnt/boot/system-connections/resin-sample.ignore... done.
[INFO] Deploying /mnt/boot/bcm2835-bootfiles-20200601+arm64.stamp... done.
[INFO] Deploying /mnt/boot/kernel7.img... done.
[INFO] Deploying /mnt/boot/splash/balena-logo.png...file blacklisted. Ignoring.
[INFO] Deploying /mnt/boot/start_cd.elf... done.
[INFO] Deploying /mnt/boot/extra_uEnv.txt...file blacklisted. Ignoring.
[INFO] Deploying /mnt/boot/os-release... done.
[INFO] Deploying /mnt/boot/device-type.json... done.
[INFO] Deploying /mnt/boot/bcm2708-rpi-b-plus.dtb... done.
[INFO] Deploying /mnt/boot/cmdline.txt... done.
[INFO] Deploying /mnt/boot/fixup_x.dat... done.
[INFO] Deploying /mnt/boot/start.elf... done.
[INFO] Deploying /mnt/boot/image-version-info... done.
[INFO] Deploying /mnt/boot/resin-image... done.
[INFO] Deploying /mnt/boot/config.txt...file blacklisted. Ignoring.
[INFO] Deploying /mnt/boot/bcm2710-rpi-3-b.dtb... done.
[INFO] Deploying /mnt/boot/fixup.dat... done.
[INFO] Deploying /mnt/boot/boot.scr... done.
[INFO] Deploying /mnt/boot/fixup_cd.dat... done.
[INFO] Deploying /mnt/boot/dt-blob.bin... done.
[INFO] Deploying /mnt/boot/start_x.elf... done.
[INFO] Deploying /mnt/boot/bcm2708-rpi-b.dtb... done.
[INFO] Deploying /mnt/boot/bcm2708-rpi-cm.dtb... done.
[INFO] Deploying /mnt/boot/bootcode.bin... done.
[INFO] Deploying /mnt/boot/config.json...file blacklisted. Ignoring.
[INFO] Deploying /mnt/boot/bcm2709-rpi-2-b.dtb... overwriting modified file... done.
[INFO] Deploying /mnt/boot/bcm2711-rpi-4-b.dtb... done.
[INFO] Deploying /mnt/boot/bcm2710-rpi-3-b-plus.dtb... done.
[INFO] Deploying /mnt/boot/overlays/iqaudio-digi-wm8804-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rra-digidac1-wm8741-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hifiberry-digi-pro.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rotary-encoder.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dionaudio-loco-v2.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c0-bcm2708.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/tpm-slb9670.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/uart0.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-dac.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi0-hw-cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-mux.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/enc28j60-spi2.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pitft22.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/smi-dev.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi2-3cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dionaudio-loco.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/midi-uart1.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-poe.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/gpio-poweroff.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mcp23s17.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pwm-2chan.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pitft28-resistive.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-gpio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/adau7002-simple.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c0.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/gpio-shutdown.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/mmc.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/allo-boss-dac-pcm512x-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi2-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-display.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2s-gpio28-31.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-bcm2708.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/balena-fin.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-proto.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi3-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/adau1977-adc.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hifiberry-amp.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/vc4-fkms-v3d.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/gpio-key.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-pwm-pca9685a.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/audioinjector-addons.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mcp2515-can0.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/wittypi.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-backlight.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dwc2.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/piscreen2r.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/ads7846.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/vga666.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi3-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/audioinjector-wm8731-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/gpio-ir.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mz61581.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/sdio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c1.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/piscreen.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/dwc-otg.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/waveshare-sim7600.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi5-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/enc28j60.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hy28a.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/w1-gpio-pullup.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/smi-nand.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hy28b.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/tinylcd35.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/uart5.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/qca7000.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/smi.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hifiberry-dacplus.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/uart3.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hyperpixel4-square-pi3.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pitft35-resistive.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c1-bcm2708.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/sc16is750-i2c.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi0-cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/sdtweak.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi1-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dht11.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hyperpixel4-pi3.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/uart2.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/allo-piano-dac-plus-pcm512x-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/midi-uart0.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi-gpio35-39.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pitft28-capacitive.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/sdhost.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/iqaudio-dacplus.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dpi18.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/googlevoicehat-soundcard.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hyperpixel4-pi4.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/akkordion-iqdacplus.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/justboom-digi.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi4-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi5-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/ads1015.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/fe-pi-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi1-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/sc16is752-spi1.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi6-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/uart4.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi-rtc.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/dpi24.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/allo-piano-dac-pcm512x-audio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/iqaudio-dac.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-cirrus-wm5102.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/papirus.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hifiberry-dac.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pi3-disable-wifi.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi2-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/justboom-dac.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mcp23017.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/gpio-ir-tx.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/allo-digione.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pi3-act-led.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-tv.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/bmp085_i2c-sensor.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/ads1115.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/rpi-ft5406.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/spyfly.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/hyperpixel4-square-pi4.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mcp3008.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/vc4-kms-v3d.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/i2c-rtc.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/spi4-2cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mcp2515-can1.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/audremap.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/hifiberry-digi.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pi3-miniuart-bt.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/mpu6050.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi6-1cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pwm.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pi3-disable-bt.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/w1-gpio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-rtc-gpio.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/uart1.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/goodix.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/i2c-sensor.dtbo... overwriting modified file... done.
[INFO] Deploying /mnt/boot/overlays/rpi-sense.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/spi1-3cs.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pps-gpio.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/at86rf233.dtbo... done.
[INFO] Deploying /mnt/boot/overlays/pisound.dtbo... done.
[INFO] Deploying /mnt/boot/bcm2710-rpi-cm3.dtb... done.
[INFO] Deploying /mnt/boot/bcm2708-rpi-zero-w.dtb... done.
[INFO] Deploying /mnt/boot/resinos.fingerprint... overwriting modified file... done.
[INFO] Running rollback hook 
[INFO] Switching uboot root partition index to 2...... done.
Update failed.
[000001227][LOG]Image type balena_registry, location 'registry2.balena-cloud.com/v2/2bafd1e35fd27f7d810e35cfca2da7e5@sha256:12ba3f1df211b298f04
e5263db9adbbba5660bb57f940ecf8716473706916a13' failed or not found, trying another source
jellyfish-bot commented 2 years ago

[alexgg] This has attached https://jel.ly.fish/338426da-446b-41a0-b731-66139e443b91