Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI tools does not report API connection error when JSON output is enabled #6509

Closed
3 tasks done
atodorov-storpool opened this issue Feb 22, 2024 · 0 comments · Fixed by OpenNebula/docs#2865 or OpenNebula/docs#2866
Closed
3 tasks done

Comments

@atodorov-storpool
Copy link
Contributor

atodorov-storpool commented Feb 22, 2024

Description

CLI tools should have consistency in error reporting.

$ onehook list ; echo $?
Failed to open TCP connection to localhost:2633 (Connection refused - connect(2) for "localhost" port 2633)
255

$ onehook list --xml ; echo $?
Failed to open TCP connection to localhost:2633 (Connection refused - connect(2) for "localhost" port 2633)
255

$ onehook list --json ; echo $?
0

To Reproduce

  • stop the opennebula service
  • issue a cli tool with --json argument
  • no output, no error message and exit code '0'

Expected behavior
An error message should be displayed and an exit code should be set

Details

  • Affected Component: [cli]
  • Hypervisor: [KVM]
  • Version: [6.4.4]

Additional context

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@tinova tinova added this to the Release 6.8.3 milestone Feb 29, 2024
dgarcia18 added a commit to dgarcia18/docs that referenced this issue Mar 4, 2024
…YAML output

Signed-off-by: Daniel <dgarcia@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue Mar 4, 2024
for JSON and YAML output

Signed-off-by: Daniel <dgarcia@opennebula.io>
dgarcia18 added a commit to dgarcia18/docs that referenced this issue Mar 5, 2024
…YAML output

Signed-off-by: Daniel <dgarcia@opennebula.io>
tinova pushed a commit to OpenNebula/docs that referenced this issue Mar 5, 2024
for JSON and YAML output

Signed-off-by: Daniel <dgarcia@opennebula.io>
@tinova tinova closed this as completed Mar 5, 2024
@tinova tinova reopened this Mar 5, 2024
@tinova tinova closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment