room-assistant icon indicating copy to clipboard operation
room-assistant copied to clipboard

SW version diverges on heterogenous clusters

Open embcla opened this issue 3 years ago • 2 comments

Describe the bug On clusters composed of Home Assistant and raspberry pis, it is possible to set the HA instance to auto-update. If this option is set, HA will automatically update RA while the raspberry pis would not. Depending on what goes on with the versions, they may stop talking to each other (it just happened from 2.10.1 to 2.11.0) To reproduce Connect two instances in the same cluster, one must be able to auto-update. Then issue a new version that breaks compatibility: one will update while the other won't. Only way to notice is that the two instances will stop communicating, no other warning or message is seen in the logs.

Relevant logs

The logs show how more than a minute has passed since the last log line but nothing else is shown in the logs.

pi@IOT-RaspberryPi-01:~ $ sudo systemctl status room-assistant
● room-assistant.service - room-assistant service
   Loaded: loaded (/etc/systemd/system/room-assistant.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-10-26 16:07:22 CET; 1min 15s ago
 Main PID: 3193 (node)
    Tasks: 11 (limit: 4915)
   CGroup: /system.slice/room-assistant.service
           └─3193 node /usr/local/bin/room-assistant -v

Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - EntitiesService: Adding new entity status-cluster-leader
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Registering entity room-assistant-garage-status-cluster-leader under homeassistant/sens
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new state 1 for room-assistant-garage-status-cluster-size
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new state none for room-assistant-garage-status-cluster-leader
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - info - NestApplication: Nest application successfully started
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new attributes {"nodes":["garage"]} for room-assistant-garage-status-cluster-si
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new attributes {"quorumReached":true} for room-assistant-garage-status-cluster-
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - info - ClusterService: Added 192.168.101.4:6425 to the cluster with id server
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new state 2 for room-assistant-garage-status-cluster-size
Oct 26 16:07:29 IOT-RaspberryPi-01 room-assistant[3193]: 26/10/2020, 16:07:29 - debug - HomeAssistantService: Sending new attributes {"nodes":["server","garage"]} for room-assistant-garage-status-c

Relevant configuration

global:
  instanceName: server
  integrations:
    - homeAssistant
    - bluetoothClassic
bluetoothClassic:
  addresses:
    - mac1
    - mac2
    - mac3
debug_level: verbose
cluster:
  autoDiscovery: false
  peerAddresses:
    - 'ip:6425'

Expected behavior Many options are possibile

  • fallback of the most updated version to what is compatible with the rest of the cluster
  • auto-update on raspberry pi
  • log messages saying that an instance is trying to get into the cluster but is running the wrong version

Environment

  • room-assistant version: 2.10.1 and 2.11.0
  • installation type: Hass.io and nodeJS
  • hardware: Raspberry Pi4 and Debian VM
  • OS: Raspian and Debian

Additional context

embcla avatar Oct 26 '20 15:10 embcla

I'm honestly a bit surprised that the update broke connectivity, I can't remember changing anything in the networking layer of the code. 🤔

I like the idea of at least logging when mismatching versions are detected though.

mKeRix avatar Oct 26 '20 18:10 mKeRix

Could it be something else that I picked up at the same time then? It auto-updated and somehow the two instances weren't talking anymore

embcla avatar Oct 31 '20 10:10 embcla