You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the {app,monitor}_hostname values are changed in site-specific after initial installation, the new hostnames will be appended to, rather than updated in, each server's /etc/hosts. As a consequence, the next unattended-upgrades run that happens to pull in a new version of securedrop-ossec-agent will fail.
We could use a blockinfile call on the /etc/hosts munging to clobber all SD-related changes on Ansible updates, which should resolve. This is definitely a bug, but quite an edge case. During sync today, we decided it doesn't need to be resolved in 2.1.0 final, since it wasn't introduced by logic in that release series.
Description
If the
{app,monitor}_hostname
values are changed insite-specific
after initial installation, the new hostnames will be appended to, rather than updated in, each server's/etc/hosts
. As a consequence, the nextunattended-upgrades
run that happens to pull in a new version ofsecuredrop-ossec-agent
will fail.Yes, this is a bit of a corner case....
Steps to Reproduce
Encountered during #6103:
./securedrop-admin {sdconfig,install,tailsconfig}
) with incorrect{app,monitor}_hostname
values.{app,monitor}_hostname
values in./securedrop-admin sdconfig
and deploy them via./securedrop-admin install
.Expected Behavior
Presenting symptom:
unattended-upgrades
succeeds.Underlying condition:
/etc/hosts
contains only the corrected hostnames.Actual Behavior
Presenting symptom:
unattended-upgrades
fails onsecuredrop-ossec-agent
:Underlying condition:
/etc/hosts
contains duplicate entries for the original and corrected hostnames:Comments
It's probably not worth trying to make
securedrop-ossec-agent
'spostinst
script more robust:securedrop/install_files/securedrop-ossec-agent/DEBIAN/postinst
Lines 23 to 24 in 21a162d
Rather, the Ansible task
setup_etc_hosts
should ideally change the configured hostnames in place rather than adding them even if they've changed:securedrop/install_files/ansible-base/roles/common/tasks/setup_etc_hosts.yml
Lines 29 to 38 in 012d30e
The text was updated successfully, but these errors were encountered: