{"id":22475458,"url":"https://github.com/philips/focaccia","last_synced_at":"2025-03-27T17:27:28.680Z","repository":{"id":16002876,"uuid":"18746207","full_name":"philips/focaccia","owner":"philips","description":"a reboot manager using etcd","archived":false,"fork":false,"pushed_at":"2014-05-02T00:16:11.000Z","size":424,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T20:31:37.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"todddickerson/omniauth-stripe-connect","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/philips.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-14T02:41:30.000Z","updated_at":"2019-10-11T16:33:46.000Z","dependencies_parsed_at":"2022-08-30T08:24:34.595Z","dependency_job_id":null,"html_url":"https://github.com/philips/focaccia","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips%2Ffocaccia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips%2Ffocaccia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips%2Ffocaccia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips%2Ffocaccia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips","download_url":"https://codeload.github.com/philips/focaccia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245891421,"owners_count":20689329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T13:17:17.618Z","updated_at":"2025-03-27T17:27:28.654Z","avatar_url":"https://github.com/philips.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rebootlockd\n\nrebootlockd is a reboot manager for the CoreOS update engine which uses\netcd to ensure that only a subset of a cluster of machines is rebooting\nat any given time.\n\n## Usage\n\n### Listing the Holders\n\n```\n$ rebootlockctl status\nAvailable: 0\nMax: 1\n\nMACHINE ID\n69d27b356a94476da859461d3a3bc6fd\n```\n\n### Unlock Holders\n\nIn some cases a machine may go away permanently or semi-permanently while\nholding a reboot lock. A system administrator can clear this lock using the\nunlock command.\n\n```\n$ rebootlockctl unlock 69d27b356a94476da859461d3a3bc6fd\n```\n\n### Maximum Sempahore\n\nBy default the reboot lock only allows a single holder. However, a user may\nwant more than a single machine to be upgrading at a time. This can be done by\nincreasing the semaphore count.\n\n```\n$ rebootlockctl set-max 4\nOld: 1\nNew: 4\n```\n\n## Keyspace\n\n### Semaphore\n\nKey: `coreos.com/updateengine/rebootlock/semaphore`\n\nThe semaphore is a json document that describes a simple semaphore that clients\nswap to take the lock. When it is first created it will be initialized like so:\n\n```json\n{\n\t\"semaphore\": 1,\n\t\"max\": 1,\n\t\"holders\": []\n}\n```\n\nTo take the lock a client the document will be swaped with this:\n\n```json\n{\n\t\"semaphore\": 0,\n\t\"max\": 1,\n\t\"holders\": [\n\t\t\"69d27b356a94476da859461d3a3bc6fd\"\n\t]\n}\n```\n\n### Holders Directory\n\nKey: `coreos.com/updateengine/rebootlock/holders/\u003cmachineID\u003e`\n\n\nWhen a rebootlock client takes the lock it should write information about\nitself to the holders directory. This should be a JSON document with the\nfollowing information:\n\n```json\n{\n\t\"machineID\": \"69d27b356a94476da859461d3a3bc6fd\",\n\t\"startTime\": 1397496396\n}\n```\n\nThis information is used to show an admin who is holding the semaphore and to\nresolve problems. The holder must delete themselves with a swap operation\nbefore incrementing the semaphore. This lets an administrator safely clear a\nreboot lock for a client that experienced a power outage or other failure\nbefore being able to release the lock.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips%2Ffocaccia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips%2Ffocaccia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips%2Ffocaccia/lists"}