Skip to content
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

Per-pool project limits (from Incus) #14078

Merged
merged 11 commits into from
Sep 12, 2024

Conversation

MggMuggins
Copy link
Contributor

@MggMuggins MggMuggins commented Sep 9, 2024

Implements limits.disk.pool.POOLNAME config key on projects. When set, the key prevents a project using more than the configured amount of space within that pool.

When limits.disk.pool.POOLNAME: 0, the pool is excluded from lxc storage list in that project.

Contains cherry-picks from lxc/incus#1098

Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit adf17104edf5c87bb760a00fa97112f316f899a0)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 3c5bf91e1bad1e2e5606c696656ee25cf5fcdcb0)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 0ef36a6e786ad1dcf368135291db3cbad003c84a)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 6a099288b3502c4456a682e4dc8e7d7c03e07fe1)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Closes lxc/incus#906

Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit febce0851933037db19ebc7a26bf9982a1be4c84)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit e2df60ba28b599d4d6d1df5dfe88a5c0d6c5652b)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 80f0ceacf42c8b61b28d6f5f304dd4059927a801)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit 8d846de3beef3c78161b417cc78a304522ff0b75)
Signed-off-by: Wesley Hershberger <[email protected]>
License: Apache-2.0
@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Sep 9, 2024
Copy link

github-actions bot commented Sep 9, 2024

Heads up @mionaalex - the "Documentation" label was applied to this issue.

@MggMuggins MggMuggins changed the title Per pool project limits Per pool project limits (From Incus) Sep 9, 2024
@MggMuggins MggMuggins changed the title Per pool project limits (From Incus) Per-pool project limits (From Incus) Sep 9, 2024
@MggMuggins MggMuggins marked this pull request as ready for review September 9, 2024 22:43
@simondeziel simondeziel changed the title Per-pool project limits (From Incus) Per-pool project limits (from Incus) Sep 10, 2024
doc/api-extensions.md Outdated Show resolved Hide resolved
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

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

Ta!

@tomponline tomponline merged commit 5eecce6 into canonical:main Sep 12, 2024
29 checks passed
@MggMuggins MggMuggins deleted the per-pool-project-limits branch September 12, 2024 14:19
tomponline added a commit that referenced this pull request Sep 13, 2024
From lxc/incus#1109.

After #14078 got merged the
following error started to appear on MicroCloud when forming clusters: `
Error: System "micro02" failed to join the cluster: Failed to update
cluster status of services: Failed to join "LXD" cluster: Failed to
configure cluster: Failed to initialize member: Failed to initialize
storage pools and networks: Failed to update local member project
"default": Failed loading storage pool names: Storage pool(s) not found`

The DB`s `GetStoragePoolNames()` returns 404 in case of no storage
pools. This has to be checked explicitly otherwise the error is returned
back to the caller.
@MusicDin
Copy link
Member

Bit late, but should limits.disk.pool.<storage-pool> option be documented in Project Limits?

Maybe at least under limits.disk if a separate option is not desired?

@tomponline
Copy link
Member

Good spot @MusicDin !

@MggMuggins please can you open a follow up PR, thanks.

MggMuggins added a commit to MggMuggins/lxd that referenced this pull request Sep 16, 2024
RE canonical#14078 (comment)

Incus must have changed their metadata tool's syntax slightly.

Signed-off-by: Wesley Hershberger <[email protected]>
tomponline added a commit that referenced this pull request Sep 17, 2024
RE #14078 (comment)

I guess we changed the metadata tool's syntax slightly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes to the REST API Documentation Documentation needs updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants