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

Attaching to server console during installation crashes Wilfred #46

Closed
vilhelmprytz opened this issue Mar 21, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@vilhelmprytz
Copy link
Member

Environment

  • Installation type: snap & pip
  • Python version: 3.6.9 (affects all supported versions)
  • Wilfred version: since v0.5.0

Steps to Reproduce

Create a server with wilfred create --detach and attach to console wilfred console <name> when the server is still installing.

Expected Behavior

The log to be streamed with input disabled.

Observed Behavior

The following exception is raised.

Viewing server console of test (id yyl8lsr5) - input disabled, installing
Traceback (most recent call last):
  File "run.py", line 16, in <module>
    main()
  File "/home/vilhelm/src/github/wilfred-dev/wilfred/wilfred/wilfred.py", line 107, in main
    cli()
  File "/home/vilhelm/.local/share/virtualenvs/wilfred-SNdVLYox/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/vilhelm/.local/share/virtualenvs/wilfred-SNdVLYox/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/vilhelm/.local/share/virtualenvs/wilfred-SNdVLYox/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/vilhelm/.local/share/virtualenvs/wilfred-SNdVLYox/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vilhelm/.local/share/virtualenvs/wilfred-SNdVLYox/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/vilhelm/src/github/wilfred-dev/wilfred/wilfred/wilfred.py", line 501, in server_console
    server, disable_user_input=True if server.status == "installing" else False
  File "/home/vilhelm/src/github/wilfred-dev/wilfred/wilfred/servers.py", line 216, in console
    if not _thread._running:
UnboundLocalError: local variable '_thread' referenced before assignment
@vilhelmprytz vilhelmprytz added the bug Something isn't working label Mar 21, 2020
@vilhelmprytz vilhelmprytz self-assigned this Mar 21, 2020
@vilhelmprytz
Copy link
Member Author

Will be included in the next release, v0.5.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant