github.com/juju/juju@v0.0.0-20240327075706-a90865de2538/worker/storageprovisioner/doc.go (about) 1 // Copyright 2022 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 // Package storageprovisioner provides a worker that manages the provisioning 5 // and deprovisioning of storage volumes and filesystems, and attaching them 6 // to and detaching them from machines. 7 // 8 // A storage provisioner worker is run at each model manager, which 9 // manages model-scoped storage such as virtual disk services of the 10 // cloud provider. In addition to this, each machine agent runs a machine- 11 // storage provisioner worker that manages storage scoped to that machine, 12 // such as loop devices, temporary filesystems (tmpfs), and rootfs. 13 // 14 // The storage provisioner worker is comprised of the following major 15 // components: 16 // - a set of watchers for provisioning and attachment events 17 // - a schedule of pending operations 18 // - event-handling code fed by the watcher, that identifies 19 // interesting changes (unprovisioned -> provisioned, etc.), 20 // ensures prerequisites are met (e.g. volume and machine are both 21 // provisioned before attachment is attempted), and populates 22 // operations into the schedule 23 // - operation execution code fed by the schedule, that groups 24 // operations to make bulk calls to storage providers; updates 25 // status; and reschedules operations upon failure 26 package storageprovisioner