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

runDiagnostics command  is implemented to take the following parameters:

  • uuid: the id of the system VM instance to execute network-utility command from.
  • diagnosticsType: 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;

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
  • stdout: normal standard output information return by the command execution. 
  • stderr: normal standard error output information.
  • exitcode: the remote command execution code.


Example output below using cloudmonkey to test with an SSVM;

...