Skip to content

Make it clear that something went wrong during sdw-admin --apply #1270

@deeplow

Description

@deeplow

Description

It may be unclear for users that an issue happened during the installation (a python traceback for a non-developer has little meaning) and reading the last line indicating the error is not something we should expect from users unless it's all caps or red. Furthermore, the documentation encourages reboot after the command is complete:

Finally, in the dom0 terminal, run the command:

sdw-admin --apply
This command will take a considerable amount of time and approximately 4GB of bandwidth, as it sets up multiple VMs and installs supporting packages. When the command finishes, reboot the machine to complete the installation. Your SecureDrop Workstation is finally ready to use!

This means that there is the risk a user does not understand that something went wrong, a reboot is performed and therefore installation logs are lost.

Steps to Reproduce

  1. Introduce a failure in sdw-admin --apply
  2. Run sdw-admin --apply

Expected Behavior

Big flashy warnings are visible indicating something went wrong

Actual Behavior

The user assumes verbose text is expected and proceeds with the restart as the docs indicate.

Enabling Whonix customizations
Running "sudo qubesctl --show-output --skip-dom0 --max-concurrency 2 --targets whonix-gateway-17 state.highstate"
Traceback (most recent call last):
  File "/usr/bin/sdw-admin", line 175, in qubesctl_call
    subprocess.check_call(qubesctl_cmd)
  File "/usr/lib64/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'qubesctl', '--show-output', '--skip-dom0', '--max-concurrency', '2', '--targets', 'whonix-gateway-17', 'state.highstate']' returned non-zero exit status 20.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/sdw-admin", line 330, in <module>
    main()
  File "/usr/bin/sdw-admin", line 307, in main
    provision_and_configure()
  File "/usr/bin/sdw-admin", line 94, in provision_and_configure
    configure("Enabling Whonix customizations", ["whonix-gateway-17"])
  File "/usr/bin/sdw-admin", line 148, in configure
    qubesctl_call(
  File "/usr/bin/sdw-admin", line 177, in qubesctl_call
    raise SDWAdminException(f"Error in step {step_description}")
SDWAdminException: Error in step Enabling Whonix customizations

Comments

A solution should involve two parts

  1. Visually endicating the success / failure. Something like the following in red would already be suggestive of some sort of installation issue.

    #####################################################
    #                                                  #
    #       I N S T A L L A T I O N   F A I L E D      #   
    #                                                  #
    ##################################################### 
    
  2. Document this in the troubleshooting sessions (see details shared by Anja bellow).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions