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

add dmsgpty-cli to skywire-cli #1250

Merged
merged 6 commits into from
Jun 9, 2022
Merged

add dmsgpty-cli to skywire-cli #1250

merged 6 commits into from
Jun 9, 2022

Conversation

mrpalide
Copy link
Contributor

@mrpalide mrpalide commented Jun 8, 2022

Did you run make format && make check? Yes

Fixes #863

Changes:

  • add dmsgpty command groups to skywire-cli as follow:
    • skywire-cli dmsgpty list to get list of all remote visor connected to hypervisor
    • skywire-cli dmsgpty start <pk> to start dmsgpty command line interface. Just note that if remote visor connection lost, then its appear on skywire-cli dmsgpyt list command yet, but when trying to start dmsgpty, get error after a while (about 10 second).

How to test this PR:

  • run a hypervisor
  • run a visor and set hypervisor PK to its config
  • use skywire-cli dmsgpty list check that visor connected and available
  • use skywire-cli dmsgpty start <pk> to run dmsgpty command line interface of remote visor in your terminal

ScreenCast:

dmsgpty.mp4

@mrpalide mrpalide marked this pull request as ready for review June 8, 2022 15:43
@mrpalide mrpalide changed the title add dmsgpty simple command executor to skywire-cli add dmsgpty-cli to skywire-cli Jun 8, 2022
@ersonp
Copy link
Contributor

ersonp commented Jun 9, 2022

Getting this when trying to connect to the visor on arch-dev

erson@erson-69:~/Workspace/Go/skywire$ ./skywire-cli dmsgpty start 03efcc15721fda2f9b24e128d86154fb8a1043eb09ee747b60b9b9533b8d1b7cc3
[2022-06-09T12:34:04+05:30] INFO [dmsgpty-cli]: Requesting... address="unix:///tmp/dmsgpty.sock"
2022/06/09 12:34:04 Failed to execute command: failed to connect to dmsgpty-host: dial unix /tmp/dmsgpty.sock: connect: permission denied

@mrpalide
Copy link
Contributor Author

mrpalide commented Jun 9, 2022

Getting this when trying to connect to the visor on arch-dev

erson@erson-69:~/Workspace/Go/skywire$ ./skywire-cli dmsgpty start 03efcc15721fda2f9b24e128d86154fb8a1043eb09ee747b60b9b9533b8d1b7cc3
[2022-06-09T12:34:04+05:30] INFO [dmsgpty-cli]: Requesting... address="unix:///tmp/dmsgpty.sock"
2022/06/09 12:34:04 Failed to execute command: failed to connect to dmsgpty-host: dial unix /tmp/dmsgpty.sock: connect: permission denied

When you run your hypervisor skywire-visor by root permission (with sudo command), then should run skywire-cli with sudo too.

@0pcom
Copy link
Collaborator

0pcom commented Jun 9, 2022

Flawless!

image

@0pcom 0pcom self-requested a review June 9, 2022 17:18
Copy link
Collaborator

@0pcom 0pcom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised that you couldn't import the dmsgpty-client command directly from the other repo; but it may be better to do it this way.

It works great, and it's impressive that it did not actually take you very long at all to make it work.

I've been waiting a long time for this exact functionality, thanks very much for your work here.

@0pcom 0pcom merged commit a80b2e6 into skycoin:develop Jun 9, 2022
@mrpalide mrpalide mentioned this pull request Jun 13, 2022
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

Successfully merging this pull request may close these issues.

3 participants