Mise à jour du core toujours en cours

Bonjour,

J’ai lancé une mise à jour du core dans l’interface version 2023.1.6 vers 2023.2.3
Cela fait 3 h que cela tourne mais rien ne semble se passé d’aprés les log
Le backup avant maj s’est bien exécuté

Les logs ne me retourne rien d’anormal (aucune remontées de niveau ERROR)
L’interface est toujours accessible et tout semble tourner normalement.

2023-02-10 18:33:35.805 INFO (SyncWorker_12) [root] Sending handshake.
2023-02-10 18:33:35.808 INFO (SyncWorker_5) [root] Sending handshake.
2023-02-10 18:33:41.061 INFO (SyncWorker_2) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
2023-02-10 18:33:45.806 INFO (SyncWorker_3) [root] Sending handshake.
2023-02-10 18:33:45.809 INFO (SyncWorker_11) [root] Sending handshake.
2023-02-10 18:33:55.811 INFO (SyncWorker_5) [root] Sending handshake.
2023-02-10 18:33:55.813 INFO (SyncWorker_2) [root] Sending handshake.
2023-02-10 18:34:05.816 INFO (SyncWorker_3) [root] Sending handshake.
2023-02-10 18:34:05.817 INFO (SyncWorker_0) [root] Sending handshake.
2023-02-10 18:34:11.061 INFO (SyncWorker_11) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:34:14.691 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:34:15.814 INFO (SyncWorker_10) [root] Sending handshake.
2023-02-10 18:34:15.815 INFO (SyncWorker_6) [root] Sending handshake.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:34:25.815 INFO (SyncWorker_11) [root] Sending handshake.
2023-02-10 18:34:25.816 INFO (SyncWorker_12) [root] Sending handshake.
2023-02-10 18:34:29.269 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'output0' when rendering '{{ value_json.output0 }}'
2023-02-10 18:34:35.818 INFO (SyncWorker_5) [root] Sending handshake.
2023-02-10 18:34:35.820 INFO (SyncWorker_0) [root] Sending handshake.
2023-02-10 18:34:41.062 INFO (SyncWorker_10) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
2023-02-10 18:34:44.693 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:34:45.819 INFO (SyncWorker_7) [root] Sending handshake.
2023-02-10 18:34:45.820 INFO (SyncWorker_12) [root] Sending handshake.
2023-02-10 18:34:55.822 INFO (SyncWorker_4) [root] Sending handshake.
2023-02-10 18:34:55.823 INFO (SyncWorker_11) [root] Sending handshake.
2023-02-10 18:35:05.822 INFO (SyncWorker_8) [root] Sending handshake.
2023-02-10 18:35:05.823 INFO (SyncWorker_7) [root] Sending handshake.
2023-02-10 18:35:11.064 INFO (SyncWorker_9) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:35:14.693 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:35:15.823 INFO (SyncWorker_10) [root] Sending handshake.
2023-02-10 18:35:15.824 INFO (SyncWorker_0) [root] Sending handshake.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:35:25.824 INFO (SyncWorker_3) [root] Sending handshake.
2023-02-10 18:35:25.825 INFO (SyncWorker_9) [root] Sending handshake.
2023-02-10 18:35:35.827 INFO (SyncWorker_1) [root] Sending handshake.
2023-02-10 18:35:35.828 INFO (SyncWorker_7) [root] Sending handshake.
2023-02-10 18:35:41.064 INFO (SyncWorker_10) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
2023-02-10 18:35:44.698 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:35:45.826 INFO (SyncWorker_6) [root] Sending handshake.
2023-02-10 18:35:45.827 INFO (SyncWorker_9) [root] Sending handshake.
2023-02-10 18:35:55.827 INFO (SyncWorker_4) [root] Sending handshake.
2023-02-10 18:35:55.828 INFO (SyncWorker_5) [root] Sending handshake.
2023-02-10 18:36:05.829 INFO (SyncWorker_3) [root] Sending handshake.
2023-02-10 18:36:05.829 INFO (SyncWorker_0) [root] Sending handshake.
2023-02-10 18:36:11.065 INFO (SyncWorker_12) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:36:14.697 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:36:15.829 INFO (SyncWorker_4) [root] Sending handshake.
2023-02-10 18:36:15.830 INFO (SyncWorker_5) [root] Sending handshake.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:36:25.831 INFO (SyncWorker_12) [root] Sending handshake.
2023-02-10 18:36:25.832 INFO (SyncWorker_8) [root] Sending handshake.
2023-02-10 18:36:34.697 WARNING (MainThread) [homeassistant.components.sensor] Updating sql sensor took longer than the scheduled update interval 0:00:30
2023-02-10 18:36:35.831 INFO (SyncWorker_11) [root] Sending handshake.
2023-02-10 18:36:35.833 INFO (SyncWorker_6) [root] Sending handshake.
2023-02-10 18:36:41.067 INFO (SyncWorker_7) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
2023-02-10 18:36:45.834 INFO (SyncWorker_1) [root] Sending handshake.
2023-02-10 18:36:45.834 INFO (SyncWorker_10) [root] Sending handshake.
2023-02-10 18:36:55.837 INFO (SyncWorker_12) [root] Sending handshake.
2023-02-10 18:36:55.838 INFO (SyncWorker_8) [root] Sending handshake.
2023-02-10 18:37:05.837 INFO (SyncWorker_2) [root] Sending handshake.
2023-02-10 18:37:05.838 INFO (SyncWorker_9) [root] Sending handshake.
2023-02-10 18:37:11.068 INFO (SyncWorker_8) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:37:14.702 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:37:15.837 INFO (SyncWorker_9) [root] Sending handshake.
2023-02-10 18:37:15.838 INFO (SyncWorker_2) [root] Sending handshake.
Warning: Permanently added '192.168.0.12' (ED25519) to the list of known hosts.
2023-02-10 18:37:25.840 INFO (SyncWorker_4) [root] Sending handshake.
2023-02-10 18:37:25.840 INFO (SyncWorker_1) [root] Sending handshake.
2023-02-10 18:37:35.841 INFO (SyncWorker_8) [root] Sending handshake.
2023-02-10 18:37:35.843 INFO (SyncWorker_5) [root] Sending handshake.
2023-02-10 18:37:41.071 INFO (SyncWorker_1) [homeassistant.components.command_line.switch] Running state code command: ssh -i /config/ssh_keys/id_rsa -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no dan@192.168.0.2 /home/dan/bin/vesta/webserv.sh status
Warning: Permanently added '192.168.0.2' (ED25519) to the list of known hosts.
2023-02-10 18:37:44.705 WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.derniere_regeneration is taking over 10 seconds
2023-02-10 18:37:45.843 INFO (SyncWorker_7) [root] Sending handshake.
2023-02-10 18:37:45.843 INFO (SyncWorker_3) [root] Sending handshake.
2023-02-10 18:37:55.843 INFO (SyncWorker_1) [root] Sending handshake.
2023-02-10 18:37:55.844 INFO (SyncWorker_2) [root] Sending handshake.
2023-02-10 18:38:05.845 INFO (SyncWorker_7) [root] Sending handshake.
2023-02-10 18:38:05.846 INFO (SyncWorker_11) [root] Sending handshake.

Si je lance un check en ligne de commande ha, j’ai une erreur 500:

[core-ssh ~]$ ha core check
⣾ Processing... ERRO[0000] Unexpected server response. Status code: 500 
Processing... Done.

Unexpected server response. Status code: 500

Auriez vous une autre piste pour débloquer cette maj ?

Ma configuration

System Information

version core-2023.1.6
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.7
os_name Linux
os_version 5.15.80
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.30.1
Stage running
Available Repositories 1199
Downloaded Repositories 13
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 9.4
update_channel stable
supervisor_version supervisor-2023.01.1
agent_version 1.4.1
docker_version 20.10.19
disk_total 30.8 GB
disk_used 21.9 GB
healthy true
supported true
board ova
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.6.1), MariaDB (2.5.2), File editor (5.5.0), ESPHome (2022.12.8), Samba share (10.0.0), AppDaemon (0.11.0), phpMyAdmin (0.8.3), Uptime Kuma (0.5.2)
Dashboards
dashboards 6
resources 9
views 21
mode storage
Recorder
oldest_recorder_run 23 novembre 2022 à 19:19
current_recorder_run 10 février 2023 à 15:26
estimated_db_size 4969.86 MiB
database_engine mysql
database_version 10.6.8
___

Hello

essai ceci et dans cette ordre :

ha core stop

ha core update

ha core start

Pas mieux, il refuse les commandes avec le message: Can't execute stop while a task is in progress

[core-ssh ~]$ ha core stop
Processing... Done.

Error: Unknown error, see supervisor
[core-ssh ~]$ ha supervisor logs |tail
23-02-10 19:37:14 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-02-10 20:07:15 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
23-02-10 20:24:33 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
23-02-10 20:24:33 INFO (MainThread) [supervisor.api.middleware.security] /network/info access from core_ssh
23-02-10 20:24:33 INFO (MainThread) [supervisor.api.middleware.security] /host/info access from core_ssh
23-02-10 20:24:33 INFO (MainThread) [supervisor.api.middleware.security] /core/info access from core_ssh
23-02-10 20:24:48 INFO (MainThread) [supervisor.api.middleware.security] /core/stop access from core_ssh
23-02-10 20:24:48 ERROR (MainThread) [supervisor.utils] Can't execute stop while a task is in progress
23-02-10 20:25:01 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from core_ssh
23-02-10 20:26:45 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from core_ssh
23-02-10 20:29:31 INFO (MainThread) [supervisor.api.middleware.security] /core/update access from core_ssh
23-02-10 20:29:31 ERROR (MainThread) [supervisor.utils] Can't execute update while a task is in progress
23-02-10 20:29:38 INFO (MainThread) [supervisor.api.middleware.security] /supervisor/logs access from core_ssh

Salut,

La 2023.2 fait un changement de structure et de données dans la base de données.
Je vois que ta base fait la bagatelle de 4Go :sunglasses:
C’est peut-être lié… vu que visiblement ça tourne vraiment encore, il n’y a des erreur que tu tu essaye de toucher au système par la CLI.

Je ne sais pas si cette commande est pertinente pour ce problème:

Ca n’a pas l’air d’etre chargé coté base ?

(homeassistant@core-mariadb) [homeassistant]> SHOW PROCESSLIST;
+----+---------------+-------------------+---------------+---------+------+----------+------------------+----------+
| Id | User          | Host              | db            | Command | Time | State    | Info             | Progress |
+----+---------------+-------------------+---------------+---------+------+----------+------------------+----------+
|  3 | homeassistant | 172.30.32.1:53274 | homeassistant | Sleep   |    2 |          | NULL             |    0.000 |
|  4 | homeassistant | 172.30.32.1:53276 | homeassistant | Sleep   |    0 |          | NULL             |    0.000 |
|  5 | homeassistant | 172.30.32.1:53284 | homeassistant | Sleep   |    1 |          | NULL             |    0.000 |
| 22 | homeassistant | 172.30.33.1:52586 | homeassistant | Query   |    0 | starting | SHOW PROCESSLIST |    0.000 |
+----+---------------+-------------------+---------------+---------+------+----------+------------------+----------+
4 rows in set (0.001 sec)

J’ai perdu la main sur l’interface cet après-midi, l’update étant toujours en cours.
La console de la VM me retournait des erreurs de type « Call Trace … ».
j’ai fini par rebooter la VM.

HA a redémarré correctement et tout était fonctionnel mais toujours dans l’ancienne version.

J’ai utilisé les commandes ci-dessus pour relancer la maj:
ha core stop
ha core update
ha core start

et c’est passé.
Faudra que je me méfie si la base de données est modifiée lors de la maj

Merci pour vos retours

Tu devrais surtout y faire du ménage, dans les 4Go il y a fort à parier que tout n’est pas utile

Oui
j’utilise des exclude pour la conf du recorder mais pas suffisant, semble t’il:

recorder:
  db_url: !secret recorder_db_url
  purge_keep_days: 396
  exclude:
    domains:
      - automation
      - updater
      - device_tracker
      - media_player
    entity_globs:
      - sensor.weather_*
    entities:
      - sun.sun # Don't record sun data
      - sensor.last_boot
      - sensor.date
    event_types:
      - call_service

Je voudrai garder 1 an d’historique pour certaines entitées seulement.
Si j’utilise seulement le ‹ include › pour le recorder pour les entitées qui m’intéressent. est ce que les autres entitées n’auront aucun historique ?
J’aimerai pouvoir garder 1 mois pour les autres

Refais un tour sur le forum, il y a des sujets un peu partout pour :

  • vérifier comment la base est à gérer (et corriger/adapter tes includes/excludes)
  • utiliser les données à long termes pour les valeurs importantes

Après à mon avis 1 mois de donnés ça sert à rien… alors 13 mois :bomb:
Là tes 4go ça fait combien de temps d’historique ???

On peut concevoir d’avoir des historiques sur une période longue) mais avec des données expurgées… La température de la salle de bain du mois dernier à 17h32 ne sert à rien. Une valeur à l’heure, c’est déjà beaucoup… Une valeur min/moy/max par jour probablement suffisant dans 99% des cas. Idem pour la conso électrique, passé quelques jours, on a besoin que du total journalier, pas du détail seconde par seconde

Tout à fait d’accord, je n’a pas besoin d’avoir un an de données pour tout.

Du coup comment faites vous pour « expurger » les données ?
Garder un min/max ou le total de conso;/jour ?

Comment configurer le recorder dans ce cas ou passez vous par une base externe ?

Perso, base externe avec une ligne ajoutée chaque jour avec toutes les valeurs qui m’intéressent.
Ca sert aussi si tu change de système.

Sinon pour info le changement de la base de données c’est lié aux dates, ils passent d’un datetime à un timestamp pour les date d’enregistrement des états.
Dans la table states, les champs last_updated & last_changed sont vidés et des nouveaux champs last_updated_ts et last_changed.ts sont utilisés à la place.