Skip to content

Conversation

@dhlaluku
Copy link
Contributor

@dhlaluku dhlaluku 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
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@dhlaluku
Copy link
Contributor Author

@houthuis @ernjvr @nvazquez please review

@blueorangutan
Copy link

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

@dhlaluku
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Refactored to switch-case statements

ui/l10n/en.js Outdated
"label.rules":"Rules",
"label.run.diagnostics.type":"Type",
"label.run.diagnostics.destination":"Destination",
"label.run.diagnostics.extra":"Extra Args",
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed Extra Args -> Extra Arguments

@rohityadavcloud rohityadavcloud modified the milestones: 4.11.2.0, 4.12.0.0 Sep 4, 2018
Copy link
Member

@rohityadavcloud rohityadavcloud left a comment

Choose a reason for hiding this comment

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

See minor comments

private NetworkOrchestrationService networkManager;

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

Choose a reason for hiding this comment

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

@dhlaluku eventType is empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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
Copy link
Contributor

ernjvr commented Sep 4, 2018

LGTM

@rohityadavcloud rohityadavcloud merged commit 0b6eafc into apache:master Sep 18, 2018
@dhlaluku dhlaluku deleted the remote-diagnosis-ui branch September 18, 2018 10:46
Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGMT

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.

6 participants