fleetlock

command module
v0.0.0-...-aad172c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

README

Flatcar OS Matrix Slack Twitter Follow Mastodon Follow Bluesky

FleetLock client

Go Reference Go

Go implementation of FleetLock protocol.

Example

It's possible to run a local FleetLock server backed by etcd using airlock:

$ cd examples
$ docker-compose up -d

There is only one slot for the controllers group:

$ fleetlockctl --url http://127.0.0.1:3333 --group controllers --id $(cat /etc/machine-id) recursive-lock

On the airlock side:

DEBU[0117] processing client pre-reboot request          group=controllers id=41987...
DEBU[0117] givin green-flag to pre-reboot request        group=controllers id=41987...

It's not possible to get another lock, since there is only one slot:

$ fleetlockctl --url http://127.0.0.1:3333 --group controllers --id another-machine recursive-lock
Error: locking: fleetlock error: all 1 semaphore slots currently locked (failed_lock)

It's possible to release the lock:

./fleetlockctl --url http://127.0.0.1:3333 --group controllers --id $(cat /etc/machine-id) unlock-if-held

another-machine can now request a lock:

$ fleetlockctl --url http://127.0.0.1:3333 --group controllers --id another-machine recursive-lock

On the airlock side:

DEBU[0366] got pre-reboot request
DEBU[0366] processing client pre-reboot request          group=controllers id=another-machine
DEBU[0367] givin green-flag to pre-reboot request        group=controllers id=another-machine

Build

requirements:

  • go in the path
$ make

ref: https://coreos.github.io/zincati/development/fleetlock/protocol/

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd implements fleetlockctl CLI.
Package cmd implements fleetlockctl CLI.
pkg
client
Package client implements FleetLock client.
Package client implements FleetLock client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL