-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add Cloudian HyperStore Object Storage #9748
Add Cloudian HyperStore Object Storage #9748
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9748 +/- ##
============================================
+ Coverage 4.00% 16.24% +12.24%
- Complexity 0 13368 +13368
============================================
Files 396 5672 +5276
Lines 32530 498985 +466455
Branches 5766 60341 +54575
============================================
+ Hits 1302 81059 +79757
- Misses 31078 408891 +377813
- Partials 150 9035 +8885
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for the PR @tpodowd since we don't have the cloudian system to test against, we'll help with regression testing. @blueorangutan test |
Hi @rohityadavcloud - I updated the PR to fix the README.md lint issue and also added a bit more unit test coverage in the main driver code. You mentioned the following:
Thanks, let me know what information you need and I'll do my best to get back to you. |
Hi @DaanHoogland - I think I have got the pre-commit stuff nailed now. I ran pre-commit locally and it fixed the end of files for me. Then I reviewed that and pushed commit 40c0366 |
Sorry. I was reviewing the beautiful code coverage report and reviewing code I had not tested when I noticed a bad typo that means |
Ok. Hopefully that is it. I have pre-commit hooked in now also so I know that is clean. Code coverage should be a little better again also. |
Hi @DaanHoogland / @rohityadavcloud - There seems to be an error in one of the checks. I'm not sure that it is related to my changes though. Let me know if I need to do anything about it. Thanks! |
rerunning, let's see. It doesn't seem related to me either. |
I realised that I should not change the key names that the Object Store Details use as they may be read/updated outside of the plugin. Thanks! |
...ntegrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/client/CloudianClient.java
Outdated
Show resolved
Hide resolved
...ntegrations/cloudian/src/main/java/org/apache/cloudstack/cloudian/client/CloudianClient.java
Outdated
Show resolved
Hide resolved
.../org/apache/cloudstack/storage/datastore/driver/CloudianHyperStoreObjectStoreDriverImpl.java
Outdated
Show resolved
Hide resolved
.../org/apache/cloudstack/storage/datastore/driver/CloudianHyperStoreObjectStoreDriverImpl.java
Outdated
Show resolved
Hide resolved
.../org/apache/cloudstack/storage/datastore/driver/CloudianHyperStoreObjectStoreDriverImpl.java
Outdated
Show resolved
Hide resolved
...udian/src/main/java/org/apache/cloudstack/storage/datastore/util/CloudianHyperStoreUtil.java
Outdated
Show resolved
Hide resolved
...udian/src/main/java/org/apache/cloudstack/storage/datastore/util/CloudianHyperStoreUtil.java
Outdated
Show resolved
Hide resolved
Hi @JoaoJandre - I have pushed another commit to address your review comments. Thanks for your time and let me know if you have any other concerns or questions. |
@tpodowd I did my best with no knowledge of Cloudian 😄 . In any case, overall it looks good to me. There is only one thing (#9748 (comment)) left that I think should be addressed. |
Hi @JoaoJandre - No worries. Thank you so much again for your time on this. I have addressed your last comment and have pushed an update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, did not test it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, one organisational issue though
Hi @tpodowd, |
Hi @abh1sar - Thanks for your comment/question.
Yes, Cloudian HyperStore does not currently support a bucket storage quota.
Yes, Cloudian HyperStore does support per user quota. We have a warning level and a hard limit for storage bytes and we also have some other related settings.
Unfortunately not. There are some issues here:
Currently, the administrator would have to login to the HyperStore system and either:
|
Thanks @tpodowd for your response. |
Hi @abh1sar. The current plugin does not have any API support itself for setting Account level QoS (as it only implements the provided plugin APIs). The HyperStore Admin API itself does support setting QoS for a user though so that could be made available to CloudStack if it was implemented in CloudianClient (which is easy enough). If I know more about what you are doing, I guess I can also chip in. FYI. I have another PR pending this one also which adds the ability to edit the Object Store details. |
Hi @DaanHoogland @rohityadavcloud - Any update on when this PR is likely to be merged? |
Hi @abh1sar, ok. I will allocate some time to look at this in the coming days. As I mentioned before, we don't have a bucket level quota setting. We do have a User level QoS setting. I think the only thing that I can do currently is to set the User (that owns the bucket) QoS settings to the limit specified in the create bucket request. An example might be as below:
When any adjustment happens to the user's quota, all of the HyperStore buckets owned by that account need to get their quota settings updated in the DB to correctly represent the latest user's quota setting. This is currently all we can do I think. If we document it, it should not be too hard to understand for the admin. Does this sounds ok? I think plugin wise, the plugin currently does not update information about different bucket(s) when processing a request for a certain bucket, so I will need to figure out how best to do that. I do think it is easier for the administrator to understand the implementation and understand what the quota is set to though if it is done this way. |
- The timeout parameter was using the port so instead of timing out in 10 seconds, it was using 19443 seconds. - Added tests to use real connections instead of mocking and added line tests to try catch other issues. - Noticed that HyperStore and AWS IAM services use return different errorcodes. This will be fixed in HyperStore so handle both errorcodes.
- The Store details are maintained outside of the plugin so it is best to save them using their original key names.
- error out of getUserBucketUsages() if bucket param is set but userid is not - added unit tests for the same. - split some copy/paste code into a new function - added unit tests for new function which required moving the test to the right package to test a protected function. - use the base class logger - misc tidy ups.
- created new deleteIAMCredential() function.
The CloudStack UI and API now require a quota setting to be configured on all buckets. HyperStore does not support a bucket quota limit setting. As a work around, this commit allows a quota setting of 0 to indicate there is no quota limit. Any other non-zero value will cause the quota setting to fail. HyperStore may add a bucket quota limit setting in a future version at which time we will address this further. Additionally fix pom to update version
f2a0120
to
01be768
Compare
We discussed this internally. HyperStore does not currently support Bucket Quota limits. We have added an internal feature request for this which we may implement in a future HyperStore release. At such time, we will re-address and update the CloudStack HyperStore plugin bucket quota functionality. As the CloudStack UI and API currently both require a quota setting, we decided to allow the user to specify a value of 0 as the quota. The 0 quota will indicate no quota restriction for the bucket. I rebased this branch on top of the latest main branch.
I built everything cleanly and tested adding a bucket successfully using a quota of 0. I also confirmed the error case worked with any other quota value and that UI shows the user the exception message to help them choose the 0 value. Please let me know if you have any questions or comments. |
@blueorangutan package |
@DaanHoogland 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. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 12577 |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 12584 |
LGTM |
thanks @tpodowd , this means you are done with this PR, for now? (so we run regression tests and merge ..) |
Hi @DaanHoogland - yes. I am done with this particular PR so it would be great to move forward. Thanks! |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12598 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-12506)
|
Hi @DaanHoogland - I saw you closed this and re-opened it but since it is not merged yet I was wondering if there is anything holding it up? I've another PR waiting for this one to be merged which adds editing of the Object Storage settings. |
No, except maybe a 3rd party test report. But as this is an integration of 3rd party components we are lenient in that perspect, so I'm merging. Usually we ask that somene else than the contributer has tested and fed back their findings. |
Thanks for the explanation and for merging @DaanHoogland. |
Description
This PR Adds A New Object Storage Provider Plugin for Cloudian HyperStore
More Details:
UI Changes - Add Object Storage for Cloudian HyperStore:
Other Bug fixes and improvements as part of this fix I kept in separate commits.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?