Skip to content
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

[t] Indicate Tailscale install requirement #2845

Closed
FroggyFlox opened this issue Jun 2, 2024 · 4 comments
Closed

[t] Indicate Tailscale install requirement #2845

FroggyFlox opened this issue Jun 2, 2024 · 4 comments
Assignees

Comments

@FroggyFlox
Copy link
Member

FroggyFlox commented Jun 2, 2024

Our attempt at having the Tailscale repos and its package pre-installed in our installer has unfortunately had to be stopped: rockstor/rockstor-installer#173. This means we now need to ship our installer without the repo and package needed for the included Tailscale service (https://rockstor.com/docs/interface/system/services.html#tailscale).

We unfortunately do not surface the need for the user to first install the repo and the Tailscale package before configuring the service. This might have already misled a Testing channel user, unfortunately: https://forum.rockstor.com/t/unknown-internal-error-doing-a-post-to-api-sm-services-tailscaled-config/9418/2.

We should thus, to begin, surface this information to the user trying to configure the Tailscale service. This could be:

  • 1: check that the tailscale repo is present on the system and show a banner in the configure pop-up if it isn't, along with disabling the "submit" button with explanation.
  • 2: check that the tailscale repo is present on the system and if it isn't: disable the "configure" button and show some sort of warning icon or the like in the Services page itself next to the Tailscale repo.
  • 3: simple banner reminding the user to install the package first, along with a link to our docs showing how to.

Any other idea(s) is welcome, of course.

@FroggyFlox
Copy link
Member Author

FroggyFlox commented Jun 2, 2024

An accompanying issue in our rockstor-doc repo has been created: rockstor/rockstor-doc#471

@phillxnet
Copy link
Member

phillxnet commented Jul 5, 2024

We now have our planned doc entry/how-to for installing the Tailscale repo & program, via:

rockstor/rockstor-doc#484

Which predominantly added the following Tailscale how-to:

Tailscale install: https://rockstor.com/docs/howtos/tailscale_install.html

This issue could be addressed, at least initially, by:

  • 3: simple banner reminding the user to install the package first, along with a link to our docs showing how to.

Or a custom error message indicating the same.

The problem, as I see it, with checking for a Tailscale repo (1., 2.); is that some folks may take a non-packaged approach to the Tailscale program install: especially give the dated docs situation referenced in the give howto. So I think, give our DIY nature, it is entirely appropriate that we leave the Tailscale install itself up-to the user: with the given Howto guide that we now have.

@phillxnet phillxnet self-assigned this Jul 10, 2024
@phillxnet phillxnet changed the title [t] Missing Tailscale repo [t] Indicate Tailscale install requirement Jul 10, 2024
@phillxnet
Copy link
Member

As-is, if we attempt to submit a default Tailscale config (dialog presented on Enable attempt, or via spanner icon) without a Tailscale install, we get the following failure:

[10/Jul/2024 13:01:13] ERROR [system.osi:288] non-zero code(5) returned by command: ['/usr/bin/systemctl', 'stop', 'tailscaled']. output: [''] error: ['Failed to stop tailscaled.service: Unit tailscaled.service not loaded.', '']
[10/Jul/2024 13:01:13] ERROR [storageadmin.middleware:34] Exception occurred while processing a request. Path: /api/sm/services/tailscaled/config method: POST
[10/Jul/2024 13:01:13] ERROR [storageadmin.middleware:35] Error running a command. cmd = /usr/bin/systemctl stop tailscaled. rc = 5. stdout = ['']. stderr = ['Failed to stop tailscaled.service: Unit tailscaled.service not loaded.', '']
Traceback (most recent call last):
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
    return view_func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/opt/rockstor/.venv/lib/python3.11/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/src/rockstor/smart_manager/views/tailscaled_service.py", line 98, in post
    systemctl(self.name, "stop")
  File "/opt/rockstor/src/rockstor/system/services.py", line 107, in systemctl
    return run_command(arg_list, log=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/rockstor/src/rockstor/system/osi.py", line 290, in run_command
    raise CommandException(cmd, out, err, rc)
system.exceptions.CommandException: Error running a command. cmd = /usr/bin/systemctl stop tailscaled. rc = 5. stdout = ['']. stderr = ['Failed to stop tailscaled.service: Unit tailscaled.service not loaded.', '']

And a generic Web-UI message:

Houston, we've had a problem.
Unknown internal error doing a POST to /api/sm/services/tailscaled/config

phillxnet added a commit to phillxnet/rockstor-core that referenced this issue Jul 10, 2024
Introduces `tailscale` binary os.path.isfile sensitivity to
inform the associated Web-UI errors: enabling more context
regarding our NOT pre-installing tailscale.
phillxnet added a commit that referenced this issue Jul 11, 2024
…ll-requirement

[t] Indicate Tailscale install requirement #2845
@phillxnet
Copy link
Member

Closing as:
Fixed by #2867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants