Open stgraber opened 1 month ago
I'd like to work on this issue!
Cool, I assigned it to you!
Sorry about the delay, but from what I understand I'll have to update projectConfigKeys
for func projectValidateConfig
in api_project.go
with an additional field for limits.disk.pool.type
but am not sure where the actual limit on the pool gets configured and set after that.
I saw that the function gets called as part of func projectPost
:
but that seems to just create an entry in the database. Is there something else that needs to be done outside of that?
Sorry for the delay here.
Note that the key is really meant to be limits.disk.pool.NAME
so not a static config key name as the pool name will be part of it.
You're correct that the main spot where this needs to be added is in projectValidateConfig
.
That will allow you to set it through incus project set
.
The actual enforcement however is done in internal/server/project/permissions.go
where you'll want to look where current limits.disk
is checked and add the equivalent per-pool checking.
@awalvie any luck with this one?
Sorry about the delay here @stgraber, was away on vacation the last couple weeks. I'll start working on this shortly. But if its blocking a release please feel free to remove me as the assignee. I'll send a message to get the issue assigned again if no one has picked it up!
Nope, no rush, was just wondering. I hope you had a good vacation!
Sorry about the leave of absence again, I was out of town again, attending a conference. I'll be working on this, this week!
sounds great, thanks!
The current
limits.disk
resource limit on projects only allows restricting the overall disk footprint, this is fine in many environments but for those of us with clusters having different class of storage, like:Having all storage treated equal isn't ideal and so having per-pool limits would be preferable.
The easiest way would be to not only have
limits.disk
but alsolimits.disk.pool.XYZ
whereXYZ
in this case would be one ofhdd
,local
,shared
orssd
.A limit of
0
would prevent the use for a storage pool entirely and should result in its exclusion fromincus storage list
for that project.