Skip to content

Fix upload volume format#6297

Merged
nvazquez merged 1 commit intoapache:4.16from
shapeblue:fixuploadvolformatstr
Apr 22, 2022
Merged

Fix upload volume format#6297
nvazquez merged 1 commit intoapache:4.16from
shapeblue:fixuploadvolformatstr

Conversation

@nvazquez
Copy link
Copy Markdown
Contributor

Description

This PR fixes an issue if format is not properly passed in uppercase.

Note: this issue is applicable only to API when format value is lowercase, UI passes the format in uppercase to the uploadVolume API

2022-04-21 19:48:57,569 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-23:ctx-319bdf84 job-425147) (logid:864904bb) Unexpected exception while executing org.apache.cloudstack.api.command.admin.volume.UploadVolumeCmdByAdmin
java.lang.IllegalArgumentException: No enum constant com.cloud.storage.Storage.ImageFormat.ova
	at java.base/java.lang.Enum.valueOf(Enum.java:240)
	at com.cloud.storage.Storage$ImageFormat.valueOf(Storage.java:25)
	at com.cloud.storage.VolumeApiServiceImpl$2.doInTransaction(VolumeApiServiceImpl.java:559)
	at com.cloud.storage.VolumeApiServiceImpl$2.doInTransaction(VolumeApiServiceImpl.java:523)
	at com.cloud.utils.db.Transaction.execute(Transaction.java:40)
	at com.cloud.storage.VolumeApiServiceImpl.persistVolume(VolumeApiServiceImpl.java:523)
	at com.cloud.storage.VolumeApiServiceImpl.uploadVolume(VolumeApiServiceImpl.java:345)
	at com.cloud.storage.VolumeApiServiceImpl.uploadVolume(VolumeApiServiceImpl.java:203)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@nvazquez a 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.

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3263

@nvazquez
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Copy link
Copy Markdown
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@weizhouapache
Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@nvazquez nvazquez closed this Apr 22, 2022
@nvazquez nvazquez reopened this Apr 22, 2022
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-3993)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 31285 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6297-t3993-kvm-centos7.zip
Smoke tests completed. 92 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@nvazquez nvazquez closed this Apr 22, 2022
@nvazquez nvazquez reopened this Apr 22, 2022
@nvazquez nvazquez merged commit 5fa8fa5 into apache:4.16 Apr 22, 2022
yadvr pushed a commit to shapeblue/cloudstack that referenced this pull request May 18, 2022
(cherry picked from commit 5fa8fa5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
yadvr pushed a commit to shapeblue/cloudstack that referenced this pull request May 18, 2022
(cherry picked from commit 5fa8fa5)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
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.

4 participants