Skip to content

Commit

Permalink
Fixes #348 resizes private volume sises of sd-svs sd-log
Browse files Browse the repository at this point in the history
sd-svs:private is now 10GB
sd-log:private is now 5GB
  • Loading branch information
kushaldas committed Jan 13, 2020
1 parent 7120233 commit fd4656f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dom0/sd-log.sls
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ sd-log-dom0-securedrop.Log:
- text: |
@tag:sd-workstation sd-log allow
@anyvm @anyvm deny
# The private volume should be 5GB in size
sd-log-private-volume-size:
cmd.run:
- name: >
qvm-volume resize sd-log:private 5GiB
- require:
- qvm: sd-log
8 changes: 8 additions & 0 deletions dom0/sd-svs.sls
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ sd-svs:
- require:
- qvm: sd-svs-buster-template

# The private volume should be 10GB in size
sd-svs-private-volume-size:
cmd.run:
- name: >
qvm-volume resize sd-svs:private 10GiB
- require:
- qvm: sd-svs

# Ensure the Qubes menu is populated with relevant app entries,
# so that Nautilus/Files can be started via GUI interactions.
sd-svs-template-sync-appmenus:
Expand Down
10 changes: 10 additions & 0 deletions tests/test_vms_exist.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ def test_sd_svs_config(self):
self._check_service_running(vm, "paxctld")
self.assertTrue('sd-workstation' in vm.tags)
self.assertTrue('sd-client' in vm.tags)
# Check the size of the private volume
# Should be 10GB
# >>> 1024 * 1024 * 10 * 1024
vol = vm.volumes["private"]
self.assertEqual(vol.size, 10737418240)

def test_sd_svs_disp_config(self):
vm = self.app.domains["sd-svs-disp"]
Expand Down Expand Up @@ -176,6 +181,11 @@ def sd_log_template(self):
self.assertTrue('sd-workstation' in vm.tags)
self.assertFalse(vm.template_for_dispvms)
self._check_kernel(vm)
# Check the size of the private volume
# Should be 5GB
# >>> 1024 * 1024 * 5 * 1024
vol = vm.volumes["private"]
self.assertEqual(vol.size, 5368709120)


def load_tests(loader, tests, pattern):
Expand Down

0 comments on commit fd4656f

Please sign in to comment.