Commit Graph

42879 Commits

Author SHA1 Message Date
Ilya Dryomov
afbf90d5b5 rbd: du command should take spec as an argument
Change du to take <image-spec> | <snap-spec> as an argument instead of
going through --image option.  The new synopsis is

    (du | disk-usage) [<image-spec> | <snap-spec>]

This is to make it look more like the rest of the commands: the only
other command that takes pool as an argument is ls and it can't really
serve as a prototype for du, because the latter has to work on images
and snapshots as well.

Examples:

    # stats for pool rbd
    $ rbd du
    $ rbd -p rbd du

    # stats for pool foo
    $ rbd -p foo du

    # stats for snapshot mysnap of image baz in pool rbd
    $ rbd du baz@mysnap

    # stats for image bar in pool foo
    $ rbd du foo/bar

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
7d65bd9bd1 rbd: assorted cli arg parsing fixes
- import-diff needs image-spec, yet OPT_IMPORT_DIFF was in the list of
  commands that don't need imgname

- check for lock id after imgname, so that if imgname isn't specified
  we fail with imgname rather than lock id error message

- error out if locker isn't specified

- move feature-name validity check after imgname checks so that if
  imgname is malformed we fail with imgname rather than feature error
  message

- error out if image-meta key or value isn't specified

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
b60e144ceb rbd: error out if dest_snapname is specified
No command uses it as of now, but only clone command fails; cp, mv and
import simply ignore it.  Check if it's set and exit with a generic
error message.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
bbc5c71284 rbd: import doesn't require image-spec arg, ditto for export and path
Mark those as such in help and clarify what image-spec defaults to.

Related, all command args in our man page are enclosed into brackets.
I suppose the reason is that they are optional in the sense that you
can have commands like

    $ rbd clone --pool a --image b --snap -c --dest-pool d --dest e

with no args.  Given that we are trying to push people towards

    $ rbd clone a/b@c d/e

undo that so that real optional arguments can be marked optional.
While at it, add synopsis for each command and use backticks for
denoting commands more consistently.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Ilya Dryomov
76989cc4ae doc: use spec syntax in rbd docs
Use spec syntax instead of --pool, --image and --snap to hopefully push
people towards the former.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
Vikhyat Umrao
9909388171 rbd: use image-spec and snap-spec in rbd help
This patch changes image-name instances to image-spec and snap-name
instances to snap-spec to try to clarify usage for some commands and
disambiguate the term {image,snap}-name, which has been used to denote
both simple names and compound names (specs).

<image-spec> is [<pool-name>]/<image-name>
<snap-spec> is [<pool-name>]/<image-name>@<snap-name>

This patch also removes duplicate checks for image-name and snap-name.

Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
[idryomov@gmail.com: some commands take either image-spec or snap-spec,
other fixes, formatting, changelog]
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-07-27 12:22:04 +03:00
John Spray
f753c109fc Merge pull request #5323 from ceph/wip-12426
mon: fix checks on mds add_data_pool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-23 19:43:53 +01:00
John Spray
329741ec23 mon: fix checks on mds add_data_pool
Use same _check_pool helper as during fs creation.

Fixes: #12426

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-23 14:08:33 +01:00
John Spray
29ea23c3ff Merge pull request #5324 from ceph/wip-12355
mds: fix crash while stopping rank

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-23 14:04:20 +01:00
John Spray
c8bdf1b761 mds: fix crash while stopping rank
trim() was broken in:
8a91daae mds: fix mds crash when mds_max_log_events smaller

When doing a final trim in shutdown we need to trim everything,
not just all but the last segment.  The previous change's intent
was to prevent badness when mds_log_max_events was too small: accomplish
the same thing here by clamping the value to something sane.

Fixes: #12355

Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-23 10:48:18 +01:00
Sage Weil
2746f59da4 Merge remote-tracking branch 'gh/next' 2015-07-16 12:03:58 -04:00
Joao Eduardo Luis
c2d6e3d666 Merge branch 'wip-mon-scrub'
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:46:32 +01:00
Joao Eduardo Luis
f735a9905c Merge branch 'wip-11786'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:44:22 +01:00
Joao Eduardo Luis
0ea794c96a Merge branch 'wip-11470'
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 16:21:18 +01:00
Joao Eduardo Luis
1551ebb632 mon: PaxosService: call post_refresh() instead of post_paxos_update()
Whenever the monitor finishes committing a proposal, we call
Monitor::refresh_from_paxos() to nudge the services to refresh.  Once
all services have refreshed, we would then call each services
post_paxos_update().

However, due to an unfortunate, non-critical bug, some services (mainly
the LogMonitor) could have messages pending in their
'waiting_for_finished_proposal' callback queue [1], and we need to nudge
those callbacks.

This patch adds a new step during the refresh phase: instead of calling
directly the service's post_paxos_update(), we introduce a
PaxosService::post_refresh() which will call the services
post_paxos_update() function first and then nudge those callbacks when
appropriate.

[1] - Given the monitor will send MLog messages to itself, and given the
service is not readable before its initial state is proposed and
committed, some of the initial MLog's would be stuck waiting for the
proposal to finish.  However, by design, we only nudge those message's
callbacks when an election finishes or, if the leader, when the proposal
finishes.  On peons, however, we would only nudge those callbacks if an
election happened to be triggered, hence the need for an alternate path
to retry any message waiting for the initial proposal to finish.

Fixes: #11470

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 16:20:41 +01:00
Joao Eduardo Luis
b207d87ebf Merge branch 'wip-11545'
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 16:07:11 +01:00
Sage Weil
5d299612e5 Merge pull request #5251 from ceph/wip-12021-next
OSDMonitor: allow addition of cache pool with non-empty snaps with co…

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 11:05:04 -04:00
Sage Weil
edd68e3ade Merge pull request #5188 from athanatos/wip-11687
PG::find_best_info: ignore info.les for incomplete peer

Reviewed-by: Sage Weil <sage@redhat.com>
2015-07-16 11:03:18 -04:00
Joao Eduardo Luis
038452e70f mon: Monitor: use 'ceph mon metadata' instead of 'ceph mon_metadata'
'ceph mon_metadata' was added still during this dev cycle, so there is
no need to deprecate it first.

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 15:54:03 +01:00
Kefu Chai
6fac064a02 Merge pull request #5238 from tweenk/out-of-tree-build-fix
Makefile: fix out-of-tree build.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 22:03:52 +08:00
John Spray
03c556a9e7 Merge pull request #5256 from ceph/wip-ftbfs-i386-cls-cephfs
fix the FTBFS on i386 due to libcls_cephfs

Reviewed-by: John Spray <john.spray@redhat.com>
2015-07-16 14:42:49 +01:00
Kefu Chai
039dd1ac27 Merge pull request #5255 from hjwsm1989/fix-pgmonitor
mon/PGMonitor: use poolname reference instead of get it in osdmap

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 21:15:03 +08:00
Joao Eduardo Luis
955dcede2a mon: Monitor: use 'ceph mon sync force' instead of 'ceph sync force'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
574e596f1f mon: Monitor: use 'ceph mon scrub' instead of 'ceph scrub'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
16dcc40cfa mon: Monitor: use 'ceph mon compact' instead of 'ceph compact'
Makes it easier to identify the command as being related with the
monitor instead of cluster-wide.

This entails adding an exception to module 'mon' in order to have this
command handled by the Monitor class instead of MonmapMonitor (which is
the one traditionally handling 'mon' module commands).

Fixes: #11545

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
66e7510cad qa/workunits: cephtool: test deprecated commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
c7f70a7edb PendingReleaseNotes: note deprecation of commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
7e8f72151b mon: MonCommands.h: DEPRECATE 'ceph sync force'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
9073ff4f2e mon: MonCommands.h: DEPRECATE 'ceph compact'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
1814d7441b mon: MonCommands.h: DEPRECATE 'ceph scrub'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
d9acd68cae mon: Monitor: allow deprecating commands and debugging as obsolete
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
16df92f68d mon: Monitor: add is_noforward() helper to MonCommand
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
5b2a4eb865 mon: Monitor: add support to have OBSOLETE commands
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
4c5d5bab1f mon: MonCommand: don't match help string in is_compat()
Otherwise it's virtually impossible to change a command's help string
without triggering a mismatch with the leader's command set.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
607b0e8e4f mon: MonCommands: add NOFORWARD to 'ceph sync force'
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
0438bdd54b mon: MonCommand: add FLAG_NONE
Instead of passing '0' for commands without flags, pass FLAG_NONE
instead.  It's prettier and more obvious -- and it only costs 64 bits.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
af5efdfd29 mon: MonCommand: have flags as uint32_t instead of enum
Makes much more sense if we're OR'ing flags.  Or not as weird.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Joao Eduardo Luis
b00ea63497 mon: MonCommands: accept FLAG(f) instead of 'f' in command sig
This allows us to do nifty stuff like 'FLAG(foo) | FLAG(bar)' and expand
it to (MonCommand::FLAG_foo | MonCommand::FLAG_bar), instead of being
bound by a single flag on macro expansion.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
2015-07-16 12:20:02 +01:00
Krzysztof Kosiński
6ed554ce1b automake: Fix out-of-tree build.
Corrects minor Automake errors which prevented Ceph from building
when configure was invoked from a different directory than
the toplevel source directory.

Signed-off-by: Krzysztof Kosiński <krzysztof.kosinski@intel.com>
2015-07-16 10:32:34 +02:00
Kefu Chai
2d471d0def Merge pull request #5143 from trociny/fix-mds_metadata
mon: fix mds metadata

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 14:41:41 +08:00
Kefu Chai
cfc9f493f6 packaging: package libcls_cephfs.so
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-16 14:21:03 +08:00
Kefu Chai
0dae022ddf cls: fix the build on i386
time_t is more a arithmetic type. and it's not portable. it's always
defined as "long int" by libc. and we have no encode(int, bl), which
is expected. so a safe way is to use int64_t for presenting the mtime
returned from the stat() call.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-16 14:04:08 +08:00
huangjun
852b08fa04 mon/PGMonitor: use poolname reference instead of get it in osdmap
Signed-off-by: huangjun <hjwsm1989@gmail.com>
2015-07-16 13:53:24 +08:00
Kefu Chai
cabbecb7dd Merge pull request #4917 from hjwsm1989/wip-rest-bench
tools/rest_bench.cc: bucket is not mandatory bc we have a default one

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-07-16 12:19:06 +08:00
huangjun
bc56a87ea3 rest_bench: bucketname is not mandatory as we have a default name
Signed-off-by: huangjun <hjwsm1989@gmail.com>
2015-07-16 09:42:55 +08:00
huangjun
f3d34d8ff9 rest_bench: drain the work queue to fix a crash
Fixes: #3896
  Signed-off-by: huangjun <hjwsm1989@gmail.com>
2015-07-16 09:17:59 +08:00
Samuel Just
371d9baa12 PG::find_best_info: ignore info.les for incomplete peer
See included update to doc/dev/osd_internals/last_epoch_started.rst

Fixes: 11687
Signed-off-by: Samuel Just <sjust@redhat.com>
2015-07-15 08:57:18 -07:00
Kefu Chai
7aa5e50a7b Merge pull request #5249 from tchaikov/wip-11101
ceph.in: improve the error message

Reviewed-by: Abhishek Lekshmanan <abhishek.lekshmanan@ril.com>
2015-07-15 23:53:16 +08:00
branto1
d4be59d01e Merge pull request #5110 from ceph/wip-11864-rgw-mime-types-pkg
11864: packaging: RGW depends on /etc/mime.types

Reviewed-by: Boris Ranto <branto@redhat.com>
2015-07-15 17:49:05 +02:00
Ken Dreyer
c74a2f86a1 packaging: RGW depends on /etc/mime.types
If the mimecap RPM or mime-support DEB is not installed, then the
/etc/mime.types file is not present on the system. RGW attempts to read
this file during startup, and if the file is not present, RGW logs an
error:

  ext_mime_map_init(): failed to open file=/etc/mime.types ret=-2

Make the radosgw package depend on the mailcap/mime-support packages so
that /etc/mime.types is always available on RGW systems.

http://tracker.ceph.com/issues/11864 Fixes: #11864

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-15 09:14:15 -06:00