Skip to content

Conversation

@QuanMPhm
Copy link
Contributor

@QuanMPhm QuanMPhm commented Aug 6, 2025

Closes #231. Depends on #202. This PR consists of the last commit.

@QuanMPhm QuanMPhm requested review from knikolla and naved001 August 6, 2025 14:40
@knikolla
Copy link
Collaborator

knikolla commented Aug 6, 2025

I think it makes sense to have an attribute on the resource called IS_IBM_STORAGE_AVAILABLE and only apply the above attributes to a project if the value on the attribute of the Resource is True. Otherwise OpenShift clusters that don't have IBM storage are going to see the quota in their dashboards.

@QuanMPhm
Copy link
Contributor Author

QuanMPhm commented Aug 7, 2025

@knikolla @joachimweyl @naved001 I have two main questions:

  • Because we are introducing a new allocation attribute, what should be the default behavior if a coldfront allocation does not already have the ibm storage quota attribute? Should it be set to 0 storage?
  • For newly made allocations, what should be the static and multiplier amount for IBM storage. Basically, what goes here?

@joachimweyl
Copy link

I would say yes to setting IBM coldfront value to 0
I would say we set the newly made alocations should also have this set to 0. The only time this is not zero is when they manually request it.

@QuanMPhm
Copy link
Contributor Author

@knikolla @naved001 This PR is now ready for review

Copy link
Contributor

@naved001 naved001 left a comment

Choose a reason for hiding this comment

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

requests.storage will that be migrated and become ocs-external-storagecluster-ceph-rbd.storageclass.storage.k8s.io/requests.storage for all the old allocations?

@QuanMPhm QuanMPhm force-pushed the 231/ibm_storage_attr branch 3 times, most recently from 40229e4 to 9fb38e3 Compare August 13, 2025 14:15
@QuanMPhm
Copy link
Contributor Author

requests.storage will that be migrated and become ocs-external-storagecluster-ceph-rbd.storageclass.storage.k8s.io/requests.storage for all the old allocations?

@naved001 Sorry for being late to answer your question. Yes. I've updated register_cloud_attributes.py so that running the command will migrate the NESE storage attribute. As for the IBM storage attribute, once we enable IBM storage on the NERC-OCP resource, running validate_alloacations.py should automatically add the IBM attribute to all pre-existing NERC-OCP allocations.

I've addressed all your comments so far.

@QuanMPhm QuanMPhm requested a review from naved001 August 14, 2025 13:57
@QuanMPhm QuanMPhm force-pushed the 231/ibm_storage_attr branch from 9fb38e3 to 28bd32c Compare August 14, 2025 19:01
@joachimweyl
Copy link

@QuanMPhm are all of the comments resolved? With @knikolla out do you have someone else you wish to review, or can we merge with @naved001's approval?

@QuanMPhm QuanMPhm requested a review from jtriley August 19, 2025 15:31
@QuanMPhm
Copy link
Contributor Author

@joachimweyl I assume @knikolla will have at least some opinion about the direction of this PR. I am fine waiting for him to come back from PTO.

Copy link
Collaborator

@knikolla knikolla left a comment

Choose a reason for hiding this comment

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

One comment, otherwise looks good! Great job!

@QuanMPhm QuanMPhm force-pushed the 231/ibm_storage_attr branch from 9406cdd to d1a4b3f Compare August 27, 2025 17:15
@QuanMPhm
Copy link
Contributor Author

@knikolla The comparison is now case-insensitive

@QuanMPhm QuanMPhm requested a review from knikolla August 27, 2025 17:19
@knikolla
Copy link
Collaborator

@QuanMPhm fails testing on allocator.resource.get_attribute(attributes.RESOURCE_IBM_AVAILABLE).lower() not working for None values.

The addition of IBM Scale storage to OpenShift resources has several implications:

- A pre-existing Openshift attribute, `QUOTA_REQUESTS_STORAGE`,
was renamed to include "NESE" in its name to avoid confusion
with the new IBM storage attribute.
- OpenShift resources now have a new attribute `IBM Spectrum Scale
Storage Available` ("true" or "false") to indicate IBM Scale storage
availability. If "true", new and pre-existing allocations will have
a new attribute to indicate IBM storage quota, which defaults to 0 Gb.
- Openshift quota key for NESE storage is now
`ocs-external-storagecluster-ceph-rbd.storageclass.storage.k8s.io/requests.storage`

For now, IBM storage quota is free and not included in the storage invoice.
@QuanMPhm QuanMPhm force-pushed the 231/ibm_storage_attr branch from d1a4b3f to f4529a1 Compare August 27, 2025 17:40
@QuanMPhm
Copy link
Contributor Author

QuanMPhm commented Aug 27, 2025

@knikolla CI failure has been resolved. I didn't realized get_attribute could return None

@knikolla knikolla merged commit eb4ab58 into nerc-project:main Aug 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create new allocation attribute for Openshift resources for IBM Scale storage and have it used by openshift.py

4 participants