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

Prevent custom block volume sharing #13183

Commits on Jul 8, 2024

  1. api: Add shared_custom_block_volumes API extension

    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit b8d3d735dffe6c587ed0b8965288122f63dfc108)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    70d8d2e View commit details
    Browse the repository at this point in the history
  2. lxd/device/config: Fix return values of Update function

    The `Update` function returns `map[string]Device` values despite there
    being a `Devices` type which is the same thing.
    
    This commit changes the return types to be `Devices` instead.
    
    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit 6fff607f8462237843a590751d7afcb38335e3f4)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    c48ce5a View commit details
    Browse the repository at this point in the history
  3. lxd: Rename ErrInstanceListStop to ErrListStop

    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    a295e4f View commit details
    Browse the repository at this point in the history
  4. lxd/device: Validate shared block devices

    This validates shared custom block volumes. Such volumes can be attached
    to profiles only if `security.shared` is `true`. Also, they can only be
    attached to more than one instance if `security.shared` is `true`.
    
    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit 78315b5d6d8b1783604b482dec5c210767597098)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    43a1a55 View commit details
    Browse the repository at this point in the history
  5. lxd/storage: Handle security.shared update

    This handles the `security.shared` config key update. If a shared custom
    storage block volume is attached to a profile, this volume cannot be
    un-shared. Furthermore, if such a volume is attached to more than one
    instance, it also cannot be un-shared.
    
    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit 29b45bb029d3a447e80a3e6f20e19658183ffb36)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    cceef37 View commit details
    Browse the repository at this point in the history
  6. lxd/storage: Allow security.shared key for custom block volumes

    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit 6e4e6b6b2061ad719ec576ee143e20f1b208b411)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    40a1293 View commit details
    Browse the repository at this point in the history
  7. lxd/storage/drivers: Handle security.shared in fillVolumeConfig

    Signed-off-by: Thomas Hipp <[email protected]>
    (cherry picked from commit 606b833d1a67a3d8bc3e7cec032889c372229242)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    monstermunchkin authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    07d06aa View commit details
    Browse the repository at this point in the history
  8. lxd/device/disk: Fix incorrect block volume usage

    Signed-off-by: Stéphane Graber <[email protected]>
    (cherry picked from commit 32a4beecbf8098fdbb15ef5f36088956922630f7)
    Signed-off-by: hamistao <[email protected]>
    License: Apache-2.0
    stgraber authored and hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    fb1cbbd View commit details
    Browse the repository at this point in the history
  9. lxd/device: Update confusing error message

    This check is not for when the path property is missing, but to check if
    a device that is not a root disk (and therefore its path is different
    from '/') has a source property defined
    
    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    1465885 View commit details
    Browse the repository at this point in the history
  10. lxd/storage: Add comments for metadata generation

    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    362734e View commit details
    Browse the repository at this point in the history
  11. metadata: Add references to security.shared

    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    3fd9768 View commit details
    Browse the repository at this point in the history
  12. test: Add test for adding block volumes to profile

    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    090c35a View commit details
    Browse the repository at this point in the history
  13. doc: Update block volume usage

    Signed-off-by: hamistao <[email protected]>
    hamistao committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    911b153 View commit details
    Browse the repository at this point in the history