The device could only be set to rw(default) when mapping
now. This patch only handle the user space, because the
kernel part has been completed.
Signed-off-by: Guangliang Zhao <guangliang@unitedstack.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Use sftp to upload to a directory that only this user and ceph devs can
access.
Distribute an ssh key to connect to the account. This will let us revoke
the key in the future if we feel the need. Also distribute a known_hosts
file so that users have some confidence that they are connecting to the
real ceph drop account and not some third party.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
ceph-rest-api:
* create app from wrapper by calling generate_app()
* pass args to generate_app() (early parsed in wrapper)
* parse -i/--id here as well
* set addr:port on returned app object
* handle only EnvironmentError exceptions; let others spew traceback
* turn off debug when running singlethreaded server
ceph_rest_api.py:
* put glob.* on app.ceph_* instead; pass around app in init code
* drop conf parsing (let librados do its job)
Documentation updated to match.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
* wip-wsgi:
ceph-rest-api: separate into module and front-end for WSGI deploy
ceph-rest-api: make main program be "shell" around WSGI guts
Reviewed-by: Sage Weil <sage@inktank.com>
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Unprotect examines all pools, so use blanket x before 0.54. After
that, use class-read restricted by object_prefix to rbd_children.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Remove btrfs specific keys and replace them by more generic
keys to be able to replace btrfs with e.g. xfs or ext4 easily.
Add new key to define the osd fs type: 'osd mkfs type', which can
get defined in the [osd] section for all OSDs.
Replaced config keys:
- 'btrfs devs' -> 'devs'
- 'btrfs path' -> 'fs path'
- 'btrfs options' -> 'osd mount options $fstype'
New config key:
- 'osd mkfs options $fstype': file system specific options for mkfs
- 'osd mkfs type': to define the filesystem for mkfs and also mount
Replaced in mkcephfs: --mkbtrfs with --mkfs
Replaced in init-ceph:
- --btrfs with --fsmount
- --nobtrfs with --nofsmount
- --btrfsumount with --fsumount
NOTE: old options from mkcephfs and init-ceph will still work, but
get may removed in the future from the scripts.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* document osd capabilities
* fix librados user example
* fix example with outdated syntax (pool= and uid= are not supported)
* ignore auid, object prefix, and class restrictions for now since
they aren't usable yet
* fix header for keyring file section
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The locker (entity_name_t) will be different each time the rbd
command line tool is run, so 'lock remove' is always breaking a lock.
Fixes: #2556
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* a clone's size can't be overridden
* note which commands require format 2
* clarify details of copy
* add examples for cloning
* add pool to map example for consistency
* fix a couple warnings and re-sync man page with rst
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Document the rbd showmapped cmd in rbd.usage(), and rbd's man page,
and add it to the bash completion script.
Signed-off-by: Stratos Psomadakis <psomas@grnet.gr>
Keeping the generated files in version control lets us
support builds from scratch without requiring the full
documentation toolchain to be installed.
The files were just copied over from build-doc/output/man,
after a ./admin/build-doc call. When redoing this, also
take care to remove any roff output if a file was removed
from doc/man, and update Makefile.am.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Unmap takes a device now, and uses the major number
to find the right sequence number in sysfs.
Also updated the man page.
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This is now the admin's job. Removes a lot of code with limited testing
and coverage.
We rev the internal monitor protocol because the state machine ids changed.
This should not affect the on-disk format. Just stop and restart all the
monitors at once during the upgrade.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Apparently, now there's a vertical paragraph space before it,
but that's better than being tacked at the end of the previous
line.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
-f now just means stay in the foreground.
-d now means stay in the foreground and log to foreground.
Both options now disable pid-files.
Update man pages.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
I've found the manpage problem that I've noted before. It's about
monmaptool, the CLI says it's usage:
[--print] [--create [--clobber]] [--add name 1.2.3.4:567] [--rm name]
<mapfilename>
But the manpage states this as an example:
monmaptool --create --add 192.168.0.10:6789 --add 192.168.0.11:6789 --add
192.168.0.12:6789 --clobber monmap
This definitely misses 'name' after the 'add' switch, resulting:
"invalid ip:port '--add'" as an error message. Attached patch fixes this
inconsistency.
Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
[ The following text is in the "UTF-8" character set. ]
[ Your display is set for the "iso-8859-1" character set. ]
[ Some characters may be displayed incorrectly. ]
inspired by the addition to
http://ceph.newdream.net/wiki/Snapshots about the snapdirname
option i've created a patch for the mount.ceph manpage
- Thomas
Signed-off-by: Sage Weil <sage@newdream.net>
While creating a spec file for CEPH, rpmbuild was complaining because make
install was copying the manpages in, and then copying them in again. This is
because man_MANS and dist_man_MANS are supposed to be two seperate lists that do
not overlap. So make install would install all the man pages in the man_MANS
list and the dist_man_MANS list. This patch kills the dist_man_MANS thing to
keep this from happening. This made rpmbuild happy, which makes me happy :).
Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>