-
Notifications
You must be signed in to change notification settings - Fork 1.2k
api: Introducing a new diagnostics API command for system VMs for CloudStack admins #2721
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
api: Introducing a new diagnostics API command for system VMs for CloudStack admins #2721
Conversation
|
@blueorangutan package |
|
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've executed the following manual tests:
| Test Name | Steps |
|---|---|
| Run against CPVM | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[CPVM-id] params="-I eth1 -c 8" |
| Run against SSVM | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[SSVM-id] params="-I eth1 -c 8" |
| Run against VR | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-I eth1 -c 8" |
| Run a ping type | With cloudmonkey execute: run diagnostics type=ping ipaddress=www.shapeblue.com id=[vr-id] |
| Run an arping type | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-I eth1 -c 8" |
| Run a traceroute type | With cloudmonkey execute: run diagnostics type=traceroute ipaddress=www.shapeblue.com id=[vr-id] |
| Run against VR with arguments | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-I eth1 -c 8" |
| Run a ping type with arguments | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-I eth1 -c 8" |
| Run an traceroute type with arguments | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-I eth1 -c 8" |
| Run an type with invalid arguments | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.shapeblue.com id=[vr-id] params="-H eth1 -c 8" |
| Run type to unreachable desctination | With cloudmonkey execute: run diagnostics type=arping ipaddress=www.something-not-readchable.com id=[vr-id] params="-H eth1 -c 8" |
| Run with invalid type | run diagnostics type=netstat ipaddress=www.shapeblue.com id=[vr-id] |
| Run with invalid target id. | run diagnostics type=ping ipaddress=www.shapeblue.com id=[invalid-id] |
LGTM, lets wait for the automated results
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2152 |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2825)
|
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2830)
|
|
@blueorangutan test |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2831)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the niche of this new feature we might find aspects we would like slightly different. The code looks good and contains unit - and integration tests. Let's run with it.
| from nose.plugins.attrib import attr | ||
|
|
||
|
|
||
| class TestRemoteDiagnostics(cloudstackTestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhlaluku can you add this to .travis.yml, fix it to make it work/skip against simulator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests has been added to Travis file in the section that contains tests for routers and system VMs
rohityadavcloud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhlaluku for simulator see if you add some mocks to get this APIs work against simulator i.e. with Travis to test business logic. Please see if you can fix that.
|
Please hold merging, while everything is LGTM -- @dhlaluku will add support for simulator with his work to make the business logic test-able and add his new marvin test with .travis.yml |
troubleshooting of network issues in CloudStack hosted networks
|
ping @dhlaluku |
bbe835d to
d2d0698
Compare
|
@rhtyd I have included "test_diagnostics" in the Travis file. Updated the Marvin tests to skip the negative test cases for the Simulator hypervisor. Also defined some mocks for the positive cases, example below with Cloudmonkey; (local) 🐵 > run diagnostics targetid=0c04cf04-8222-47fd-a883-6cf335646d64 ipaddress=8.8.8.8 type=traceroute |
|
Fantastic @dhlaluku - let's wait for travis to complete/pass. |
.travis.yml
Outdated
| # Keep the TESTS sorted by name and grouped by type | ||
| - TESTS="smoke/test_certauthority_root" | ||
|
|
||
| - TESTS="smoke/test_diagnostics" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep the name sorted, include your file under an existing test section/block, don't add a new job/runner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Included test to the section with routers and ssvm tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, you should keep it sorted by name as the file suggests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- TESTS="smoke/test_accounts
smoke/test_affinity_groups
smoke/test_affinity_groups_projects
smoke/test_deploy_vgpu_enabled_vm
smoke/test_deploy_vm_iso
smoke/test_deploy_vm_root_resize
smoke/test_deploy_vm_with_userdata
smoke/test_deploy_vms_with_varied_deploymentplanners
**smoke/test_diagnostics**
smoke/test_disk_offerings
smoke/test_dynamicroles
smoke/test_global_settings
smoke/test_guest_vlan_range"
| } else { | ||
| throw new CloudRuntimeException("Command execution failed: " + details); | ||
| executionDetailsMap.put(ApiConstants.STDOUT, ""); | ||
| executionDetailsMap.put(ApiConstants.STDERR, details ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove space after details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
|
@blueorangutan package |
|
@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✖centos7 ✔debian. JID-2168 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2170 |
|
@blueorangutan test |
|
@dhlaluku a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2842)
|
rohityadavcloud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Merging this based on code reviews and testing. The failures are not related to this PR. |
This is a new feature for CS that allows Admin users improved troubleshooting of network issues in CloudStack hosted networks. Description: For troubleshooting purposes, CloudStack administrators may wish to execute network utility commands remotely on system VMs, or request system VMs to ping/traceroute/arping to specific addresses over specific interfaces. An API command to provide such functionalities is being developed without altering any existing APIs. The targeted system VMs for this feature are the Virtual Router (VR), Secondary Storage VM (SSVM) and the Console Proxy VM (CPVM). FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API ML discussion: https://markmail.org/message/xt7owmb2c6iw7tva
Alteração da quantidade máxima de projetos através da UI Closes apache#2721 See merge request scclouds/scclouds!1193
This feature introduces a new API command that will improve troubleshooting of network issues on CloudStack hosted networks by executing network-utility commands (ping, traceroute, arping) remotely on system VMs.
Description
For troubleshooting purposes, CloudStack administrators may wish to execute network utility commands remotely on system VMs, or request system VMs to ping/traceroute/arping to specific addresses over specific interfaces. An API command to provide such functionalities is being developed without altering any existing APIs. The targeted system VMs for this feature are the Virtual Router (VR), Secondary Storage VM (SSVM) and the Console Proxy VM (CPVM).
FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API
ML discussion: https://markmail.org/message/xt7owmb2c6iw7tva
Types of changes
GitHub Issue/PRs
Screenshots (if appropriate):
How Has This Been Tested?
Log on to the CloudStack management server as root admin and start cloudmonkey. Sync APIs and then execute the run diagnostics command as follows:
run diganostics ipaddress=www.shapeblue.com type=arping targetid=uuid params="-I eth0 -c 4"
Where;
Dev environment components:
This command does not run with the CloudStack simulator and has only been tested on real hardware environments.
Checklist:
Testing