Skip to content

flatcar/fleetlock

Flatcar OS Discord Matrix Slack Twitter Follow Mastodon Follow Bluesky OpenSSF Best Practices

Note: To file an issue for any Flatcar repository, please use the central Flatcar issue tracker.

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/


Community & Project Documentation

  • Contributing Guidelines — How to contribute, find issues, and submit pull requests
  • Code of Conduct — Standards for respectful and inclusive community participation
  • Security Policy — How to report vulnerabilities and security-related information
  • Maintainers — Current project maintainers and their responsibilities
  • Governance — Project governance model, decision-making process, and roles

About

Go client implementation of FleetLock procotol

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors