{"id":23657755,"url":"https://github.com/smok-serwis/zookeeper-volume","last_synced_at":"2026-04-29T22:32:18.789Z","repository":{"id":121196969,"uuid":"365327185","full_name":"smok-serwis/zookeeper-volume","owner":"smok-serwis","description":"A Docker volume plugin to mount a ZooKeeper tree as a filesystem","archived":false,"fork":false,"pushed_at":"2021-08-05T16:09:53.000Z","size":192,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-20T10:11:34.350Z","etag":null,"topics":["docker","docker-plugin","plugin","volume","zookeeper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smok-serwis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-07T18:56:32.000Z","updated_at":"2025-03-17T17:23:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"8490a1fc-6ff1-4cfb-91bb-31120a25bc90","html_url":"https://github.com/smok-serwis/zookeeper-volume","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/smok-serwis/zookeeper-volume","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smok-serwis%2Fzookeeper-volume","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smok-serwis%2Fzookeeper-volume/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smok-serwis%2Fzookeeper-volume/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smok-serwis%2Fzookeeper-volume/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smok-serwis","download_url":"https://codeload.github.com/smok-serwis/zookeeper-volume/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smok-serwis%2Fzookeeper-volume/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32446573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"ssl_error","status_checked_at":"2026-04-29T22:10:49.234Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","docker-plugin","plugin","volume","zookeeper"],"created_at":"2024-12-28T21:57:31.068Z","updated_at":"2026-04-29T22:32:18.783Z","avatar_url":"https://github.com/smok-serwis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smokserwis/zookeeper-volume\n[![docker hub plugin](https://img.shields.io/badge/docker%20hub%20plugin-1.8-green)](https://hub.docker.com/r/smokserwis/zookeeper-volume)\n[![Maintainability](https://api.codeclimate.com/v1/badges/a60480b7e2fe114fd794/maintainability)](https://codeclimate.com/github/smok-serwis/zookeeper-volume/maintainability)\n[![source at github](https://img.shields.io/badge/github-available-green)](https://github.com/smok-serwis/zookeeper-volume)\n\nA Docker volume as a ZooKeeper tree volume plugin\n\n# Installation\n\nTo install just type:\n\n```bash\ndocker plugin install smokserwis/zookeeper-volume\ndocker plugin enable smokserwis/zookeeper-volume\n```\n\nNote that if you keep your Docker root in other place than\n`/var/lib/docker`, best install from source, before which \nchange the path in `config.json`, or alternatively symlink this location to your target.\n\nIf you logs are stored somewhere else than `/var/log`, you best\ndo it too. Or symlink, it's your choice.\n\n## Building from source\n\nJust check this repo out on a normal UNIX platform (sorry, only UNIXes supported for the time being)\nand invoke `build.sh`.\n`build.sh` will automatically install and enable the plugin.\n\nIf you set the env `DEBUG` during `build.sh`'s run,\ndebugging mode will be enabled on the plugin. You can later change it.\n\n## Debugging\n\nTo enable debug logs just type:\n\n```bash\ndocker plugin set smokserwis/zookeeper-volume DEBUG=1\n```\n\nThey will be dumped at `/var/log/daemon.log` or the usual place where your Docker drops it's logs.\nNote that setting the env `DEBUG` during a run of `build.sh` will\nautomatically set the variable to 1.\nThe variable is kept at default 0 in `config.json`.\n\nNote that the output from zookeeper-fuse is in:\n \n* non-debug cases redirected to /dev/null.\n* in debug cases it will be redirected to \n  `/var/log/zookeeper-volume/volumename.stdout.txt` and\n  `/var/log/zookeeper-volume/volumename.stderr.txt`\n\n# Usage\n\nTo define a volume just type\n\n```bash\ndocker volume create -d smokserwis/zookeeper-volume -ohosts=192.168.2.237:2181 -opath=/zk-child zookeeper\n```\n\nThe thing that you provide in `hosts` option is a ZooKeeper connection string.\nThis is the lists of hosts with ports separated with a comma.\nAs so, it is mandatory to provide port number.\n\n## Creating volumes\n\nVolume must have at least a single option:\n\n* either `host` for an address and a port name` \n  or `hosts` for multiple of those, separated by a `,`\n\nOther options can be optionally given:\n\n* `path`: zookeeper path to mount as root\n* `mode`: [zookeeper-fuse](https://github.com/smok-serwis/zookeeper-fuse/blob/master/README) access mode \n    (default is HYBRID), HYBRID is recommended for best impersonation of a filesystem\n    due to how zookeeper's filesystem behaves. Read the appropriate [README](https://github.com/smok-serwis/zookeeper-fuse/blob/master/README)\n    to figure out how exactly HYBRID works. You can alternatively choose `DIR` or `FILE`.\n* `auth`: zookeeper authentication string (by default none given)\n\n# Thanks and credits\n\nSpecial thanks to [borowskk's zookeeper-fuse](https://github.com/borowskk/zookeeper-fuse.git), \nwithout which this plugin wouldn't happen to exist.\n\n## HYBRID mode\n\nSince zookeeper-fuse's default access modes of DIR and FILE do not permit to use ZooKeeper systems as a valid filesystem (ie. once you create a file it becomes a directory) and does not support symlinks I have extended [zookeeper-fuse](https://github.com/smok-serwis/zookeeper-fuse.git) to add symlink support and if you create a file it stays a file. Basically it remembers what you have done while creating that file. I've also filed a [pull request](https://github.com/borowskk/zookeeper-fuse/pull/5).\n\nNote however that cache invalidation is not yet supported, so if you process files with new names you are going to run into trouble. If you however keep on processing the same files, you should be OK.\n\nWhat hybrid mode supports:\n\n* files once created as files stay files. Directories created as directories start as directories. Note that this however applies to a single machine only, so if you create an empty file on one machine it's going to be seen as a directory on another.\n* Symlinks are supported. However, in HYBRID mode `__symlinks__` is an invalid file name, since this is the file in which symlink information is stored at the root.\n* `cp` is supported\n* `mv` is supported for files only. Moving a directory is a ENOSYS.\n\nPlease note that the default mode in which \n*smokserwis/zookeeper-volume* mounts volumes is\n`HYBRID` not `DIR` or `FILE`.\n\nIn HYBRID mode syscalls `lock` and `flock` are mapped to no-ops. They\nwill create a file for all it's worth.\n\nIt works much better if you `ls -R` the entire mounted directory prior to using files from there.\n\nKeep in mind that the maximum file size is limited by\n[zookeeper-fuse](https://github.com/smok-serwis/zookeeper-fuse.git) \nand is currently set to 128 kB.\n\n# Changelog\n\n# v1.8\n\n* renaming (moving) empty directories is supported\n\n# v1.7\n\n* dropped ujson requirements\n* refactored the code\n* in HYBRID mode the chmod of directories will be 777 instead of 755\n\n# v1.6\n\n* the solution should segfault far less\n\n# v1.5\n\n* added support for `mv`-ing files\n\n# v1.4\n\n* fixed a bug related with writing symlink name to too short a buffer\n* fixed a bug wherein a filesystem required as ls -R /mount/zoo to load all symlinks\n* Maximum file size increased to 128 kB\n\n# v1.3\n\n* fixed a bug wherein directories would\n  be listed as files\n\n# v1.2\n\n* support for `lock`, `flock`, `release`, \n  `releasedir` and `access` added\n* the filesystem is enough for certbot to put it's certificates onto this\n\n# v1.1 \n\n* HYBRID mode is fully supported\n* default moe in which a volume is mounted switched to `HYBRID` instead of `DIR`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmok-serwis%2Fzookeeper-volume","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmok-serwis%2Fzookeeper-volume","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmok-serwis%2Fzookeeper-volume/lists"}