Repository navigation
feat(incus): resize pools, volumes and root disks, and set pool settings - #62
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Until now berth could not change an Incus storage pool, volume or root disk after it was made. The Incus provisioners now have these actions:
resize-poolgrows a loop-backed btrfs, zfs or lvm pool. It refuses a dir pool, a pool on a device or dataset given when it was made, a smaller size (Incus never shrinks a pool), and a server withoutstorage_pool_loop_resize. The job shows size and free space before and after.set-poolchanges one pool setting from an allow-list of keys Incus takes after creation (description,volume.size,volume.snapshots.*, plus rsync.* for dir,btrfs.mount_options,zfs.clone_copy/zfs.export). An empty value unsets the key. Unknown keys are refused with the list of known ones.resize-volumeresizes a custom volume. Block volumes only grow.resize-diskgrows an instance's root disk. If the disk comes from a profile, the instance gets its own copy with the new size. A running VM is restarted only withrestart=yes.poolsis now a table with driver, source, size, used, free and whether the pool can grow.Sizes are checked against the units Incus accepts before any request goes out.
changenow grows the disk only whendiskis inchanged. Without that, it would set a disk grown byresize-diskback to the size in berth's record.Behaviour follows the Incus 6.0 LTS docs (storage pools and volumes how-tos, the driver pages, units, API extensions). It is tested against the fake Incus in
tests/test_incus_plugin.pyonly, not against a real server.