Comments (5)
The Python packages with the bindings for Ceph's librados
and librbd
are Ceph version dependent and need to be installed separately as they're not available on PyPi. Installation instructions depend on your environment. For RHEL/CentOS 7 there are RPM packages directly available from Ceph (python36-rbd
and python36-rados
). See https://github.com/elemental-lf/benji/blob/master/images/benji/Dockerfile for more or less step by step instructions. ceph.com
also has packages for Ubuntu, but stopped building Debian packages. There are unofficial Debian packages available here: https://mirror.croit.io/. Benji's RBD support has only been tested with Luminous and newer client libraries. (This all assumes that you actually want to use RBD. If not, just delete the section from the config and Benji won't try to load the missing module.)
And there is also the container image available on Docker Hub which contains both B2 and Ceph RBD support (based on Nautilus currently, but should work with older Ceph releases). You can run it with docker run -it elementalnet/benji:0.7.0
and bind-mount your configuration from your normal filesystem into the container at /etc/benji/benji.yaml
. You would also need to bind-mount the Ceph configuration into the container. Redhat's podman
instead of docker
also works of course.
from benji.
I've updated the installation instructions with more information related to the RBD module. Please see https://benji-backup.me/installation.html#ceph-rbd-support.
from benji.
Thank you so far Lars, since I am trying to use this on Proxmox which is based on Debian, I have now setup a container with centos7 and installed installed everything successfully as per your instructions, I have also copied /etc/ceph/ceph.conf from my proxmox box to the container just to testing purposes (I hope thats ok), will bind mount it if i can get it to work.
I have to mention that i had to change this code now provided on the benji website from
name=Ceph packages for $basearch
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/$basearch
to
name=Ceph packages for \$basearch
baseurl=https://download.ceph.com/rpm-{ceph-release}/{distro}/\$basearch
otherwise $basearch is seen as an empty variable.
When doing database-init i now get a new error:
{'event': 'Uncaught exception', 'level': 'error', 'timestamp': 1566868103.3057816, 'file': '/usr/local/benji/lib64/python3.6/site-packages/benji/logging.py', 'line': 169, 'function': 'handle_exception', 'process': 22537, 'thread_name': 'MainThread', 'thread_id': 140326461175616, 'exception': 'Traceback (most recent call last):\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/config.py", line 144, in __init__\n config = ruamel.yaml.load(f, Loader=ruamel.yaml.SafeLoader)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/main.py", line 935, in load\n return loader._constructor.get_single_data()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/constructor.py", line 109, in get_single_data\n node = self.composer.get_single_node()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 78, in get_single_node\n document = self.compose_document()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 101, in compose_document\n node = self.compose_node(None, None)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 136, in compose_node\n node = self.compose_sequence_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 180, in compose_sequence_node\n node.value.append(self.compose_node(node, index))\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 218, in compose_mapping_node\n item_value = self.compose_node(node, item_key)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 138, in compose_node\n node = self.compose_mapping_node(anchor)\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node\n while not self.parser.check_event(MappingEndEvent):\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/parser.py", line 141, in check_event\n self.current_event = self.state()\n File "/usr/local/benji/lib64/python3.6/site-packages/ruamel/yaml/parser.py", line 581, in parse_block_mapping_key\n token.start_mark,\nruamel.yaml.parser.ParserError: while parsing a block mapping\n in "/etc/benji.yaml", line 31, column 6\nexpected <block end>, but found \'<block mapping start>\'\n in "/etc/benji.yaml", line 37, column 7\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n File "/usr/local/benji/bin/benji", line 11, in <module>\n load_entry_point(\'benji==0.7.0.dev11+g51b7886\', \'console_scripts\', \'benji\')()\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/scripts/benji.py", line 290, in main\n config = Config()\n File "/usr/local/benji/lib64/python3.6/site-packages/benji/config.py", line 146, in __init__\n raise ConfigurationError(\'Configuration file {} is invalid.\'.format(source)) from exception\nbenji.exception.ConfigurationError: Configuration file /etc/benji.yaml is invalid.'}
from benji.
The company which makes Proxmox provides their own packages for Ceph on Debian. If you have their repositories configured the packages should be there somewhere I'd think and you could skip using a container. Even if you wanted to use a container you can use the ready-made container image elementalnet/benji:0.7.0
, it's also based on CentOS 7 and has all you need.
Regarding your error message: Your configuration has some error.
ruamel.yaml.parser.ParserError: while parsing a block mapping\n in "/etc/benji.yaml", line 31, column 6\nexpected , but found ''\n in "/etc/benji.yaml", line 37, column 7
Try yamllint
if you can't find the error.
from benji.
yamllint pointed out i had wrong indentation on 2 lines.
I have installed the packages from proxmox as per your suggestion, and its working as expected. No need for a container.
Thank you so much.
PS. Remember to fix the website :)
from benji.
Related Issues (20)
- benji database-init should be called first time running the container HOT 1
- Restored data does not always match original (Ceph bug) HOT 21
- Problems with snaptrims being pended - Work around HOT 3
- Memory error on benji rm or benji enforce HOT 2
- benji-backup-pvc is no longer working since upgrade HOT 3
- IO scheme k3s is undefined HOT 2
- openstack cinder-backup integration HOT 2
- MySQL compatability problem HOT 1
- benji with celery ? HOT 1
- Publish to a Helm repository in order to support Terraform deployments HOT 2
- Metrics scaling HOT 5
- Coordination with Velero HOT 3
- How to use with rook-ceph ? HOT 2
- Python 3.10 suport HOT 1
- NBD server losing connection to PostgreSQL HOT 4
- nbdserver does not start with python 3.10
- Unable to install benji to Python 3.11 venv in Proxmox 8 (Debian 12 (bookworm)) HOT 4
- NBD export fail "nbd0: truncated" to mount with block size other than 512
- Bug: high ram usage during `benji rm`
- Some pool names are not supported
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from benji.