rados: add {read,write}_ops to df json

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
when starting an OSD, pass in the cluster name

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
use  name in /var/lib/ceph paths

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
use cluster name when checking the host

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
allow passing a --cluster flag to the init script

It will fallback to looking at /etc/ceph/$cluster.conf
otherwise.

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
make ceph-disk use the new init flag for cluster

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
msg/Pipe: do not wait for self in Pipe::stop_and_wait()

The fast dispatch code necessitated adding a wait for the fast dispatch
to complete when taking over sockets back in commit
2d5d3097c3998add1061ce253104154d72879237.  This included mark_down()
(although I am not certain mark_down was required to fix the previous set
of races).

In any case, if the fast dispatch thread itself tries to mark down its
own connection, it will deadlock in this method waiting for itself to
return and clear reader_dispatching.  Skip this wait if we are in fact
the reader thread.  This avoids the deadlock.

Alternatively, we could change mark_down() to not use stop_and_wait(), but
I am less clear about the potential races there, so I'm opting for the
minimal (though ugly) fix.

Fixes: #9057
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2238 from ceph/wip-9057

msg/Pipe: do not wait for self in Pipe::stop_and_wait() 

Reviewed-by: Samuel Just <sam.just@inktank.com>
rados: fix {read,write}_bytes value

Fill this in with kb * 1024 instead of the ops count.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
rados: remove {read,write}_kb fields from rados df json output

Redundant.  Do not backport.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2214 from ceph/wip-rados-df-json

rados: fix 'rados df --format=json' field names

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
rgw: Don't send error body when it's a HEAD request

The main 'operation' know not to send any body for HEAD requests.

However for errors, this was not the case, the formatter would be
flushed and would send the error 'message' in the body in all cases.

For the FastCGI case it doesn't seem to be an issue, it's possible
that the webserver (apache/lighttpd/...) cleans up the response
into shape.

But when using the new civetweb frontend this cause invalid HTTP.

Backport: firefly
Fixes #8539

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Sylvain Munaut <s.munaut@whatever-company.com>
common/LogClient: fix sending dup log items

We need to skip even the most recently sent item in order to get to the
ones we haven't sent yet.

Fixes: #9080
Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #2243 from ceph/wip-log-client

common/LogClient: fix sending dup log items

Reviewed-by: Loic Dachary <loic@dachary.org>
Merge remote-tracking branch 'gh/next'

Conflicts:
	PendingReleaseNotes
doc/release-notes: v0.67.10

Signed-off-by: Sage Weil <sage@redhat.com>
init-ceph: conditionally update  after argparsing

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
Merge branch 'wip-8860'

Reviewed-by: Sage Weil <sage@redhat.com>
doc/changelog: v0.67.10 notes

Signed-off-by: Sage Weil <sage@redhat.com>
erasure-code: isa plugin must link with ErasureCode.cc

Otherwise it will not get the methods it needs. A test is added to check
the plugin loads as expected, from the command line. The test is not run
if the isa plugin is not found, which happens on platforms that are not
supported.

Signed-off-by: Loic Dachary <loic@dachary.org>