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

Change transport type preference #222

Merged
merged 4 commits into from
Mar 12, 2020

Conversation

nkryuchkov
Copy link
Contributor

@nkryuchkov nkryuchkov commented Mar 10, 2020

Did you run make format && make check? Yes

Fixes #157

Changes:

  • When calling skywire-cli visor add-tp $PubKey without specifying the transport type explicitly, the visor tries to establish an stcp transport by default and only establish a dmsg transport once that fails.

How to test this PR:

  1. Run integration env
  2. Run skywire-cli visor add-tp $PubKey without explicitly specifying transport type or run make integration-startup in https://github.com/SkycoinPro/skywire-services/pull/109

Copy link
Member

@jdknives jdknives left a comment

Choose a reason for hiding this comment

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

When running in deployment, I get:

[2020-03-10T19:19:08+01:00] DEBUG [tp_manager]: Initializing TP with ID 3c776105-f783-039f-b6c8-e1d43b7f9f9a
[2020-03-10T19:19:08+01:00] INFO [tp_manager]: saved transport: remote(02a2f5c95e2275ed59ad82bcf99adf839b2adb1357f449076f4713f172230254e3) type(stcp) tpID(3c776105-f783-039f-b6c8-e1d43b7f9f9a)
[2020-03-10T19:19:08+01:00] WARN [tp_manager]: Underlying connection is not yet established. Will retry later. error="pk table: entry of 02a2f5c95e2275ed59ad82bcf99adf839b2adb1357f449076f4713f172230254e3 does not exist"
[2020-03-10T19:19:08+01:00] INFO [visor_rpc:CLI]: Request processed. _elapsed="125.37µs" _method="AddTransport" _received="7:19PM" input=&{RemotePK:02a2f5c95e2275ed59ad82bcf99adf839b2adb1357f449076f4713f172230254e3 TpType:stcp Public:true Timeout:0s} output=&{ID:3c776105-f783-039f-b6c8-e1d43b7f9f9a Local:03ac383847b90baaecddcdd2daeb29f49df896399e08db41fc13c81e0228600447 Remote:02a2f5c95e2275ed59ad82bcf99adf839b2adb1357f449076f4713f172230254e3 Type:stcp Log:<nil> IsSetup:false}
[2020-03-10T19:19:08+01:00] INFO [tp:02a2f5]: Serving. remote_pk=02a2f5c95e2275ed59ad82bcf99adf839b2adb1357f449076f4713f172230254e3 tp_id=3c776105-f783-039f-b6c8-e1d43b7f9f9a tp_index=1

I cannot send messages as it reports that there is no transport found for route. Ls-tp returns the transport of type stcp.

@nkryuchkov
Copy link
Contributor Author

@jdknives The transport manager didn't return an error if the STCP table doesn't have a requested PK. Fixed that behavior and cannot reproduce it anymore. Could you please try again?

@nkryuchkov nkryuchkov merged commit 13b39e8 into skycoin:develop Mar 12, 2020
@nkryuchkov nkryuchkov deleted the feature/tp-type-preference branch March 13, 2020 17:39
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