Skip to main content
Version: 0.17.0

Updating and removal

An update is four ordinary operations, not a verb, so that nothing decides on anybody's behalf when to become unable to go back.

StepVerbWhat changes
1yoke app install <package>a new version exists beside the old one. Nothing runs it
2yoke instance copy <name> <path>a copy of the state as the old version left it, stamped with that version
3yoke instance set-version <name> <version>one field of the record
4yoke instance restart <name>the desired state, then a reconciliation by the guardian
5yoke app prune [<id>]the superseded version goes, once nothing points at it

Which version an instance runs is a field of its record. Installing changes nothing about what comes up at the next power cycle, and says so.

Rolling back​

A rollback is the same sequence with the versions exchanged, available while the older version is installed.

  • The older version's declared data range decides whether it is possible. The instance's state is stamped with the version that last wrote it; a stamp outside the range is refused, naming both versions.
  • The refusal comes twice: from yoke instance set-version, while somebody is at the keyboard, and from the gate before every start, which is the authority.
  • A refused rollback is answered by the copy taken at step 2: restored into the same instance, it puts the older code in front of state it can read, at the cost of whatever accumulated since.

Removing​

VerbRemovesRefused when
yoke instance clear <name>the state; the instance stays declaredthe instance is not stopped
yoke instance remove <name>the record and the state togetherthe instance is not stopped
yoke app remove <id> [--version <v>]bundles and their install recordsany record still points at a version being removed, stopped or running
  • Re-point first. A record naming a version that is gone could not be satisfied at the next boot.
  • A removal that proceeds writes withdrawn first, so no instance can be pinned to the version between the check and the deletion.
  • None of the three touches images.

Reclaiming​

yoke app prune [<id>]

There is one reclaiming verb. It names what it removed; an argument narrows it to one application.

It collectsOn what condition
superseded versionsa higher version that is not a pre-release is installed, and no record points at this one
pre-releasesnever — only an explicit yoke app remove takes one
the remains of an install that never completedits record says incomplete
imagesYoke obtained them, and no installed bundle references them
an ephemeral record a failed run leftthe run failed and the record is still there
the runtime directory of an instance that is not runningits claim is free
  • Only images tagged under yoke/ are considered — yoke/<id>/<unit>:<version>, one tag for each unit an image runs, and every image of a version alike. The tag is removed first and the image after, which the engine declines while anything else refers to it. An image whose tag is gone is left alone.
  • A pass that cannot reach the engine reclaims everything else and leaves every image, saying so. It is not a failure: each image keeps its tag, and the next pass that reaches the engine finds it.