Commit Graph

75597 Commits

Author SHA1 Message Date
Kefu Chai
742a117728 Merge pull request #16347 from tchaikov/wip-test-ceph-disk
tests: ceph-disk: use communicate() instead of wait() for output

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-07-15 16:24:23 +08:00
xie xingguo
a373692fa1 mon/MonCommand: drop unnecessary write permission
since "log last" does not ask for it.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-15 14:23:44 +08:00
xie xingguo
464179b447 osd/OSDMap: kill dead structure "struct qi"
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-15 14:23:43 +08:00
Jos Collin
9f6806559d Merge pull request #16334 from wjwithagen/wjw-bug-stringyfy
core:" Stringify needs access to << before reference" src/include/stringify.h

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-07-15 05:21:23 +00:00
xie xingguo
09af9b8afb osd/OSDMap: allow bidirectional swap of pg-upmap-items
This is useful when we also want an even distribution of pg primaries across osds.
For example:
Was:
[0 1 2]

By applying bidirectional swap of pg-upmap-items mapping [[0,1],[1,0]], now:
[1 0 2]

Thus we successfully decrease the number of primaries of osd.0 by 1 without
affecting the current (even) distribution of global pgs.

Real exmaple:
./bin/ceph pg ls-by-pool rbd
PG_STAT OBJECTS MISSING_ON_PRIMARY DEGRADED MISPLACED UNFOUND BYTES LOG DISK_LOG STATE        STATE_STAMP                VERSION REPORTED UP      UP_PRIMARY ACTING  ACTING_PRIMARY LAST_SCRUB SCRUB_STAMP                LAST_DEEP_SCRUB DEEP_SCRUB_STAMP
3.0           0                  0        0         0       0     0   0        0 active+clean 2017-07-12 15:14:45.083441     0'0    29:13 [0,1,3]          0 [0,1,3]              0        0'0 2017-07-12 15:14:14.515989             0'0 2017-07-12 15:14:14.515989

./bin/ceph osd pg-upmap-items 3.0 0 1 1 0 3 5
set 3.0 pg_upmap_items mapping to [0->1,1->0,3->5]

./bin/ceph pg ls-by-pool rbd
PG_STAT OBJECTS MISSING_ON_PRIMARY DEGRADED MISPLACED UNFOUND BYTES LOG DISK_LOG STATE        STATE_STAMP                VERSION REPORTED UP      UP_PRIMARY ACTING  ACTING_PRIMARY LAST_SCRUB SCRUB_STAMP                LAST_DEEP_SCRUB DEEP_SCRUB_STAMP
3.0           0                  0        0         0       0     0   0        0 active+clean 2017-07-12 15:16:22.648424     0'0    33:13 [1,0,5]          1 [1,0,5]              1        0'0 2017-07-12 15:14:14.515989             0'0 2017-07-12 15:14:14.515989

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-15 12:29:57 +08:00
xie xingguo
70e664b7c8 mon/OSDMonitor: another dedup case for pg-upmap-items
./bin/ceph osd pg-upmap-items 1.0 1 2 1 2
osd.1 -> osd.2 already exists, set 1.0 pg_upmap_items mapping to [1->2]

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-07-15 12:29:57 +08:00
Kefu Chai
c596bff584 qa/suites/ceph-disk: whitelist health warnings
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-07-15 11:27:02 +08:00
Kefu Chai
73c0740b08 tests: ceph-disk: use communicate() instead of wait() for output
to avoid possible deadlock. quote from doc of Popen.wait()

> This will deadlock when using stdout=PIPE and/or stderr=PIPE and the
child process generates enough output to a pipe such that it blocks
waiting for the OS pipe buffer to accept more data. Use communicate() to
avoid that.

and print out the stdout and stderr using LOG.warn() if the command
fails.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-07-15 11:27:02 +08:00
Kefu Chai
0cc65197d6 Merge pull request #16045 from Liuchang0812/wip-compact-osd-feature
osd: compact osd feature

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-15 10:57:13 +08:00
Jianpeng Ma
9ab14d1df7 test/fio: print all perfcounters rather than objectstore itself.
Need bluefs,rocksdb perfcounters.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2017-07-15 06:15:53 +08:00
Sage Weil
d52763c2cc Merge pull request #16221 from liewegas/wip-20546
crush/CrushWrapper: make get_immediate_parent[_id] ignore per-class shadow hierarchy

Reviewed-by: Neha Ojha <nojha@redhat.com>
2017-07-14 15:09:22 -05:00
Sage Weil
110e60f4e3 mgr/Mgr: debug init a bit more
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 16:07:28 -04:00
Sage Weil
73a5e078cb mon/MgrMonitor: debug mgrdigest subscriptions a bit
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 16:06:22 -04:00
Sage Weil
a88194093c vstart.sh: bind restful, dashboard to ::, not 127.0.0.1
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 14:34:06 -04:00
Loic Dachary
d94ea0bd55 doc: ceph-disk: fix typos
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:01 +02:00
Loic Dachary
d199cedc8f tests: ceph-disk destroy needs --purge
The former semantic of ceph-disk destroy is now implemented with the
--purge flag. Use that for the ceph-disk suite.

Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:01 +02:00
Loic Dachary
8eed436859 tests: ceph-disk test for prepare --osd-id
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:01 +02:00
Loic Dachary
9fa13d4c3c ceph-disk: use osd new instead of osd create
When using --dmcrypt, the lockbox stores the OSD id and the cephx secret
that will be used when activating the OSD.

When activating, the OSD id is copied from the lockbox if available,
otherwise it is obtained from osd new.

Add support for re-using an OSD id via the --osd-id option to prepare.

Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
625a7d515b tests: ceph-disk add ceph-mgr during activation tests
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
285987be34 tests: ceph-disk reorganize write tests
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
a70521d854 tests: generalize FreeBSD timeout special case
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
13006324d6 tests: make ceph-disk timeout environement configurable
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
049f21416c ceph-disk: copyright dates updates
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
5e42bc745c ceph-disk: _dmcrypt_map uses command_with_stdin
Instead of an inlined version of it.

Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
dcfe0573a9 vstart: it's OK to have very little free space
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
3c195c49d2 tests: ceph-disk tests are not shell
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
a8952eefae ceph-disk: implement Secrets,LockboxSecrets
Supporting the JSON format accepted by osd new.

Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
597393d5d0 ceph-disk: implement command_with_stdin
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
91b9646f71 tests: count OSD ids in PGs {wait,get}_osd_id_used_by_pgs
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Loic Dachary
1902a414f3 tests: ceph-helper uses ceph osd purge
Instead of removing each element related to an OSD individually.

Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:47:00 +02:00
Sage Weil
bfc1ccb390 mon/MonCap: simplify client.bootstrap-osd
Now it can only do 2 things:

 - mon getmap
 - osd new

\o/

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 19:47:00 +02:00
Sage Weil
1921aa904e ceph-disk: use 'ceph osd destroy' for 'ceph-disk destroy'
- simplifies interaction with monitor, makes it atomic
- marks the OSD as DESTROYED so that the id may be potentially reused
- --purge option to also remove from CRUSH and deallocate the id.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2017-07-14 19:46:59 +02:00
Bassam Tabbara
c0dc20533b docs: add docs for public_bind_addr
Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2017-07-14 10:41:49 -07:00
Bassam Tabbara
a8da9fd077 test,qa/workunits: add tests for public_bind_addr
Add a set of new tests for the case when public_addr and public_bind_addr
are different for a mon. In order to test this properly I had to employ
port forwarding with socat. This helps simulate what would happen in a
environment like Kubernetes. socat is now a build dependency.

Also, moved jq_success to ceph-helpers.sh and refactored run_mon to enable
creating the mons without creating the rbd pool immediately.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2017-07-14 10:41:49 -07:00
Bassam Tabbara
bf49385679 mon: add support public_bind_addr option
To support running in dynamic enviornments (like Kubernetes) the mon needs
to be able to advertise and ip address that is different from the ip address
that it listens on locally.

Added a new config option "public_bind_addr" which if set becomes the address
that the mon will bind to locally. If empty (the default) the public_addr
will be used to bind locally.

added a new function on Messenger to set_addr which is called by ceph-mon to set
the advertised address after doing the bind.

also relaxed the "wrong node!" errors in AsyncMessenger and SimpleMessenger as
its now valid to talk to a peer whose peer_addr_of_me is different from what
we expect.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
2017-07-14 10:41:49 -07:00
Yehuda Sadeh
b3404bd841 Merge pull request #12139 from tianshan/fix_zone_set_realm_id
rgw: fix zone did't update realm_id when added to zonegroup

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2017-07-14 09:13:10 -07:00
Yuri Weinstein
34fcd223c5 Merge pull request #14915 from cbodley/wip-19817
rgw: add missing RGWPeriod::reflect() based on new atomic update_latest_epoch()

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2017-07-14 08:52:52 -07:00
Sage Weil
960f00071f qa/suites: disable mon crush smoke test with valgrind
Valgrind runs itself on forked children, and does its cleanup when they
complete, and this is slow... slow enough that it frequently makes the
test time out.

Valgrind let's you ignore child *processes* that you exec, but I can't
find a way to skip forked children in the same address space.

Work around this by skip this validation when running under valgrind.

Fixes: http://tracker.ceph.com/issues/20602
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 11:51:47 -04:00
Sage Weil
75c923e7a0 mon: add mon_osd_crush_smoke_test=true
This option allows us to disable the crush smoke test when creating pools,
injecting crush maps, or making other changes.  DANGER DANGER.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 11:51:47 -04:00
Yuri Weinstein
267b115c1f Merge pull request #15953 from rzarzynski/wip-rgw-20418
rgw: reject request if decoded URI contains \0 in the middle.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2017-07-14 08:51:42 -07:00
John Spray
1486397f31 ceph.in: filter out audit from ceph -w
...and add an optional --watch-channel argument.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-14 11:35:18 -04:00
Sage Weil
6a0c3b45b9 Merge pull request #16340 from dillaman/wip-20630
qa/tasks: rbd-mirror daemon not properly run in foreground mode

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-14 10:19:25 -05:00
Casey Bodley
a5e7e00756 Merge pull request #16331 from zhangsw/cleanup-zonegroup-list
rgw: remove the useless output when listing zonegroups.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2017-07-14 11:12:57 -04:00
Sage Weil
7ec43396a2 osd: restart boot process if waiting for luminous mons
If we start_boot and see that we don't have luminous mons, we will stop.
But we don't currently reliably notice when the luminous upgrade completes.
If we happen to be connected to the last mon we will start_boot() because
of the trigger in ms_handle_connect(), but if we are not connected to the
last mon we'll eventually get a monmap update but not restart booting.

Fix by setting a flag if we are waiting, and restart boot if the flag is
set, we are in preboot, and we see we now have luminous mons.

Fixes: http://tracker.ceph.com/issues/20631
Signed-off-by: Sage Weil <sage@redhat.com>
2017-07-14 10:53:14 -04:00
Jason Dillaman
4fa1918717 qa/tasks: rbd-mirror daemon not properly run in foreground mode
Fixes: http://tracker.ceph.com/issues/20630
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-07-14 10:32:28 -04:00
Sage Weil
1ac23e7893 Merge pull request #16043 from jcsp/wip-dashboard-updates
mgr: dashboard improvements

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-07-14 09:16:33 -05:00
John Spray
2cd8c5c64c mgr/dashboard: update health display
This takes account of the new health format, also
expands and visually cleans up the frontpage
where we put the health information.

Dark backgrounds make it much easier to use
red/amber/green colours to grab attention.

Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-14 10:05:54 -04:00
John Spray
62935db879 mgr: expose a MgrMap in PyModules
Signed-off-by: John Spray <john.spray@redhat.com>
2017-07-14 10:05:54 -04:00
Sage Weil
7e142534bc Merge pull request #16020 from jcsp/wip-20383
mgr: clean up daemon start process

Reviewed-by: Sage Weil <sage@redhat.com>
2017-07-14 09:04:16 -05:00
Jos Collin
48ce73722e Merge pull request #16338 from scienceluo/wip-doc-branch
doc/release-notes: Luminous release notes typo fixes

Reviewed-by: Jos Collin <jcollin@redhat.com>
2017-07-14 13:58:15 +00:00