foreign-sub / ha_fbx

Home assistant VM image for Freebox Delta (arm64)
GNU General Public License v3.0
23 stars 7 forks source link

Cloud init not working with/out HACS enabled #6

Closed molotovah closed 2 years ago

molotovah commented 2 years ago

Describe the bug The VM is not working even after rebooting.

To Reproduce I tried the following versions :

  1. 2021.10.6
  2. 2021.9.7
  3. 2021.7.3

Also with and without hacs

Screenshots image

Additional context My cloud-init file : image

molotovah commented 2 years ago

Latest version still failing

Outpout of /var/log/cloud-init-output.log

ha@hafbx:~$ sudo cat /var/log/cloud-init-output.log
Cloud-init v. 20.4.1 running 'init-local' at Sat, 27 Nov 2021 11:49:33 +0000. Up 6.03 seconds.
Cloud-init v. 20.4.1 running 'init' at Sat, 27 Nov 2021 11:49:38 +0000. Up 10.68 seconds.
ci-info: +++++++++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++++++++
ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
ci-info: | Device |  Up  |                 Address                  |      Mask     | Scope  |     Hw-Address    |
ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
ci-info: | enp0s3 | True |               192.168.*.**               | 255.255.255.0 | global | 1e:a0:1f:**:**:** |
ci-info: | enp0s3 | True | ****:e0a:***:****:****:****:****:e5d4/64 |       .       | global | 1e:a0:1f:**:**:** |
ci-info: | enp0s3 | True |       ****::****:****:****:****/64       |       .       |  link  | 1e:a0:1f:**:**:** |
ci-info: |   lo   | True |                127.0.0.1                 |   255.0.0.0   |  host  |         .         |
ci-info: |   lo   | True |                 ::1/128                  |       .       |  host  |         .         |
ci-info: +--------+------+------------------------------------------+---------------+--------+-------------------+
ci-info: ++++++++++++++++++++++++++++++Route IPv4 info++++++++++++++++++++++++++++++
ci-info: +-------+-------------+---------------+---------------+-----------+-------+
ci-info: | Route | Destination |    Gateway    |    Genmask    | Interface | Flags |
ci-info: +-------+-------------+---------------+---------------+-----------+-------+
ci-info: |   0   |   0.0.0.0   | 192.168.1.254 |    0.0.0.0    |   enp0s3  |   UG  |
ci-info: |   1   | 192.168.1.0 |    0.0.0.0    | 255.255.255.0 |   enp0s3  |   U   |
ci-info: +-------+-------------+---------------+---------------+-----------+-------+
ci-info: +++++++++++++++++++++++++++++++++Route IPv6 info++++++++++++++++++++++++++++++++++
ci-info: +-------+------------------------+---------------------------+-----------+-------+
ci-info: | Route |      Destination       |          Gateway          | Interface | Flags |
ci-info: +-------+------------------------+---------------------------+-----------+-------+
ci-info: |   1   | 2a01:e0a:***:****::/64 |             ::            |   enp0s3  |   Ue  |
ci-info: |   2   |       fe80::/64        |             ::            |   enp0s3  |   U   |
ci-info: |   3   |          ::/0          | ****::****:****:****:**** |   enp0s3  |  UGe  |
ci-info: |   5   |         local          |             ::            |   enp0s3  |   U   |
ci-info: |   6   |       multicast        |             ::            |   enp0s3  |   U   |
ci-info: +-------+------------------------+---------------------------+-----------+-------+
Generating public/private rsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_rsa_key
Your public key has been saved in /etc/ssh/ssh_host_rsa_key.pub
The key fingerprint is:
SHA256:********************************************** root@hafbx
The key's randomart image is:
+---[RSA 3072]----+
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
+----[SHA256]-----+
Generating public/private dsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_dsa_key
Your public key has been saved in /etc/ssh/ssh_host_dsa_key.pub
The key fingerprint is:
SHA256:********************************************** root@hafbx
The key's randomart image is:
+---[DSA 1024]----+
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
+----[SHA256]-----+
Generating public/private ecdsa key pair.
Your identification has been saved in /etc/ssh/ssh_host_ecdsa_key
Your public key has been saved in /etc/ssh/ssh_host_ecdsa_key.pub
The key fingerprint is:
SHA256:********************************************** root@hafbx
The key's randomart image is:
+---[ECDSA 256]---+
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
+----[SHA256]-----+
Generating public/private ed25519 key pair.
Your identification has been saved in /etc/ssh/ssh_host_ed25519_key
Your public key has been saved in /etc/ssh/ssh_host_ed25519_key.pub
The key fingerprint is:
SHA256:********************************************** root@hafbx
The key's randomart image is:
+--[ED25519 256]--+
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
+----[SHA256]-----+
Cloud-init v. 20.4.1 running 'modules:config' at Sat, 27 Nov 2021 11:49:42 +0000. Up 14.92 seconds.
Cloud-init v. 20.4.1 running 'modules:final' at Sat, 27 Nov 2021 11:49:44 +0000. Up 17.06 seconds.
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]
Get:4 http://deb.debian.org/debian bullseye-backports InRelease [43.7 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main Sources [68.4 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main arm64 Packages [94.6 kB]
Get:7 http://security.debian.org/debian-security bullseye-security/main Translation-en [60.1 kB]
Get:8 http://deb.debian.org/debian bullseye/main Sources [8617 kB]
Get:9 http://deb.debian.org/debian bullseye/main arm64 Packages [8068 kB]
Get:10 http://deb.debian.org/debian bullseye/main Translation-en [6241 kB]
Get:11 http://deb.debian.org/debian bullseye-updates/main Sources [1868 B]
Get:12 http://deb.debian.org/debian bullseye-updates/main arm64 Packages [2600 B]
Get:13 http://deb.debian.org/debian bullseye-updates/main Translation-en [2343 B]
Get:14 http://deb.debian.org/debian bullseye-backports/main Sources [119 kB]
Get:15 http://deb.debian.org/debian bullseye-backports/main arm64 Packages [138 kB]
Get:16 http://deb.debian.org/debian bullseye-backports/main Translation-en [102 kB]
Fetched 23.8 MB in 7s (3391 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  ieee-data python3-argcomplete python3-dnspython python3-jmespath
  python3-kerberos python3-libcloud python3-lockfile python3-netaddr
  python3-ntlm-auth python3-packaging python3-pycryptodome python3-pyparsing
  python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt
  python3-selinux python3-simplejson python3-winrm python3-xmltodict
Suggested packages:
  cowsay sshpass python3-sniffio python3-trio python-lockfile-doc ipython3
  python-netaddr-docs python-pyparsing-doc
The following NEW packages will be installed:
  ansible ieee-data python3-argcomplete python3-dnspython python3-jmespath
  python3-kerberos python3-libcloud python3-lockfile python3-netaddr
  python3-ntlm-auth python3-packaging python3-pycryptodome python3-pyparsing
  python3-requests-kerberos python3-requests-ntlm python3-requests-toolbelt
  python3-selinux python3-simplejson python3-winrm python3-xmltodict
0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
Need to get 32.0 MB of archives.
After this operation, 275 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 python3-pyparsing all 2.4.7-1 [109 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 python3-packaging all 20.9-2 [33.5 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 python3-pycryptodome arm64 3.9.7+dfsg1-1+b2 [9895 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 python3-dnspython all 2.0.0-1 [103 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 ieee-data all 20210605.1 [1889 kB]
Get:6 http://deb.debian.org/debian bullseye/main arm64 python3-netaddr all 0.7.19-5 [253 kB]
Get:7 http://deb.debian.org/debian bullseye/main arm64 ansible all 2.10.7+merged+base+2.10.8+dfsg-1 [17.7 MB]
Get:8 http://deb.debian.org/debian bullseye/main arm64 python3-argcomplete all 1.8.1-1.5 [29.7 kB]
Get:9 http://deb.debian.org/debian bullseye/main arm64 python3-jmespath all 0.10.0-1 [21.7 kB]
Get:10 http://deb.debian.org/debian bullseye/main arm64 python3-kerberos arm64 1.1.14-3.1+b3 [23.6 kB]
Get:11 http://deb.debian.org/debian bullseye/main arm64 python3-lockfile all 1:0.12.2-2.2 [17.3 kB]
Get:12 http://deb.debian.org/debian bullseye/main arm64 python3-simplejson arm64 3.17.2-1 [60.6 kB]
Get:13 http://deb.debian.org/debian bullseye/main arm64 python3-libcloud all 3.2.0-2 [1615 kB]
Get:14 http://deb.debian.org/debian bullseye/main arm64 python3-ntlm-auth all 1.4.0-1 [21.6 kB]
Get:15 http://deb.debian.org/debian bullseye/main arm64 python3-requests-kerberos all 0.12.0-2 [13.0 kB]
Get:16 http://deb.debian.org/debian bullseye/main arm64 python3-requests-ntlm all 1.1.0-1.1 [6120 B]
Get:17 http://deb.debian.org/debian bullseye/main arm64 python3-requests-toolbelt all 0.9.1-1 [41.7 kB]
Get:18 http://deb.debian.org/debian bullseye/main arm64 python3-selinux arm64 3.1-3 [148 kB]
Get:19 http://deb.debian.org/debian bullseye/main arm64 python3-xmltodict all 0.12.0-2 [15.2 kB]
Get:20 http://deb.debian.org/debian bullseye/main arm64 python3-winrm all 0.3.0-2 [21.6 kB]
Fetched 32.0 MB in 1s (57.6 MB/s)
Selecting previously unselected package python3-pyparsing.
(Reading database ... 24181 files and directories currently installed.)
Preparing to unpack .../00-python3-pyparsing_2.4.7-1_all.deb ...
Unpacking python3-pyparsing (2.4.7-1) ...
Selecting previously unselected package python3-packaging.
Preparing to unpack .../01-python3-packaging_20.9-2_all.deb ...
Unpacking python3-packaging (20.9-2) ...
Selecting previously unselected package python3-pycryptodome.
Preparing to unpack .../02-python3-pycryptodome_3.9.7+dfsg1-1+b2_arm64.deb ...
Unpacking python3-pycryptodome (3.9.7+dfsg1-1+b2) ...
Selecting previously unselected package python3-dnspython.
Preparing to unpack .../03-python3-dnspython_2.0.0-1_all.deb ...
Unpacking python3-dnspython (2.0.0-1) ...
Selecting previously unselected package ieee-data.
Preparing to unpack .../04-ieee-data_20210605.1_all.deb ...
Unpacking ieee-data (20210605.1) ...
Selecting previously unselected package python3-netaddr.
Preparing to unpack .../05-python3-netaddr_0.7.19-5_all.deb ...
Unpacking python3-netaddr (0.7.19-5) ...
Selecting previously unselected package ansible.
Preparing to unpack .../06-ansible_2.10.7+merged+base+2.10.8+dfsg-1_all.deb ...
Unpacking ansible (2.10.7+merged+base+2.10.8+dfsg-1) ...
Selecting previously unselected package python3-argcomplete.
Preparing to unpack .../07-python3-argcomplete_1.8.1-1.5_all.deb ...
Unpacking python3-argcomplete (1.8.1-1.5) ...
Selecting previously unselected package python3-jmespath.
Preparing to unpack .../08-python3-jmespath_0.10.0-1_all.deb ...
Unpacking python3-jmespath (0.10.0-1) ...
Selecting previously unselected package python3-kerberos.
Preparing to unpack .../09-python3-kerberos_1.1.14-3.1+b3_arm64.deb ...
Unpacking python3-kerberos (1.1.14-3.1+b3) ...
Selecting previously unselected package python3-lockfile.
Preparing to unpack .../10-python3-lockfile_1%3a0.12.2-2.2_all.deb ...
Unpacking python3-lockfile (1:0.12.2-2.2) ...
Selecting previously unselected package python3-simplejson.
Preparing to unpack .../11-python3-simplejson_3.17.2-1_arm64.deb ...
Unpacking python3-simplejson (3.17.2-1) ...
Selecting previously unselected package python3-libcloud.
Preparing to unpack .../12-python3-libcloud_3.2.0-2_all.deb ...
Unpacking python3-libcloud (3.2.0-2) ...
Selecting previously unselected package python3-ntlm-auth.
Preparing to unpack .../13-python3-ntlm-auth_1.4.0-1_all.deb ...
Unpacking python3-ntlm-auth (1.4.0-1) ...
Selecting previously unselected package python3-requests-kerberos.
Preparing to unpack .../14-python3-requests-kerberos_0.12.0-2_all.deb ...
Unpacking python3-requests-kerberos (0.12.0-2) ...
Selecting previously unselected package python3-requests-ntlm.
Preparing to unpack .../15-python3-requests-ntlm_1.1.0-1.1_all.deb ...
Unpacking python3-requests-ntlm (1.1.0-1.1) ...
Selecting previously unselected package python3-requests-toolbelt.
Preparing to unpack .../16-python3-requests-toolbelt_0.9.1-1_all.deb ...
Unpacking python3-requests-toolbelt (0.9.1-1) ...
Selecting previously unselected package python3-selinux.
Preparing to unpack .../17-python3-selinux_3.1-3_arm64.deb ...
Unpacking python3-selinux (3.1-3) ...
Selecting previously unselected package python3-xmltodict.
Preparing to unpack .../18-python3-xmltodict_0.12.0-2_all.deb ...
Unpacking python3-xmltodict (0.12.0-2) ...
Selecting previously unselected package python3-winrm.
Preparing to unpack .../19-python3-winrm_0.3.0-2_all.deb ...
Unpacking python3-winrm (0.3.0-2) ...
Setting up python3-lockfile (1:0.12.2-2.2) ...
Setting up python3-requests-toolbelt (0.9.1-1) ...
Setting up python3-ntlm-auth (1.4.0-1) ...
Setting up python3-pycryptodome (3.9.7+dfsg1-1+b2) ...
Setting up python3-kerberos (1.1.14-3.1+b3) ...
Setting up python3-simplejson (3.17.2-1) ...
Setting up python3-xmltodict (0.12.0-2) ...
Setting up python3-pyparsing (2.4.7-1) ...
Setting up python3-jmespath (0.10.0-1) ...
Setting up python3-requests-kerberos (0.12.0-2) ...
Setting up ieee-data (20210605.1) ...
Setting up python3-dnspython (2.0.0-1) ...
Setting up python3-selinux (3.1-3) ...
Setting up python3-argcomplete (1.8.1-1.5) ...
Setting up python3-requests-ntlm (1.1.0-1.1) ...
Setting up python3-libcloud (3.2.0-2) ...
Setting up python3-packaging (20.9-2) ...
Setting up python3-netaddr (0.7.19-5) ...
Setting up python3-winrm (0.3.0-2) ...
Setting up ansible (2.10.7+merged+base+2.10.8+dfsg-1) ...
Processing triggers for man-db (2.9.4-2) ...
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'

PLAY [127.0.0.1] ***************************************************************

TASK [Gathering Facts] *********************************************************
ok: [127.0.0.1]

TASK [change hostname] *********************************************************
skipping: [127.0.0.1]

TASK [add hostname to /etc/hosts] **********************************************
skipping: [127.0.0.1]

TASK [add bluetooth group] *****************************************************
changed: [127.0.0.1]

TASK [tweak user groups] *******************************************************
changed: [127.0.0.1]

TASK [update apt package cache] ************************************************
ok: [127.0.0.1]

TASK [install packages] ********************************************************
changed: [127.0.0.1]

TASK [remove useless packages from the cache] **********************************
ok: [127.0.0.1]

TASK [clean apt cache] *********************************************************
[WARNING]: Consider using the apt module rather than running 'apt-get'.  If you
need to use command because apt is insufficient you can add 'warn: false' to
this command task or set 'command_warnings=False' in ansible.cfg to get rid of
this message.
changed: [127.0.0.1]

TASK [Add Docker GPG apt Key] **************************************************
changed: [127.0.0.1]

TASK [Add Docker Repository] ***************************************************
changed: [127.0.0.1]

TASK [Update apt and install docker-ce] ****************************************
changed: [127.0.0.1]

TASK [Install Docker Module for Python] ****************************************
changed: [127.0.0.1]

TASK [disable modem manager] ***************************************************
changed: [127.0.0.1]

TASK [purge modem manager] *****************************************************
changed: [127.0.0.1]

TASK [clean apt cache] *********************************************************
ok: [127.0.0.1]

TASK [remove dependencies that are no longer required] *************************
changed: [127.0.0.1]

TASK [Install os-agent] ********************************************************
changed: [127.0.0.1]

PLAY RECAP *********************************************************************
127.0.0.1                  : ok=16   changed=12   unreachable=0    failed=0    skipped=2    rescued=0    ignored=0

ModemManager.service masked-runtime enabled
[warn] [Warning] ModemManager service is enabled. This might cause issue when using serial devices.
[info] Creating default docker daemon configuration /etc/docker/daemon.json
[info] Restarting docker service
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
2021-11-27 12:01:16,601 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2021-11-27 12:01:16,602 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
ci-info: no authorized SSH keys fingerprints found for user ha.
Cloud-init v. 20.4.1 finished at Sat, 27 Nov 2021 12:01:16 +0000. Datasource DataSourceNoCloud [seed=/dev/sr0][dsmode=net].  Up 709.27 seconds

Output of sudo systemctl status docker.service

ha@hafbx:~$ sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2021-11-27 12:01:23 UTC; 11min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 18924 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, statu>
   Main PID: 18924 (code=exited, status=1/FAILURE)
        CPU: 95ms

Nov 27 12:01:23 hafbx systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Nov 27 12:01:23 hafbx systemd[1]: Stopped Docker Application Container Engine.
Nov 27 12:01:23 hafbx systemd[1]: docker.service: Start request repeated too quickly.
Nov 27 12:01:23 hafbx systemd[1]: docker.service: Failed with result 'exit-code'.
Nov 27 12:01:23 hafbx systemd[1]: Failed to start Docker Application Container Engine.
lines 1-14/14 (END)

Output of journalctl -xe

ha@hafbx:~$ sudo journalctl -xe
Nov 27 12:04:30 hafbx sudo[18930]: pam_unix(sudo:session): session closed for user root
Nov 27 12:04:31 hafbx systemd[1]: Starting Cleanup of Temporary Directories...
░░ Subject: A start job for unit systemd-tmpfiles-clean.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit systemd-tmpfiles-clean.service has begun execution.
░░
░░ The job identifier is 1742.
Nov 27 12:04:31 hafbx systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit systemd-tmpfiles-clean.service has successfully entered the 'dead' state.
Nov 27 12:04:31 hafbx systemd[1]: Finished Cleanup of Temporary Directories.
░░ Subject: A start job for unit systemd-tmpfiles-clean.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit systemd-tmpfiles-clean.service has finished successfully.
░░
░░ The job identifier is 1742.
Nov 27 12:04:52 hafbx chronyd[621]: Selected source 2001:41d0:d:2329:1::68 (2.debian.pool.ntp.org)
Nov 27 12:12:42 hafbx sudo[18938]:       ha : TTY=pts/1 ; PWD=/home/ha ; USER=root ; COMMAND=/usr/bin/systemctl status >
Nov 27 12:12:42 hafbx sudo[18938]: pam_unix(sudo:session): session opened for user root(uid=0) by ha(uid=1000)
Nov 27 12:14:27 hafbx sudo[18938]: pam_unix(sudo:session): session closed for user root
Nov 27 12:14:30 hafbx sudo[18942]:       ha : TTY=pts/1 ; PWD=/home/ha ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Nov 27 12:14:30 hafbx sudo[18942]: pam_unix(sudo:session): session opened for user root(uid=0) by ha(uid=1000)
lines 2402-2430/2430 (END)
foreign-sub commented 2 years ago

Hi, thanks for your feedback.

There was an issue caused by some urls changes. This is now fixed in the latest release.

Thanks.