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 a production instance is configured with hostnames other than the recommended app and mon, securedrop-admin verify will report spurious testinfra failures.
testinfra tests take their expected values from a bunch of variables in a yaml file, with some of said values (like server IPs) in prod runs being overridden from the install_files/ansible-base/group_vars/all/site-specific file created by ./securedrop-admin sdconfig. Looks like the server hostnames are not being overridden. So if they're not named according to the reccos in the docs I'd expect to see this error. Would be an easy fix to override them too methinks - check molecule/testinfra/conftest.py.
—because then remote Ansible runs (i.e., securedrop-admin verify) will fail trying to connect to the servers by their {app,monitor}_hostnames, for which there are no aliases in ~/.ssh/config. That is, securedrop-admin tailsconfigalways aliases the servers as app and mon, whatever their configured hostnames. That seems proper for connection aliases, so we'll have to find a cleverer way of overriding or injecting the configured hostnames here.
Description
If a production instance is configured with hostnames other than the recommended
app
andmon
,securedrop-admin verify
will report spurious testinfra failures.First noticed in #6127 (comment).
Steps to Reproduce
securedrop-admin sdconfig
with non-default hostnames, e.g. those provisioned bymolecule create -s libvirt-prod-focal
:securedrop-admin install
securedrop-admin setup -t
securedrop-admin verify
Expected Behavior
All testinfra tests pass.
Actual Behavior
Hostname-dependent testinfra tests fail, including:
app/test_ossec_agent.py::test_hosts_files
mon/test_ossec_server.py::test_ossec_connectivity
mon/test_ossec_server.py::test_hosts_files
mon/test_postfix.py::test_postfix_generic_maps
Comments
Originally posted by @zenmonkeykstop in #6103 (comment):
securedrop/molecule/testinfra/conftest.py
Lines 49 to 50 in 2882d1e
The text was updated successfully, but these errors were encountered: