question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run-command invoke doesn't produce correct error/status fields

See original GitHub issue

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug az vm run-command invoke reports success even though command execution failed

To Reproduce Execute az vm run-command invoke --ids SOMEID --command-id RunShellScript --scripts “exit 123” or any other command that would fail

Expected behavior Status should be failed (or error)

Environment summary

$ az --version
azure-cli (2.0.38)

Additional context Whatever command I try to run on a Linux VM the error output field is always null and status field successed The logs on the VM report that the program was terminated with the expected error exit status. The message field from az cli output correctly reports the error but I’d expect the that either success or error fields would report the same.

Here’s an example output from a command that doesn’t exist on the system:

{
  "endTime": "2020-07-20T14:45:16.478019+00:00",
  "error": null,
  "name": "807c0bd6-8810-46ff-97f0-d56d6af52fa6",
  "output": [
    {
      "code": "ProvisioningState/succeeded",
      "displayStatus": "Provisioning succeeded",
      "level": "Info",
      "message": "Enable succeeded: \n[stdout]\n\n[stderr]\n/var/lib/waagent/run-command/download/86/script.sh: line 1: asdasd: command not found\n"
    }
  ],
  "startTime": "2020-07-20T14:44:42.274790+00:00",
  "status": "Succeeded"
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
axayjocommented, Feb 4, 2021

Closing this issue and tracking this as a feature request on feedback.azure.com. If you’d like to request this feature, please go to this link and upvote it: https://feedback.azure.com/forums/34192--general-feedback/suggestions/42627826-ensure-run-command-invoke-produces-correct-error-s

Read more comments on GitHub >

github_iconTop Results From Across the Web

No response on "Run Command" option on Azure VM and ...
Status and logs says that script executed successfully but some how invoke-az* command gets stuck. Tried to find Azure VM logs from portal...
Read more >
SIL and PIL Limitations - MATLAB & Simulink - MathWorks
The following sections describe modeling and code generation features that are either unsupported or partially supported by SIL and PIL simulations.
Read more >
Bug List
581111, JGit, JGit, jgit.core-inbox, NEW, ---, Cloning JGit does not work from Eclipse but from the command line, Wed 08:36.
Read more >
CA Ideal for CA Datacom Programming Guide
The right to print or otherwise make available copies of the ... CA Ideal does not support binary fields other than half word...
Read more >
Supplemental Document: BIG-IP 15.1.3 Fixes and Known Issues
745465-4, 4-Minor, The tcpdump file does not provide the correct extension ... Create parent policy using tmsh or REST call. Fix:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found