Skip to content

Fix error message for checkVolume command - #8842

Merged
yadvr merged 1 commit into
apache:4.19from
shapeblue:fixup-check-volume-error-msg
Apr 17, 2024
Merged

yadvr merged 1 commit into
apache:4.19from
shapeblue:fixup-check-volume-error-msg

Conversation

@vishesh92

Copy link
Copy Markdown
Member

Description

This PR fixes the error message shown when the checkVolume command fails.
Before:

{
  "accountid": "f7a7493c-ecd7-11ee-a883-1e00a700045b",
  "cmd": "org.apache.cloudstack.api.command.user.volume.CheckAndRepairVolumeCmd",
  "completed": "2024-03-28T10:34:49+0000",
  "created": "2024-03-28T10:34:47+0000",
  "jobid": "6f452658-b61d-4983-9528-87fd4b2f9f29",
  "jobinstanceid": "2090adf0-5889-4299-95ea-e104074d9e9a",
  "jobinstancetype": "Volume",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 530,
    "errortext": "Unexpected exception"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "f7a84e5a-ecd7-11ee-a883-1e00a700045b"
}

After:

{
  "accountid": "f7a7493c-ecd7-11ee-a883-1e00a700045b",
  "cmd": "org.apache.cloudstack.api.command.user.volume.CheckAndRepairVolumeCmd",
  "completed": "2024-03-28T10:34:49+0000",
  "created": "2024-03-28T10:34:47+0000",
  "jobid": "6f452658-b61d-4983-9528-87fd4b2f9f29",
  "jobinstanceid": "2090adf0-5889-4299-95ea-e104074d9e9a",
  "jobinstancetype": "Volume",
  "jobprocstatus": 0,
  "jobresult": {
    "errorcode": 530,
    "errortext": "Unexpected exception: Unable to find Up hosts to run the check volume command"
  },
  "jobresultcode": 530,
  "jobresulttype": "object",
  "jobstatus": 2,
  "userid": "f7a84e5a-ecd7-11ee-a883-1e00a700045b"
}

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)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

How Has This Been Tested?

  1. Disable all hosts
  2. Run checkVolume command on a volume

How did you try to break this feature and the system with this change?

@codecov

codecov Bot commented Mar 28, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 30.99%. Comparing base (6c6023b) to head (9782404).

Files Patch % Lines
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #8842      +/-   ##
============================================
+ Coverage     30.13%   30.99%   +0.85%     
- Complexity    33072    34372    +1300     
============================================
  Files          5355     5355              
  Lines        376690   376691       +1     
  Branches      54815    54815              
============================================
+ Hits         113533   116742    +3209     
+ Misses       248185   244583    -3602     
- Partials      14972    15366     +394     
Flag Coverage Δ
simulator-marvin-tests 24.86% <0.00%> (+1.17%) ⬆️
uitests 4.38% <ø> (ø)
unit-tests 16.57% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9072

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test alma9 kvm-alma9

@DaanHoogland DaanHoogland 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.

clgtm

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-9628)
Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
Total time taken: 58677 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8842-t9628-kvm-alma9.zip
Smoke tests completed. 127 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_arping_in_ssvm Failure 5.25 test_diagnostics.py
test_list_system_vms_metrics_history Failure 0.24 test_metrics_api.py
test_list_vms_metrics_admin Error 11.27 test_metrics_api.py
test_list_vms_metrics_history Error 5.83 test_metrics_api.py
test_list_vms_metrics_user Error 3657.75 test_metrics_api.py

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan test alma9 kvm-alma9

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-9670)
Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
Total time taken: 57606 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8842-t9670-kvm-alma9.zip
Smoke tests completed. 127 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_system_vms_metrics_history Failure 0.27 test_metrics_api.py
test_list_vms_metrics_user Error 3662.61 test_metrics_api.py
test_02_trigger_shutdown Failure 341.72 test_safe_shutdown.py

@vishesh92
vishesh92 marked this pull request as draft April 4, 2024 11:53

@sureshanaparti sureshanaparti 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.

code lgtm

@sureshanaparti sureshanaparti added this to the 4.19.1.0 milestone Apr 5, 2024

@borisstoyanov borisstoyanov 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.

Manually checked, that whenever there is no suitable host to carry out the check the proper error message appears.

@yadvr
yadvr marked this pull request as ready for review April 17, 2024 11:57
@yadvr
yadvr merged commit 8511014 into apache:4.19 Apr 17, 2024
@yadvr
yadvr deleted the fixup-check-volume-error-msg branch April 17, 2024 11:57
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants