{# R78 (Hani #1 2026-11-14): automatic updates - Manual is the default; Automatic installs only proven releases at night. #}
{% set part = auto_part or 'all' %}{% set au = view.auto %}{% if au and part in ('all', 'policy') %}{% set row = au.row %}
{{ 'Paused' if row.paused else ('Automatic' if au.automatic else 'Manual') }}
Automatic installs only a proven release: one that ran {{ au.soak_hours }} hours on NEXXVU's own Portals without errors. It runs at night in the window below, never during the data server's update window (03:00–03:45). If the new release fails its checks during the update, the Portal goes back to the release before by itself. Administrators get a notice{% if row.email_admins %} and an e-mail{% endif %} before and after.
Next automatic update
{% if au.next %}{{ au.next }}{% if au.automatic and not row.paused %} · tonight, {{ au.window }}{% endif %}{% elif not au.proven_known %}No proven list from the update centers yet{% else %}Nothing proven newer than the installed release{% endif %}
{% if au.newest_not_proven %}
Newest release
{{ au.newest_not_proven }}: not proven yet (Update now installs it by hand)
{% endif %}
{% if row.last_result %}
Last automatic update
{{ row.attempt_version or '' }} {{ {'updated': 'installed and Ready', 'started': 'running', 'skipped': 'did not start', 'failed': 'failed', 'rolled_back': 'rolled back', 'unhealthy': 'installed, not Ready'}.get(row.last_result, row.last_result) }} · {{ row.last_at }}{% if row.last_detail %} {{ row.last_detail }}{% endif %}
{% endif %}
{% if row.paused %}
Paused
After two failed attempts at {{ row.failed_version }}. Save Automatic again to resume.
{% endif %}
{% if row.changed_by %}
Set by {{ row.changed_by }} · {{ row.changed_at }}
{% endif %}
{% endif %}
{# R78.4 (Hani #1 2026-11-14): going back to the release before the last update #}
{% set rv = view.auto.revert if view.auto else none %}{% if rv and part in ('all', 'go-back') %}
Go back to {{ rv.to }} {{ fresh_tag("updates:go-back") }} {{ fresh_tag("updates:go-back-fixed") }}
The Portal is going back from {{ rv['from'] }} to {{ rv.to }}; it restarts once (about a minute). This page shows the result.
{% elif rv.state == 'reverted' %}
The Portal went back from {{ rv['from'] }} to {{ rv.to }}. Monitoring data written since the update was kept{% if rv.discarded %}; changes made since the update were discarded ({{ rv.discarded|join(', ') }}){% endif %}. Automatic updates skip {{ rv['from'] }}.
{% else %}
If {{ rv['from'] }} does not work well, go back to {{ rv.to }}. The Portal restarts once (about a minute). Monitoring readings, results, log lines and events written since the update are kept; the data server is not touched. Only one step back: the copy of {{ rv.to }} is kept until the next update.
{% if rv.state == 'blocked' %}
Someone changed things since the update: {{ (rv.blocking or [])|join(', ') }}. Going back undoes those changes. Type GO BACK to go back anyway.
{% endif %}
{% if rv.state == 'failed' %}
Going back did not work ({{ rv.error }}); the Portal stayed on {{ rv['from'] }}.