rgw: optionally call FCGX_Free() on the fcgi connection

Fixes: #10194

A new configurable controls this behavior. This forces disconnection of
the fcgi connection when done with the request.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Merge pull request #3124 from ceph/wip-10194-firefly

rgw: optionally call FCGX_Free() on the fcgi connection

Reviewed-by: Sage Weil <sage@redhat.com>
tests: avoid tab interpretation problem on fedora 20

Use . instead of tab in echo to avoid variations in how escape sequences
are interpreted by the shell.

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
tests: histogram prevent re-use of local variables

By moving the test to a separate function.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit ee02293ad2ef050672fa8c164ba17b10e8d4ceeb)
tests: histogram prevent re-use of local variables

By moving the tests to separate functions.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 4b8b25ecd128c34a386ad7c4cc89f323c4d384e1)
osd/OSD.cc: parse lsb release data via lsb_release

Use lsb_release tool to be portable since parsing /etc/lsb-release
is not the same between different distributions. The old code failed
e.g. for SUSE products to parse LSB information.

Fixes: #8654

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 0b3a3987d382ff33fdf892f189b30df22be80e59)
tests: prevent kill race condition

When trying to kill a daemon, keep its pid in a variable instead of
retrieving it from the pidfile multiple times. It prevents the following
race condition:

  * try to kill ceph-mon
  * ceph-mon is in the process of dying and removed its pidfile
  * try to kill ceph-mon fails because the pidfile is not found
  * another ceph-mon is spawned and fails to bind the port
    because the previous ceph-mon is still holding it

Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit a1c13c57ba20fc329d943ea57523913e11067dc7)
test/ceph-disk.sh: fix for SUSE

On SUSE 'which' returns always the full path of (shell) commands and
not e.g. './ceph-conf' as on Debian. Add check also for full
path returned by which.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 39530536ff923b91899f6303507c283b78040a20)
test/ceph-disk.sh: resolve symlinks before check

Make sure symlinks are resolved in command_fixture()
before compare result of which command and the current
path.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit 8ea86dfa7c4a3d7e089cf9d4e49586657875f851)
test/ceph-disk.sh: mkdir -p

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit c2f58e6694a2457200ab3d59e037ad17b9c82028)