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

Device Disk #6133

Merged
merged 37 commits into from Sep 5, 2019

Conversation

@tomponline
Copy link
Member

commented Aug 29, 2019

Migration of disk device into the new device interface.

Adds following behaviour changes:

  • Host-side mounts for custom volumes are now unmounted after device start (like rootfs is).
  • The optional property has been deprecated and replaced with required property (defaulting to true) to be consistent with other device types. The optional property still works but it has been removed from docs.
  • Adds new CGroupBlkioWeightController check for limits.disk.priority.
  • If disk limits cannot be applied due to lack of host cgroup controllers then container wont start.

Part of #5819

  • RootFS
  • Custom Volumes
  • I/O limits
  • Live update of limits
  • Size quota limits

@tomponline tomponline force-pushed the tomponline:tp-device-disk branch 17 times, most recently from aac93d0 to 36374f3 Aug 29, 2019

@lxc-jenkins

This comment has been minimized.

Copy link

commented Sep 3, 2019

Testsuite passed

@tomponline tomponline marked this pull request as ready for review Sep 3, 2019

@tomponline tomponline requested a review from stgraber Sep 3, 2019

@tomponline

This comment has been minimized.

Copy link
Member Author

commented Sep 3, 2019

@stgraber in the interests of time, you may want to take a look at this now and then the disk io limits stuff can follow on as a separate PR, as this is getting quite big as it is.

lxd/storage.go Show resolved Hide resolved
lxd/container.go Outdated Show resolved Hide resolved

@tomponline tomponline force-pushed the tomponline:tp-device-disk branch from 36374f3 to c0b0849 Sep 3, 2019

@lxc-jenkins

This comment has been minimized.

Copy link

commented Sep 3, 2019

Testsuite passed

@stgraber

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

Looks good to me, obviously we need to address the deviceConfig branch first, then this one will shrink quite a bit, but looking at those commits which aren't in the deviceConfig branch, things look good.

@tomponline tomponline force-pushed the tomponline:tp-device-disk branch 4 times, most recently from fbe83d0 to 8f601a0 Sep 4, 2019

tomponline added 24 commits Sep 2, 2019
device/proxy: Updates validation to use d.instance.ExpandedDevices()
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
test: Fixes typo in comment
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/none: Adds none device type
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/device: Links up none device type
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/config/devices: Removes DeviceNames() and replaces with Sorted…
…() and Reversed()

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/config/devices/sort: Makes device set sorting exported
Removes Names() as not used.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
doc: Adds required property to disk device type
And removes optional property (although still supported in code for now).

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/unix/common: Clarifies required property logic
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/usb: Clarifies required property logic
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/device/instance/id: Adds LocalDevices() to interface
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
sys: Adds CGroupBlkioWeightController check
limits.disk.priority setting requires that /sys/fs/cgroup/blkio/blkio_weight exists.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
shared/container: Updates IsRootDiskDevice to use same definition of …
…rootfs as container_lxc

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
container/lxc: Uses shared.GetRootDiskDevice for duplicate root devic…
…e detection

Now both start time and update time use the same definition of root device.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/device/utils/unix: Makes unixDeviceAttributes unexported
Now that disk devices have been moved to device package.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/unix/common: Updates use of unixDeviceAttributes
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
devices: Removes disk related functions
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
container/lxc: Further switchover to lxd/device/config Device types
Also enables further removal of reflect based shared.DeepCopy().

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
storage: Adds storageRootFSApplyQuota
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
nic: Updates bridged and p2p types to accomodate new Update signature
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device/device/utils/disk: Links StorageRootFSApplyQuota
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
device: Changes Update() to accept all old devices
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
container/lxc: Supplies all old devices to device Update() function
Allows a device to interrogate all old devices during an update.

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
container/lxc: Removes old moved rootfs quota code
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
container/lxc: Moves device folder creation before device setup durin…
…g boot

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>

@tomponline tomponline force-pushed the tomponline:tp-device-disk branch from a2fb9dd to 935460c Sep 4, 2019

@lxc-jenkins

This comment has been minimized.

Copy link

commented Sep 4, 2019

Testsuite passed

1 similar comment
@lxc-jenkins

This comment has been minimized.

Copy link

commented Sep 4, 2019

Testsuite passed

@stgraber stgraber merged commit 72d8921 into lxc:master Sep 5, 2019

5 checks passed

Branch target Branch target is correct
Details
DCO All commits signed-off
Details
Testsuite Build finished.
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@tomponline tomponline deleted the tomponline:tp-device-disk branch Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.