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

fix(proxy_restart): Consistent way to restart nodes with proxy #3272

Merged
merged 6 commits into from
Sep 3, 2020

Conversation

mfornet
Copy link
Member

@mfornet mfornet commented Sep 2, 2020

On proxy restart wait for the previous instance to get closed before starting a new one

fixes #3134

Test plan

sanity/proxy_restart.py pass consistently

http://nayduck.eastus.cloudapp.azure.com:3000/#/run/285

@gitpod-io
Copy link

gitpod-io bot commented Sep 2, 2020

@mfornet mfornet changed the title Fix 3134 fix(proxy_restart): Consistent way to restart nodes with proxy Sep 2, 2020
@@ -326,6 +327,10 @@ def proxify_node(node, ps, handler, global_stopped, error, proxy):
outer_port = inner_port + 100

def start_proxy():
# local_stopped denotes the current of state of the proxy:
# 0: The proxy is running
# 1: The proxy is running but should be closed soon
Copy link
Collaborator

Choose a reason for hiding this comment

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

where is 1 used

Copy link
Member Author

@mfornet mfornet Sep 3, 2020

Choose a reason for hiding this comment

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

To kill a node, this value is set to 1 so the underlying proxy finishes

https://github.com/nearprotocol/nearcore/blob/master/pytest/lib/cluster.py#L343

@codecov
Copy link

codecov bot commented Sep 2, 2020

Codecov Report

Merging #3272 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3272   +/-   ##
=======================================
  Coverage   87.22%   87.22%           
=======================================
  Files         217      217           
  Lines       42397    42397           
=======================================
  Hits        36981    36981           
  Misses       5416     5416           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3652a09...42863bb. Read the comment docs.

pytest/lib/proxy.py Outdated Show resolved Hide resolved
@nearprotocol-bulldozer nearprotocol-bulldozer bot merged commit 51b2baa into master Sep 3, 2020
@nearprotocol-bulldozer nearprotocol-bulldozer bot deleted the fix-3134 branch September 3, 2020 19:30
mhalambek pushed a commit that referenced this pull request Sep 7, 2020
On proxy restart wait for the previous instance to get closed before starting a new one

fixes #3134 


Test plan
=======
sanity/proxy_restart.py pass consistently

http://nayduck.eastus.cloudapp.azure.com:3000/#/run/285
chefsale pushed a commit that referenced this pull request Sep 7, 2020
On proxy restart wait for the previous instance to get closed before starting a new one

fixes #3134 


Test plan
=======
sanity/proxy_restart.py pass consistently

http://nayduck.eastus.cloudapp.azure.com:3000/#/run/285
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.

proxy_restart.py is flaky, fails with "Connect call failed ('127.0.0.1', 24578)"
3 participants