Home Assistant Supervisor issue?

Hi there,

The Pi4/4GB that runs HA just sits there 24/7/365 just doing its stuff and all I do is keep the Raspbian Buster OS up to date along with HA Core etc. but I haven’t done this in a while so currently running HA 2022.4 and see I have 116 updates for Buster if I type sudo apt update at the command line.

So I went to update the OS first but it bombed out with the error;

dpkg: unrecoverable fatal error, aborting:
unable to fsync updated status of ‘openjdk-11-jre-headless:armhf’: Structure needs cleaning
E: Sub-process /usr/bin/dpkg returned an error code (2)

Well that was a first for me as I have 5 Pi’s here and never had an issue updating any of them before. In fact I updated 3 of them earlier all with the same 116 updates with no issues.

So I tried the sudo apt full-upgrade again but got the message;

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a to…

So I did as I was told but got the message;

dpkg error: error creating new backup file ‘/var/lib/dpkg/ststus-old’:File e…

At this point I thought I’d take a look at the HA interface and noticed a couple of Unhealthy messages one pertaining to Supervisor not loaded.

No worries I thought I’ll just update HA Core & Supervisor but both of these failed.

Still not worried at this point as I always have an SDHC card cloned from the system before I do big upgrades so I just swapped this card in.

To my surprise I still had the Supervisor Unhealthy message so guessing this has been like this for a while and I just hadn’t noticed.

Looking at the HA installation from my backup card it is showing HA 2021.12.3 and a quick sudo apt update shows 140 packages can be upgraded so this backup is a little behind the current.

I have searched Google and also on here and see a 117 post thread about Supervisor issues and the general consensus seemed to be that a reinstall of Docker might cure this particular issue with Supervisor not loading?

On this backup card the version of Docker is showing as 20.10.12

So after all that background my question is this;

How best to repair my system?

Should I update Raspbian Buster using sudo apt full-upgrade or go straight to the Docker solution using sudo apt-get install docker-ce docker-ce-cli containerd.io -y and concentrate on getting HA back up & running? I am assuming if the full-upgrade completed without errors this time it should update Docker as matter of course?

Or should I update HA Core from this old 2021.12.3 to its recommended 2012.12.7 before I assume updating to 2022.7.5?

Or are there any other steps I should take?

Really appreciate the advice on how best to proceed as Its been a while since I’ve got my hands dirty on any of my Pi’s and at my age I seem to have forgotten more than I ever learned! :stuck_out_tongue_winking_eye:

Thanks & kind regards,
-=Glyn=-

Well I seem to have answered my own question and it was all worry for nothing! :blush:

I cloned the cloned card before I done anything else as a belt & braces approach incase anything went seriously wrong and just decided to do the full Buster OS upgrade of sudo apt update followed by sudo apt full-upgrade and this time it steamed ahead with no issues whatsoever. Phew!

So a quick reboot and I turned my attention to HA and after an agonisingly long wait (probably not but it seemed like it) I was finally able to logon where it now shows the latest Supervisor loaded as 2022.07 and my current 2021-12.03 Core as being able to update to 2022.7.5 which is what I am going to do right now as I have already read the Breaking Changes section and also see a couple of nice additional features that I might benefit from. :+1:

Sorry for the long previous post but I always overthink these things and worry about what could go wrong only to find it usually doesn’t. But like a good Boy Scout I like to be prepared! :grin:

Then after that I just need to pluck up the courage to update Pi number 5 which is my Virtual Radar box feeding FA, FR24, RB24 & ADSB-X but not before I post in the FA ADSB Forum for a sanity check first much like I did here… :crazy_face:

Thanks for listening.

-=Glyn=-

PS. Well the update to HA 2022.7 went well and I also updated the Check HA Config (although it states it is depracated) Mosquitto & Node-RED and all appears to be working as expected.

Problem now is as I have rekindled my interest in HA I will be drawn to those long outstanding Integrations that take more than 10 seconds to load at boot such as Synology DSM, Wireless Sensor Tags, Nanoleaf, Pi-hole, Tile etc or never seemed to work as expected such as Davis, Neato, Nest, NUT, Smappee etc, so expect some more posts from me before long…