Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

3. Admin might also want to know which interfaces are being used for communication between VMs.

API

remoteDiagnostics API will be implemented with the following parameters:

  • uuid: the id of the system VM instance to execute network-utility command from.
  • diagnosisTest: the type of network utility tool to run, e.g. ping, traceroute or arping.
  • destinationIpAddress: the ping/arping/traceroute destination IP address.
  • OPTIONAL: additional command line arguments for each utility tool.

The API will execute a script in the system VM, and return back as API response the;

  • details: normal standard error/output information return by the command execution. 
  • boolean: command execution results. (or change this to exit code?)

Not Doing

...

The runDiagnostics API command makes use of the CloudStack Agents framework to run this commands on system VMs using the following algorithm;

  • The user provides the instance ID to be targeted, the type of diagnostics command and lastly, the IP/Domain address to test connection to.
  • API uses the instance ID parameter to find the host in which the VM instance is running from.
  • The diagnostics command and IP/Domain address are passed to this host as commands through the AgentManager.
  • The AgentManager then runs the command as a python script that accepts the command type and address as input arguments.
  • The execution details are returned to the AgentManager and are further parsed, prepared and returned back to the user as API response.
  • The API response contains the stdoutstderr and exitcode
  • In case of error, the stderr is populated with error details and the stdout is returned as empty and vice-versa.


Example output below using cloudmonkey to test with an SSVM;

Image Added

UI Integration

API has been integrated into the UI and appears in both the hover menu and the tabs menu for both system VMs and the VR.

  • Supported diagnostics type are pre-populated and show up in a drop-down menu.
  • Destination is provided as user input string.
  • Optionla paramas are also provided as user input string.

Example user input form

Image Added


Example output from the above user input;

Image Added