forked from juju/juju
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lease manager worker documentation
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2023 Canonical Ltd. | ||
// Licensed under the AGPLv3, see LICENCE file for details. | ||
|
||
// Package lease, also known as the manager, manages the leases used by | ||
// individual Juju workers. | ||
// | ||
// Workers will claim a lease, and they are either attributed (i.e., the workers | ||
// gets the lease ) or blocked (i.e., the worker is waiting for a lease to | ||
// become available). | ||
// In the latter case, the manager will keep track of all the blocked claims. | ||
// When a worker's lease expires or gets revoked, then the manager will | ||
// re-attribute it to one of other workers, thus unblocking them and satisfying | ||
// their claim. | ||
// In the special case where a worker is upgrading an application, it will ask | ||
// the manager to "pin" the lease. This means that the lease will not expire or | ||
// be revoked during the upgrade, and the validity of the lease will get | ||
// refreshed once the upgrade has completed. The overall effect is that the | ||
// application unit does not lose leadership during an upgrade. | ||
package lease |