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

[CI] Randomize RPCService's port and handle NoSuchProcess error properly #690

Merged
merged 5 commits into from
May 12, 2019

Conversation

withsmilo
Copy link
Collaborator

@withsmilo withsmilo commented May 10, 2019

This PR contains two parts.

  • Randomize RPCService's port in test_container_rpc.sh.
    We should avoid the port collisions between test cases as much as possible.
  • Handle psutil.NoSuchProcess error properly.
 [unittest_rpc_container] Traceback (most recent call last):
 [unittest_rpc_container] File ../python/rpc_test_container.py, line 1, in <module>
 [unittest_rpc_container] import rpc
 [unittest_rpc_container] File /clipper/containers/python/rpc.py, line 20, in <module>
 [unittest_rpc_container] import clipper_admin.metrics as metrics
 [unittest_rpc_container] File /clipper/clipper_admin/clipper_admin/metrics/__init__.py, line 6, in <module>
 [unittest_rpc_container] if not server.redis_daemon_exist():
 [unittest_rpc_container] File /clipper/clipper_admin/clipper_admin/metrics/server.py, line 134, in redis_daemon_exist
 [unittest_rpc_container] process_names = [psutil.Process(pid).name() for pid in pids]
 [unittest_rpc_container] File /usr/local/lib/python2.7/dist-packages/psutil/__init__.py, line 338, in __init__
 [unittest_rpc_container] self._init(pid)
 [unittest_rpc_container] File /usr/local/lib/python2.7/dist-packages/psutil/__init__.py, line 378, in _init
 [unittest_rpc_container] raise NoSuchProcess(pid, None, msg)
 [unittest_rpc_container] psutil._exceptions.NoSuchProcess: psutil.NoSuchProcess no process found with pid 162

We should avoid the port collisions between test cases as much as possible.
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1934/ shows the port collision to us.
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1936/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1937/
Test FAILed.

Current Jenkins CI shows the following errors to us.
```
 [unittest_rpc_container] Traceback (most recent call last):
 [unittest_rpc_container] File ../python/rpc_test_container.py, line 1, in <module>
 [unittest_rpc_container] import rpc
 [unittest_rpc_container] File /clipper/containers/python/rpc.py, line 20, in <module>
 [unittest_rpc_container] import clipper_admin.metrics as metrics
 [unittest_rpc_container] File /clipper/clipper_admin/clipper_admin/metrics/__init__.py, line 6, in <module>
 [unittest_rpc_container] if not server.redis_daemon_exist():
 [unittest_rpc_container] File /clipper/clipper_admin/clipper_admin/metrics/server.py, line 134, in redis_daemon_exist
 [unittest_rpc_container] process_names = [psutil.Process(pid).name() for pid in pids]
 [unittest_rpc_container] File /usr/local/lib/python2.7/dist-packages/psutil/__init__.py, line 338, in __init__
 [unittest_rpc_container] self._init(pid)
 [unittest_rpc_container] File /usr/local/lib/python2.7/dist-packages/psutil/__init__.py, line 378, in _init
 [unittest_rpc_container] raise NoSuchProcess(pid, None, msg)
 [unittest_rpc_container] psutil._exceptions.NoSuchProcess: psutil.NoSuchProcess no process found with pid 162
```
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1938/
Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1939/
Test FAILed.

@withsmilo withsmilo force-pushed the randomize_rpc_service_port branch from 09f5c6e to 691e67e Compare May 11, 2019 13:26
@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1941/
Test PASSed.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Clipper-PRB/1942/
Test PASSed.

@withsmilo withsmilo changed the title [CI] Randomize RPCService's port in test_container_rpc.sh [CI] Randomize RPCService's port and handle NoSuchProcess error properly May 11, 2019
@withsmilo
Copy link
Collaborator Author

Please review this PR. 😬

Copy link
Collaborator

@rkooo567 rkooo567 left a comment

Choose a reason for hiding this comment

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

Looks all good to me!

@withsmilo
Copy link
Collaborator Author

@rkooo567 Thank you! 😊

@withsmilo withsmilo merged commit 6466d7d into ucbrise:develop May 12, 2019
@withsmilo withsmilo deleted the randomize_rpc_service_port branch May 12, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants