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

Bug Report: Restart docker should be after sed in "/etc/systemd/system/hassio-supervisor.service" #309

Closed
3 tasks done
WMP opened this issue Jul 3, 2023 · 1 comment
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@WMP
Copy link

WMP commented Jul 3, 2023

OS Version

Ubuntu 20.04

System Information

Linux ha 5.4.0-146-generic #163-Ubuntu SMP Fri Mar 17 18:26:02 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

What happened?

I want to upgrade ha-supervisor:

root@ha:~# dpkg -l | grep supervi
ii  homeassistant-supervised            1.2.2                             all          Home Assistant Supervised
root@ha:~# BYPASS_OS_CHECK=true dpkg -i --ignore-depends=systemd-resolved homeassistant-supervised.deb.1 
(Reading database ... 65006 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb.1 ...
[warn] 
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn] 
[warn] Bypassing OS check...
[warn] Ubuntu 20.04 LTS is not supported!
[warn] Please DO NOT report issues regarding this OS!
[warn] ModemManager service is enabled. This might cause issue when using serial devices.
Leaving 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Leaving 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Leaving 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Leaving 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.5.0) over (1.2.2) ...
Setting up homeassistant-supervised (1.5.0) ...
[info] Restarting NetworkManager
[info] Set up systemd-journal-gatewayd socket file
[info] Enable systemd-journal-gatewayd
[info] Restarting docker service
Failed to restart docker.service: Unit hassio-supervisor.service has a bad unit file setting.
See system logs and 'systemctl status docker.service' for details.
dpkg: error processing package homeassistant-supervised (--install):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised
root@ha:~# systemctl status docker.service
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2023-07-03 16:16:03 CEST; 1min 17s ago
[cut here]
Jul 03 16:17:31 ha 665cfaa322da[1424576]: 23-07-03 16:17:31 INFO (MainThread) [supervisor.store.git] Loading add-on /data/addons/git/3e533915 repository
root@ha:~# dpkg -l | grep supervi
iF  homeassistant-supervised            1.5.0                             all          Home Assistant Supervised
root@ha:~# systemctl  status hassio-supervisor.service
● hassio-supervisor.service - Hass.io supervisor
     Loaded: bad-setting (Reason: Unit hassio-supervisor.service has a bad unit file setting.)
     Active: active (running) since Mon 2023-07-03 16:16:03 CEST; 2min 56s ago
   Main PID: 1425250 (docker)
     CGroup: /system.slice/hassio-supervisor.service
             └─1425250 docker container wait hassio_supervisor

Jul 03 16:16:03 ha systemd[1]: Starting Hass.io supervisor...
Jul 03 16:16:03 ha docker[1425234]: hassio_supervisor
Jul 03 16:16:03 ha systemd[1]: Started Hass.io supervisor.
Jul 03 16:16:03 ha hassio-supervisor[1425250]: [INFO] Starting the Supervisor...
Jul 03 16:16:06 ha hassio-supervisor[1425282]: hassio_supervisor
Jul 03 16:17:04 ha systemd[1]: /etc/systemd/system/hassio-supervisor.service:15: Executable "%BINARY_DOCKER%" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", ignoring
Jul 03 16:17:04 ha systemd[1]: /etc/systemd/system/hassio-supervisor.service:16: Executable "%BINARY_HASSIO%" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Jul 03 16:17:04 ha systemd[1]: hassio-supervisor.service: Unit configuration has fatal error, unit will not be started.
Jul 03 16:17:04 ha systemd[1]: hassio-supervisor.service: Current command vanished from the unit file, execution of the command list won't be resumed.
root@ha:~#

I have errors:

etc/systemd/system/hassio-supervisor.service:15: Executable "%BINARY_DOCKER%" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", ignoring
Jul 03 16:17:04 ha systemd[1]: /etc/systemd/system/hassio-supervisor.service:16: Executable "%BINARY_HASSIO%" not found in path "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

because sed in https://github.com/home-assistant/supervised-installer/blob/main/homeassistant-supervised/DEBIAN/postinst#L123 dont run, becaouse postinst has been stoped on https://github.com/home-assistant/supervised-installer/blob/main/homeassistant-supervised/DEBIAN/postinst#L51 . If you move sed before restart docker, all should be good.

Machine Type

generic-x86-64

Installer output

No response

Relevant log output

No response

ADR

  • I have read through the ADR and have confirmed that my system is compliant with the requirements
  • I understand that if my system is found to not be compliant, my issue will be closed immediately without further investigation

Code of Conduct

@WMP WMP added the bug Something isn't working label Jul 3, 2023
@ikifar2012
Copy link
Member

Have you tested this on Debian, seems to be an issue on ubuntu which is not supported, I cannot recreate on Debian. Therefore, I will close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants