Skip to content

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

Merged
yadvr merged 3 commits into
apache:masterfrom
shapeblue:remote-diagnosis-ui
Sep 18, 2018
Merged

Run diagnostics API UI integration for system VMs and VR#2833
yadvr merged 3 commits into
apache:masterfrom
shapeblue:remote-diagnosis-ui

Conversation

@dhlaluku

@dhlalukudhlaluku commented Aug 31, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@dhlaluku

Copy link
Copy Markdown
ContributorAuthor

@houthuis@ernjvr@nvazquez please review

@blueorangutan

Copy link
Copy Markdown

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

@dhlaluku

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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:

TestResultTime (s)Test File
test_03_vpc_privategw_restart_vpc_cleanupFailure1141.42test_privategw_acl.py
test_04_extract_templateFailure128.28test_templates.py
ContextSuite context=TestISOUsage>:setupError0.00test_usage.py
test_06_download_detached_volumeFailure137.57test_volumes.py
test_hostha_enable_ha_when_host_in_maintenanceError3.44test_hostha_kvm.py

@Override
public String getEventType() {
VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getId());
if (vm.getType() == VirtualMachine.Type.ConsoleProxy) {

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

Comment threadui/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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

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

@yadvryadvr left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

LGTM

@yadvr
yadvr merged commit 0b6eafc into apache:masterSep 18, 2018
@dhlaluku
dhlaluku deleted the remote-diagnosis-ui branch September 18, 2018 10:46

@borisstoyanovborisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGMT

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@dhlaluku@blueorangutan@ernjvr@yadvr@houthuis@borisstoyanov