Skip to content

Commit 3614101

Browse files
committed
Remove "sd-whonix" from salt, update and tests
Removes sd-whonix from salt code, but adding steps to remove remove sd-whonix in perpetuity in the "sd-remove-unused-qubes". The rationale is that this should be kept as long as possible, since it's possible that some workstation may be "on the shelf" for some time, thus skipping upadtes. By keeping its removal in the code, we can catch these 'straggler' machines and ensure proper removal. (test on: openqa)
1 parent 1ab4400 commit 3614101

File tree

8 files changed

+11
-83
lines changed

8 files changed

+11
-83
lines changed

files/sdw-admin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ def sync_appmenus():
215215

216216
# These are the ones we show in prod VMs, so sync explicitly
217217
run_cmd(["qvm-sync-appmenus", "--regenerate-only", "sd-devices"])
218-
run_cmd(["qvm-sync-appmenus", "--regenerate-only", "sd-whonix"])
219218
run_cmd(["qvm-sync-appmenus", "--regenerate-only", "sd-log"])
220219

221220

launcher/tests/test_updater.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"sd-viewer",
1818
"sd-gpg",
1919
"sd-proxy",
20-
"sd-whonix",
2120
"sd-devices",
2221
]
2322

sdw_updater/Updater.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def _get_current_vms():
5151
"sd-log": f"sd-small-{debian_version}-template",
5252
"sd-devices": f"sd-large-{debian_version}-template",
5353
"sd-proxy": f"sd-small-{debian_version}-template",
54-
"sd-whonix": f"whonix-gateway-{whonix_version}",
5554
"sd-gpg": f"sd-small-{debian_version}-template",
5655
}
5756

securedrop_salt/sd-remove-deprecated-qubes.sls

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
# WARNING: only remove when complete reinstall is assumed (e.g. 1.0.0 release)
66
# This is because the workstation may have been offline for a while
77
# and skipped some salt updates.
8-
{% for untagged_qube in ["sd-retain-logvm"] %}
8+
{% for qube_name in ["sd-retain-logvm", "sd-whonix"] %}
99

10-
poweroff-before-removal-{{ untagged_qube }}:
10+
poweroff-before-removal-{{ qube_name }}:
1111
qvm.shutdown:
12-
- name: {{ untagged_qube }}
12+
- name: {{ qube_name }}
1313
- flags:
1414
- force
1515
- wait
1616
- onlyif:
17-
- qvm-check --quiet {{ untagged_qube }}
17+
- qvm-check --quiet {{ qube_name }}
1818
- order: last
1919

20-
remove-{{ untagged_qube }}:
20+
remove-{{ qube_name }}:
2121
qvm.absent:
22-
- name: {{ untagged_qube }}
22+
- name: {{ qube_name }}
2323
- require:
24-
- qvm: poweroff-before-removal-{{ untagged_qube }}
24+
- qvm: poweroff-before-removal-{{ qube_name }}
2525
- onlyif:
26-
- qvm-check --quiet {{ untagged_qube }}
26+
- qvm-check --quiet {{ qube_name }}
2727
- order: last
2828

2929
{% endfor %}

securedrop_salt/sd-whonix.sls

Lines changed: 0 additions & 68 deletions
This file was deleted.

securedrop_salt/sd-workstation.top

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ base:
1717
- securedrop_salt.sd-proxy
1818
- securedrop_salt.sd-viewer
1919
- securedrop_salt.sd-app
20-
- securedrop_salt.sd-whonix
21-
- securedrop_salt.sd-remove-deprecated-qubes
20+
- securedrop_salt.sd-remove-unused-qubes
2221
- securedrop_salt.sd-remove-unused-templates
2322

2423
sd-base-bookworm-template:

tests/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
SD_TEMPLATE_LARGE = f"sd-large-{DEBIAN_VERSION}-template"
1111
SD_TEMPLATE_SMALL = f"sd-small-{DEBIAN_VERSION}-template"
1212

13-
SD_VMS = ["sd-gpg", "sd-log", "sd-proxy", "sd-app", "sd-viewer", "sd-whonix", "sd-devices"]
13+
SD_VMS = ["sd-gpg", "sd-log", "sd-proxy", "sd-app", "sd-viewer", "sd-devices"]
1414
SD_DVM_TEMPLATES = ["sd-devices-dvm", "sd-proxy-dvm"]
1515
SD_TEMPLATES = [SD_TEMPLATE_BASE, SD_TEMPLATE_LARGE, SD_TEMPLATE_SMALL]
1616
SD_UNTAGGED_DEPRECATED_VMS = ["sd-retain-logvm"]

tests/test_log_vm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_logs_are_flowing(qube):
5858
# TODO: test a sd-viewer based dispVM
5959
skip = [f"sd-base-{CURRENT_DEBIAN_VERSION}-template", "sd-viewer"]
6060
# VMs we expect logs will not go to
61-
no_log_vms = ["sd-gpg", "sd-log", "sd-whonix"]
61+
no_log_vms = ["sd-gpg", "sd-log"]
6262

6363
# We first run the command in each VM, and then do a second loop to
6464
# look for the token in the log entry, so there's enough time for the

0 commit comments

Comments
 (0)