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

Run diagnostics API UI integration for system VMs and VR #2833

Merged
merged 3 commits into from Sep 18, 2018

Conversation

Projects
None yet
6 participants
@dhlaluku
Copy link
Contributor

commented Aug 31, 2018

Description

This is a UI integration of the runDiagnostics API command that helps Admins troubleshoot network issues on CloudStack hosted networks by executing network-utility commands (ping, traceroute, arping) remotely on system VMs. #2721

FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

GitHub Issue/PRs

Screenshots (if appropriate):

image

Output
image

How Has This Been Tested?

As admin, log on to the CloudStack UI;

  • Navigate to Infrastructure > System VMs or Virtual Router

  • Click on the Run Diagnostics button and fill in the form that pops up.

See screenshots

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.
@dhlaluku

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2018

@blueorangutan package

@blueorangutan

This comment has been minimized.

Copy link

commented Aug 31, 2018

@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@dhlaluku

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2018

@houthuis @ernjvr @nvazquez please review

@blueorangutan

This comment has been minimized.

Copy link

commented Aug 31, 2018

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2281

@dhlaluku

This comment has been minimized.

Copy link
Contributor Author

commented Aug 31, 2018

@blueorangutan

This comment has been minimized.

Copy link

commented Aug 31, 2018

@dhlaluku a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

This comment has been minimized.

Copy link

commented Sep 1, 2018

Trillian test result (tid-2981)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30876 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2833-t2981-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermittent failure detected: /marvin/tests/smoke/test_public_ip_range.py
Intermittent failure detected: /marvin/tests/smoke/test_templates.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Intermittent failure detected: /marvin/tests/smoke/test_volumes.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 64 look OK, 5 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_03_vpc_privategw_restart_vpc_cleanup Failure 1141.42 test_privategw_acl.py
test_04_extract_template Failure 128.28 test_templates.py
ContextSuite context=TestISOUsage>:setup Error 0.00 test_usage.py
test_06_download_detached_volume Failure 137.57 test_volumes.py
test_hostha_enable_ha_when_host_in_maintenance Error 3.44 test_hostha_kvm.py
@Override
public String getEventType() {
VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getId());
if (vm.getType() == VirtualMachine.Type.ConsoleProxy) {

This comment has been minimized.

Copy link
@ernjvr

ernjvr Sep 4, 2018

Contributor

it would be better to use a switch case instead of multiple if else, especially for comparing multiple enums

This comment has been minimized.

Copy link
@dhlaluku

dhlaluku Sep 4, 2018

Author Contributor

Refactored to switch-case statements

@@ -1484,6 +1485,9 @@ var dictionary = {
"label.rule.number":"Rule Number",
"label.rule.number.short": "#Rule",
"label.rules":"Rules",
"label.run.diagnostics.type":"Type",
"label.run.diagnostics.destination":"Destination",
"label.run.diagnostics.extra":"Extra Args",

This comment has been minimized.

Copy link
@ernjvr

ernjvr Sep 4, 2018

Contributor

Spelling out the entire word looks more professional. Maybe just call it 'Arguments'?

This comment has been minimized.

Copy link
@dhlaluku

dhlaluku Sep 4, 2018

Author Contributor

Changed Extra Args -> Extra Arguments

@rhtyd rhtyd modified the milestones: 4.11.2.0, 4.12.0.0 Sep 4, 2018

@rhtyd

rhtyd approved these changes Sep 4, 2018

Copy link
Member

left a comment

See minor comments

@@ -53,6 +55,7 @@
private NetworkOrchestrationService networkManager;

@Override
@ActionEvent(eventType = "", eventDescription = "running diagnostics on system vm", async = true)

This comment has been minimized.

Copy link
@rhtyd

rhtyd Sep 4, 2018

Member

@dhlaluku eventType is empty?

This comment has been minimized.

Copy link
@dhlaluku

dhlaluku Sep 4, 2018

Author Contributor

Added a new event type "EVENT_SYSTEM_VM_DIAGNOSTICS = SYSTEM.VM.DIAGNOSTICS" and used that.
Notices that most system vm actions (reboot, destroy and so on) also have empty event types.

@ernjvr

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2018

LGTM

@rhtyd rhtyd added the component:UI label Sep 17, 2018

@rhtyd rhtyd merged commit 0b6eafc into apache:master Sep 18, 2018

2 checks passed

Jenkins This pull request looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@dhlaluku dhlaluku deleted the shapeblue:remote-diagnosis-ui branch Sep 18, 2018

@borisstoyanov
Copy link
Contributor

left a comment

LGMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.