New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qubes-Whonix 14 SaltStack state files required #3765

Closed
adrelanos opened this Issue Mar 30, 2018 · 28 comments

Comments

Projects
None yet
6 participants
@adrelanos
Member

adrelanos commented Mar 30, 2018

I am not sure it was a good idea to go for versioned (suffixing -14) Whonix template names.

  • We now have the issue that salt uses non-versioned hardcoded values.
  • However, [instructions for testing newly built Qubes-Whonix 14 templates] need to refer to the versioned template names.
  • Qubes-Whonix manual setup got to complicated that we now advice users to use salt for it. (#3447) So telling users to do that manually is not an option either.

Perhaps we should revert this for the next template release and go back to non-versioned template names? Do you see a better solution for this?

@mirrorway

This comment has been minimized.

Show comment
Hide comment
@mirrorway

mirrorway Mar 30, 2018

Isn't the natural solution to just modify and version the salt too? qubesctl state.sls qvm.anon-whonix-14 dom0 In the future, the salt setup could be different for different major versions of whonix.

There are so many benefits to having the version in the names:

  • Can see at a glance which package or template is 13 vs 14. Mis-identification could mean spending an hour downloading the wrong package, or testing the wrong version.
  • Consistency with fedora and debian template naming.
  • Can easily install new whonix templates to test without worrying about overwriting the old ones that work. In the long run, wouldn't this simplify the installation? fewer VMs to rename and fewer RPMs to remove.

mirrorway commented Mar 30, 2018

Isn't the natural solution to just modify and version the salt too? qubesctl state.sls qvm.anon-whonix-14 dom0 In the future, the salt setup could be different for different major versions of whonix.

There are so many benefits to having the version in the names:

  • Can see at a glance which package or template is 13 vs 14. Mis-identification could mean spending an hour downloading the wrong package, or testing the wrong version.
  • Consistency with fedora and debian template naming.
  • Can easily install new whonix templates to test without worrying about overwriting the old ones that work. In the long run, wouldn't this simplify the installation? fewer VMs to rename and fewer RPMs to remove.
@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 2, 2018

Member

Shall I just duplicate all files with names containing whonix on https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/tree/master/qvm and add -14 to the file names and file content where appropriate? @marmarek

Member

adrelanos commented Apr 2, 2018

Shall I just duplicate all files with names containing whonix on https://github.com/QubesOS/qubes-mgmt-salt-dom0-virtual-machines/tree/master/qvm and add -14 to the file names and file content where appropriate? @marmarek

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 2, 2018

Member

Salt can use variables, and those can be set pillars (separate files, also enabled/disabled with top.enable/top.disable). We use this for setting either separate sys-usb, or combined with sys-net, then when referencing USB VM, use {{ salt['pillar.get']('qvm:sys-usb:name', 'sys-usb') }} (sys-usb here is default value if it isn't defined in pillar). pillar file

We can do the same with Whonix - use variable like qvm:whonix:version_suffix (with either empty value or -14, later -15 etc). Then use it everywhere when referencing whonix-gw or whonix-ws templates (and probably also whonix-ws-dvm name). And provide files to set some particular value. This way, using non-default version would require just qubesctl top.enable qvm.whonix-14 before qubesctl state.sls qvm.anon-whonix.

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names. Separate variable?

Member

marmarek commented Apr 2, 2018

Salt can use variables, and those can be set pillars (separate files, also enabled/disabled with top.enable/top.disable). We use this for setting either separate sys-usb, or combined with sys-net, then when referencing USB VM, use {{ salt['pillar.get']('qvm:sys-usb:name', 'sys-usb') }} (sys-usb here is default value if it isn't defined in pillar). pillar file

We can do the same with Whonix - use variable like qvm:whonix:version_suffix (with either empty value or -14, later -15 etc). Then use it everywhere when referencing whonix-gw or whonix-ws templates (and probably also whonix-ws-dvm name). And provide files to set some particular value. This way, using non-default version would require just qubesctl top.enable qvm.whonix-14 before qubesctl state.sls qvm.anon-whonix.

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names. Separate variable?

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 2, 2018

Member

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names.

Sounds good!

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names.

I am divided. Should we go for


(A)

just keep

  • sys-whonix
  • anon-whonix

Questions:

  • What would happen if someone major upgrades (Whonix 14 -> 15) using salt? No issues?
  • Template whonix-gw-14 and whonix-ws-14 would simply be no longer used? Salt would change anon-whonix and sys-whonix to whonix-(gw|ws)-15?

Advantages:

  • easy to persist Tor entry guards (important anonymity providing feature)

Disadvantages:

  • Doesn't allow parallel usage of two Whonix versions at once. For testers which are very important. Would be possible in theory but instructions would look very complicated / messy. (Instructions: "First install using salt. (Required due to #3447.) Then create sys-whonix-15, then somehow set salt settings, then set back the template of your sys-whonix-14 to whonix-gw-14.)
  • Installation of newer Whonix version using salt would change (sys|anon)-whonix templates to whonix-(gw|ws) without asking the user.

or
(B)

  • sys-whonix-14
  • anon-whonix-14

And later...

  • sys-whonix-15
  • anon-whonix-15

Disadvantages:

  • not easily persisting Tor entry guards
  • messy instructions for persisting Tor entry guards (Instructions: "let your sys-whonix-14 VM use whonix-gw-15 as its TemplateVM")
  • Perhaps we tell users how to copy over their Tor state data folder (for Tor entry guards) and Tor config using qvm-copy-to-vm instead? (Instructions: "Start sys-whonix-15. Click nothing in anon-connection-wizard. Start sys-whonix-14. Run these qvm-copy-to-vm commands etc. for migration.")
  • looks strange when someone does an in-place major (Whonix 14 -> 15) upgrade since the old names would persist (whonix-gw-14, whonix-ws-14, sys-whonix-14, anon-whonix-14)
    • --> Or should we just explain in in-place upgrade instructions to change TemplateBasedVM names and TemplateVM names? Is that even possible for templates installed using rpm?

Advantages:

  • can provide easy, clean, clear call for testers blog posts
  • easy new installation without persisting of data
  • sys-whonix-15 cleanly uses whonix-gw-15 etc.

I think we should go for (B).

Member

adrelanos commented Apr 2, 2018

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names.

Sounds good!

We can do the same with other Whonix-related VMs (sys-whonix, anon-whonix), but IMO by default those should stay with current names.

I am divided. Should we go for


(A)

just keep

  • sys-whonix
  • anon-whonix

Questions:

  • What would happen if someone major upgrades (Whonix 14 -> 15) using salt? No issues?
  • Template whonix-gw-14 and whonix-ws-14 would simply be no longer used? Salt would change anon-whonix and sys-whonix to whonix-(gw|ws)-15?

Advantages:

  • easy to persist Tor entry guards (important anonymity providing feature)

Disadvantages:

  • Doesn't allow parallel usage of two Whonix versions at once. For testers which are very important. Would be possible in theory but instructions would look very complicated / messy. (Instructions: "First install using salt. (Required due to #3447.) Then create sys-whonix-15, then somehow set salt settings, then set back the template of your sys-whonix-14 to whonix-gw-14.)
  • Installation of newer Whonix version using salt would change (sys|anon)-whonix templates to whonix-(gw|ws) without asking the user.

or
(B)

  • sys-whonix-14
  • anon-whonix-14

And later...

  • sys-whonix-15
  • anon-whonix-15

Disadvantages:

  • not easily persisting Tor entry guards
  • messy instructions for persisting Tor entry guards (Instructions: "let your sys-whonix-14 VM use whonix-gw-15 as its TemplateVM")
  • Perhaps we tell users how to copy over their Tor state data folder (for Tor entry guards) and Tor config using qvm-copy-to-vm instead? (Instructions: "Start sys-whonix-15. Click nothing in anon-connection-wizard. Start sys-whonix-14. Run these qvm-copy-to-vm commands etc. for migration.")
  • looks strange when someone does an in-place major (Whonix 14 -> 15) upgrade since the old names would persist (whonix-gw-14, whonix-ws-14, sys-whonix-14, anon-whonix-14)
    • --> Or should we just explain in in-place upgrade instructions to change TemplateBasedVM names and TemplateVM names? Is that even possible for templates installed using rpm?

Advantages:

  • can provide easy, clean, clear call for testers blog posts
  • easy new installation without persisting of data
  • sys-whonix-15 cleanly uses whonix-gw-15 etc.

I think we should go for (B).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Apr 2, 2018

Member

(A)

Questions:

What would happen if someone major upgrades (Whonix 14 -> 15) using salt? No issues?
Template whonix-gw-14 and whonix-ws-14 would simply be no longer used? Salt would change anon-whonix and sys-whonix to whonix-(gw|ws)-15?

Depending how salt is written - currently it will not touch existing sys-whonix and anon-whonix, but it is trivial to change that. And IMO it is a good idea to adjust it.

Doesn't allow parallel usage of two Whonix versions at once. For testers which are very important. Would be possible in theory but instructions would look very complicated / messy. (Instructions: "First install using salt. (Required due to #3447.) Then create sys-whonix-15, then somehow set salt settings, then set back the template of your sys-whonix-14 to whonix-gw-14.)

We can create yet another pillar for such cases ("whonix-vms-suffix" or such).

(B)

And later...

sys-whonix-15
anon-whonix-15

This option also means the need for manually changing netvm sys-whonix-14->sys-whonix-15 for all other qubes using whonix.

Or should we just explain in in-place upgrade instructions to change TemplateBasedVM names and TemplateVM names? Is that even possible for templates installed using rpm?

It isn't possible to rename (in 4.0 not even for non-templates), but it is always possible to clone.

Member

marmarek commented Apr 2, 2018

(A)

Questions:

What would happen if someone major upgrades (Whonix 14 -> 15) using salt? No issues?
Template whonix-gw-14 and whonix-ws-14 would simply be no longer used? Salt would change anon-whonix and sys-whonix to whonix-(gw|ws)-15?

Depending how salt is written - currently it will not touch existing sys-whonix and anon-whonix, but it is trivial to change that. And IMO it is a good idea to adjust it.

Doesn't allow parallel usage of two Whonix versions at once. For testers which are very important. Would be possible in theory but instructions would look very complicated / messy. (Instructions: "First install using salt. (Required due to #3447.) Then create sys-whonix-15, then somehow set salt settings, then set back the template of your sys-whonix-14 to whonix-gw-14.)

We can create yet another pillar for such cases ("whonix-vms-suffix" or such).

(B)

And later...

sys-whonix-15
anon-whonix-15

This option also means the need for manually changing netvm sys-whonix-14->sys-whonix-15 for all other qubes using whonix.

Or should we just explain in in-place upgrade instructions to change TemplateBasedVM names and TemplateVM names? Is that even possible for templates installed using rpm?

It isn't possible to rename (in 4.0 not even for non-templates), but it is always possible to clone.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 2, 2018

Member
Member

adrelanos commented Apr 2, 2018

@adrelanos adrelanos changed the title from Whonix versioned template names vs salt - revert to non-versioned Whonix template names? to Qubes-Whonix 14 SaltStack state files required Apr 12, 2018

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 26, 2018

Member

Related:
whonix-ws-based VMs lack the anon-vm tag
#3595

Member

adrelanos commented Apr 26, 2018

Related:
whonix-ws-based VMs lack the anon-vm tag
#3595

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Apr 29, 2018

Member

Do you think you could help with this one? @viq

Member

adrelanos commented Apr 29, 2018

Do you think you could help with this one? @viq

@viq

This comment has been minimized.

Show comment
Hide comment
@viq

viq Apr 30, 2018

Yeah, I'll need to dig some into how qubes does things under the mask, but I should be able to help some here. But first, let me refresh the discussion a bit, to make sure I have the details right, and understand the approach.

  1. Template versioning
    For me it makes most sense to treat it like we do fedora, debian etc, so I have no issue with having whonix-gw-14 next to whonix-gw-15, which also potentially makes it easier to test new versions.

  2. AppVM versioning
    Unless what lives on /rw/ changes in significant ways (does it? I don't know enough about whonix currently, and what changes 14 brings) then I would keep with the theme of other AppVMs and not use versioning

  3. Testing new whonix versions
    I don't see much issue here, either clone or set up a fresh sys-whonix-next (and there could be states for that) and on a couple AppVMs set that as NetVM. As for what to use for updating machines through, I'd need to find where and how it's set, and again that could be automated - but we'd need to find a decent place and way to set the value of that variable for salt to use.

viq commented Apr 30, 2018

Yeah, I'll need to dig some into how qubes does things under the mask, but I should be able to help some here. But first, let me refresh the discussion a bit, to make sure I have the details right, and understand the approach.

  1. Template versioning
    For me it makes most sense to treat it like we do fedora, debian etc, so I have no issue with having whonix-gw-14 next to whonix-gw-15, which also potentially makes it easier to test new versions.

  2. AppVM versioning
    Unless what lives on /rw/ changes in significant ways (does it? I don't know enough about whonix currently, and what changes 14 brings) then I would keep with the theme of other AppVMs and not use versioning

  3. Testing new whonix versions
    I don't see much issue here, either clone or set up a fresh sys-whonix-next (and there could be states for that) and on a couple AppVMs set that as NetVM. As for what to use for updating machines through, I'd need to find where and how it's set, and again that could be automated - but we'd need to find a decent place and way to set the value of that variable for salt to use.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 1, 2018

Member
Member

adrelanos commented May 1, 2018

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 5, 2018

Member

Should salt run qvm-features-request whonix-ws=1 as well? (#3595) (T791) @marmarek

Member

adrelanos commented May 5, 2018

Should salt run qvm-features-request whonix-ws=1 as well? (#3595) (T791) @marmarek

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 5, 2018

Member

No, but some whonix-ws package should place a file in /etc/qubes/post-install.d that would call it. This way it will be done automatically during template installation and update, regardless of used method. No action for this needed from salt.
The only requirement is that qubes-core-admin-addon-whonix is installed.

Member

marmarek commented May 5, 2018

No, but some whonix-ws package should place a file in /etc/qubes/post-install.d that would call it. This way it will be done automatically during template installation and update, regardless of used method. No action for this needed from salt.
The only requirement is that qubes-core-admin-addon-whonix is installed.

@viq

This comment has been minimized.

Show comment
Hide comment
@viq

viq May 6, 2018

@marmarek you mean the file and package should be present in dom0, or in a template?

viq commented May 6, 2018

@marmarek you mean the file and package should be present in dom0, or in a template?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 6, 2018

Member

/etc/qubes/post-install.d/(something).sh in the template, qubes-core-admin-addon-whonix in dom0.

Member

marmarek commented May 6, 2018

/etc/qubes/post-install.d/(something).sh in the template, qubes-core-admin-addon-whonix in dom0.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 6, 2018

Member

The appropriate package would be https://github.com/Whonix/qubes-whonix.

Member

adrelanos commented May 6, 2018

The appropriate package would be https://github.com/Whonix/qubes-whonix.

adrelanos added a commit to Whonix/qubes-whonix that referenced this issue May 6, 2018

adrelanos added a commit to Whonix/qubes-whonix that referenced this issue May 6, 2018

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 6, 2018

Member

Just now added. Let me know if file name and contents looks alright.

https://github.com/Whonix/qubes-whonix/blob/master/etc/qubes/post-install.d/30-whonix-ws.sh

Looked easy and I like sorting the easy things asp.
Later some commentary can be added (low priority). If it looks alright, I'll upload and upgraded package.

Member

adrelanos commented May 6, 2018

Just now added. Let me know if file name and contents looks alright.

https://github.com/Whonix/qubes-whonix/blob/master/etc/qubes/post-install.d/30-whonix-ws.sh

Looked easy and I like sorting the easy things asp.
Later some commentary can be added (low priority). If it looks alright, I'll upload and upgraded package.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 6, 2018

Member

Should be qvm-features-request whonix-ws=1 (= not space)

Member

marmarek commented May 6, 2018

Should be qvm-features-request whonix-ws=1 (= not space)

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 6, 2018

Member
Member

adrelanos commented May 6, 2018

@viq

This comment has been minimized.

Show comment
Hide comment

adrelanos added a commit to adrelanos/qubes-whonix that referenced this issue May 9, 2018

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 9, 2018

Member

fix, run "qvm-features-request whonix-ws=1" only on Whonix-Workstation:
Whonix/qubes-whonix@5d5aa4e

Should further qvm-features-request whonix-ws=1 be only run in TemplateVM? If so, I could add another test making sure it will only be run in TemplateVM. Or not required?

Member

adrelanos commented May 9, 2018

fix, run "qvm-features-request whonix-ws=1" only on Whonix-Workstation:
Whonix/qubes-whonix@5d5aa4e

Should further qvm-features-request whonix-ws=1 be only run in TemplateVM? If so, I could add another test making sure it will only be run in TemplateVM. Or not required?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 9, 2018

Member

Should further qvm-features-request whonix-ws=1 be only run in TemplateVM?

Shouldn't matter. IMO better leave as is, let dom0 extension decide.

Member

marmarek commented May 9, 2018

Should further qvm-features-request whonix-ws=1 be only run in TemplateVM?

Shouldn't matter. IMO better leave as is, let dom0 extension decide.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos May 19, 2018

Member

QubesOS/qubes-mgmt-salt-dom0-virtual-machines#10 was merged.

Current status: Waiting for package upgrade.

Member

adrelanos commented May 19, 2018

QubesOS/qubes-mgmt-salt-dom0-virtual-machines#10 was merged.

Current status: Waiting for package upgrade.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 19, 2018

Member

Package is already in current-testing (QubesOS/updates-status#543), I've uploaded it just after merging it.
The missing part is versioned template(s) in templates-community. Should I build a new one, or move the one from unstable?

Member

marmarek commented May 19, 2018

Package is already in current-testing (QubesOS/updates-status#543), I've uploaded it just after merging it.
The missing part is versioned template(s) in templates-community. Should I build a new one, or move the one from unstable?

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Jun 13, 2018

Member

Do you think you could provide instructions on how to test this? @viq

https://forums.whonix.org/t/qubes-whonix-14-saltstack-state-files-testers-wanted/5324

Member

adrelanos commented Jun 13, 2018

Do you think you could provide instructions on how to test this? @viq

https://forums.whonix.org/t/qubes-whonix-14-saltstack-state-files-testers-wanted/5324

@awokd

This comment has been minimized.

Show comment
Hide comment
@awokd

awokd Jun 24, 2018

Are these salt commands ready for testing? I updated a stock 4.0 setup to current-testing and tested above salt commands. No -14 templates installed to begin with which caused errors since I didn't have unstable enabled. Manually installed templates, but the commands are still failing with One or more requisite failed: qvm-whonix-ws-dvm.whonix-ws-14-dvm.

awokd commented Jun 24, 2018

Are these salt commands ready for testing? I updated a stock 4.0 setup to current-testing and tested above salt commands. No -14 templates installed to begin with which caused errors since I didn't have unstable enabled. Manually installed templates, but the commands are still failing with One or more requisite failed: qvm-whonix-ws-dvm.whonix-ws-14-dvm.

@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Jul 15, 2018

Member

Ready for testing, yes, see: https://forums.whonix.org/t/qubes-whonix-14-saltstack-state-files-testers-wanted

Do you have the same issue like me in #4082?

Anyhow. I suggest to close this initial implementation ticket and to create new bugs for any issues.

Member

adrelanos commented Jul 15, 2018

Ready for testing, yes, see: https://forums.whonix.org/t/qubes-whonix-14-saltstack-state-files-testers-wanted

Do you have the same issue like me in #4082?

Anyhow. I suggest to close this initial implementation ticket and to create new bugs for any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment