From 015f99352f23775ecda0738d1015578902eea8fd Mon Sep 17 00:00:00 2001 From: mickael e Date: Wed, 8 May 2019 16:18:51 -0400 Subject: [PATCH 1/2] Autostart sd-proxy and sd-whonix at login Initial client login (after booting of workstation) would fail due to timeout, due to sd-proxy boot time. The initial decryption is also slow, due to the starting of sd-gpg. --- dom0/sd-gpg.sls | 1 + dom0/sd-proxy.sls | 1 + 2 files changed, 2 insertions(+) diff --git a/dom0/sd-gpg.sls b/dom0/sd-gpg.sls index 5300993c..50b78619 100644 --- a/dom0/sd-gpg.sls +++ b/dom0/sd-gpg.sls @@ -20,6 +20,7 @@ sd-gpg: - label: purple - prefs: - netvm: "" + - autostart: true - tags: - add: - sd-workstation diff --git a/dom0/sd-proxy.sls b/dom0/sd-proxy.sls index 1b2c42c9..78a30fca 100644 --- a/dom0/sd-proxy.sls +++ b/dom0/sd-proxy.sls @@ -32,6 +32,7 @@ sd-proxy: - prefs: - netvm: sd-whonix - kernelopts: "nopat apparmor=1 security=apparmor" + - autostart: true - tags: - add: - sd-workstation From 7d4be8133c14ed3fe5373fc0af36d83922ff4d0b Mon Sep 17 00:00:00 2001 From: Conor Schaefer Date: Thu, 16 May 2019 12:54:56 -0700 Subject: [PATCH 2/2] Adds config tests for autostart AppVMs sd-whonix has long been set as autostart, but we didn't have a corresponding config test for it. We recently enabled autostart on sd-gpg and sd-proxy, those now also have config tests. It's a bit anti-Pythonic to `assertTrue(x is True)`, rather than just `assertTrue(x)`, but trying to be explicit about what the underlying qubesadmin API returns. --- tests/test_vms_exist.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_vms_exist.py b/tests/test_vms_exist.py index a421bb6f..93172ec3 100644 --- a/tests/test_vms_exist.py +++ b/tests/test_vms_exist.py @@ -41,6 +41,7 @@ def test_sd_whonix_config(self): self.assertEqual(vm.kernelopts, wanted_kernelopts) self.assertTrue(vm.template == "whonix-gw-14") self.assertTrue(vm.provides_network) + self.assertTrue(vm.autostart is True) self.assertFalse(vm.template_for_dispvms) self.assertTrue('sd-workstation' in vm.tags) @@ -51,6 +52,7 @@ def test_sd_proxy_config(self): wanted_kernelopts = "nopat apparmor=1 security=apparmor" self.assertEqual(vm.kernelopts, wanted_kernelopts) self.assertTrue(vm.template == "sd-proxy-template") + self.assertTrue(vm.autostart is True) self.assertFalse(vm.provides_network) self.assertFalse(vm.template_for_dispvms) self.assertTrue('sd-workstation' in vm.tags) @@ -81,6 +83,7 @@ def test_sd_gpg_config(self): self.assertTrue(nvm is None) # No sd-gpg-template, since keyring is managed in $HOME self.assertTrue(vm.template == "sd-workstation-template") + self.assertTrue(vm.autostart is True) self.assertFalse(vm.provides_network) self.assertFalse(vm.template_for_dispvms) self._check_kernel(vm)