travisghansen / hass-opnsense

OPNsense integration with Home Assistant
194 stars 25 forks source link

Some updates notifications falsely state that reboot is not required #101

Closed Qhilm closed 5 months ago

Qhilm commented 10 months ago

Example: I just upgraded to 23.7.7, it did reboot the opnsense router, even though the notification said "Reboot required: false" (or something similar)

FredericMa commented 9 months ago

I noticed the same thing today: image

FredericMa commented 9 months ago

It looks like there are 2 fields indicating a reboot is needed. upgrade_needs_reboot and needs_reboot: image

I can't find any documentation on the fields but I assume needs_reboot is used for updates (minor version bump) and upgrade_needs_reboot for upgrades (major version bump). After updating, both flags are 0.

cyprien3 commented 8 months ago

Seems "needs_reboot" and "upgrade_needs_reboot" were split in 22.1.3 and business edition 22.4 but I struggle to find documentation about it.

penguintamer commented 6 months ago

Looks like the change happened in firmware: upgrade_needs_reboot flag is overloaded (#5358) and commit 14416172 on the OPNsense repo.

Particularly w.r.t. reasoning:

-            backend('upgrade', {upgrade:$.upgrade_action});
+            if ($.upgrade_action == 'maj') {
+                backend('upgrade', {upgrade:$.upgrade_action});
+            } else {
+                backend('update');
travisghansen commented 6 months ago

Yeah I could never make any sense of the set of fields. If someone can found out the proper logic feel free to put it here or submit a PR.

alexdelprete commented 6 months ago

Maybe Franco @fichtner can shed some light.