So I’m running Proxmox on a little AMD Ryzen-based NUC now, and it’s awesome! I can run an amazing array of services on this teeny little box, and it handles it all like a champ. One of the things I’m running is Portainer to manager a bunch of Docker containers. And this is where our story for today begins…
I am running Homeassistant as a Docker container (the linuxserver.io version – they’re awesome, check them out if you haven’t yet) inside of the Portainer VM that runs on the Proxmox (it’s turtles all the way down). The Portainer host had 32GB of disk assigned to it (I only have a 1TB NVMe SSD in this NUC, and only 500GB are assigned to Proxmox at the moment since there is still an old Windows partition that I haven’t bothered to get rid of yet – yeah. yeah, long story, home lab, tinkering with stuff, not everything is completely up to snuff, get off my back! ;] ). This was working fine… *insert dramatic flourish here* However, I’m also running Grafana on this Portainer instance, and wouldn’t you know it, it managed to fill up this 32GB. I know, so surprising, right?
Unfortunately I didn’t think to monitor free disk space (an oversight I plan to correct now), so I happily went and updated my Homeassistant image when I got a notification from DIUN that a new version was available. OK, so far, so good. But when Homeassistant tried to start up again, it failed to come up, and this is what greeted me in the logs:
2022-01-19 08:51:57 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
File "/usr/bin/hass", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3.9/site-packages/homeassistant/__main__.py", line 318, in main
exit_code = runner.run(runtime_conf)
File "/usr/lib/python3.9/site-packages/homeassistant/runner.py", line 121, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/lib/python3.9/site-packages/homeassistant/runner.py", line 103, in setup_and_run_hass
hass = await bootstrap.async_setup_hass(runtime_config)
File "/usr/lib/python3.9/site-packages/homeassistant/bootstrap.py", line 117, in async_setup_hass
await hass.async_add_executor_job(conf_util.process_ha_config_upgrade, hass)
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.9/site-packages/homeassistant/config.py", line 416, in process_ha_config_upgrade
if version_obj < AwesomeVersion("0.50"):
File "/usr/lib/python3.9/site-packages/awesomeversion/awesomeversion.py", line 139, in __lt__
raise AwesomeVersionCompareException(
awesomeversion.exceptions.AwesomeVersionCompareException: Can't compare unknown and SimpleVer
Ugh! What now? Well, I went checking around and luckily saw pretty quickly that I was out of disk space on the Portainer host. That’ll have to get fixed first, of course. Thankfully Proxmox has an awesome doc on resizing disks, so I followed those instructions and that got me to 100GB of usable space on the Portainer host (be careful with your partition IDs, you don’t want to go messing with the wrong ones).
Yay! So I go to restart Homeassistant… *whomp, whomp* still the same error. Bugger! Now what!?
Well, long story short, after a bunch of googling and finally bringing up a second instance of Homeassistant in Portainer and diffing the config directories (that thankfully I had mounted as volumes per the Linuxserver folks’ instructions so I could simply cd
into the config
volume on the Portainer host and run diff home_assistant home_assistant_test
– told you they were awesome! ;] ), I found that my main Homesassitant configs were missing a .HA_VERSION
file. Huh! Well, since it only contains the version ID (looks promising based on that error message), I copied that from my test install to my main Homeassistant directory, and wouldn’t you know it, it started right up! Yay!
Lesson learned: monitor your free disk space and make sure you get alerts before that runs out! ;]