Skip to main content

Module disk

Module disk 

Source
Expand description

Root disk sizes under an org’s disk limit (limits.disk).

incus counts every root disk’s size against the limit, refuses to create an instance whose root disk has none, and refuses to set the limit while one has none. isb sizes each instance it creates there itself, in the create request: the spec’s raw_devices.root.size, else DEFAULT_ROOT_SIZE. It never writes a size on the org’s default profile: incus applies a profile’s size to every instance that takes its root disk from the profile, so one there would resize them all.

Functions§

disk_limited
Whether c’s project has limits.disk. An unreadable project counts as none: incus itself refuses what the limit forbids.
sized_root
An instance create body for c’s project: a root disk of its own without a size gets DEFAULT_ROOT_SIZE while the project has a disk limit. Only the request changes, never the spec it came from (a stack’s revision hashes the spec).