mon: OSDMonitor: do not write full_latest during trim

On commit 81983bab we patched OSDMonitor::update_from_paxos() such that we
write the latest full map version to 'full_latest' each time the latest
full map was built from the incremental versions.

This change however clashed with OSDMonitor::encode_trim_extra(), which
also wrote to 'full_latest' on each trim, writing instead the version of
the *oldest* full map.  This duality of behaviors could lead the store
to an inconsistent state across the monitors (although there's no sign of
it actually imposing any issues besides rebuilding already existing full
maps on some monitors).

We now stop OSDMonitor::encode_trim_extra() from writing to 'full_latest'.
This function will still write out the oldest full map it has in the store,
but it will no longer write to full_latest, instead leaving it up to
OSDMonitor::update_from_paxos() to figure it out -- and it already does.

Fixes: #6378

Backport: dumpling

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: fix bl resize on write vs truncate race

If we resize the write due to the funky truncate behavior, we need to
resize the bufferlist to match.

Fixes: #6346
Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #645 from liewegas/wip-6346

Reviewed-by: Greg Farnum <greg@inktank.com>
qa/run_xfstests.sh: use old xfstests until we adapt to new org

Tests were rearranged upstream; use an old version for the time being
until we can refactor run_xfstests.sh to cope.  See #6385

Signed-off-by: Sage Weil <sage@inktank.com>
Add CEPH_ARGS at the end of sys.argv

This allows, for instance, to pass a different client name to ceph by
exporting CEPH_ARGS="--id client_id".

Signed-off-by: Benoît Knecht <benoit.knecht@fsfe.org>
Signed-off-by: Sage Weil <sage@inktank.com>
Revert "ceph: parse CEPH_ARGS environment variable"

This reverts commit 67a95b9880c9bc6e858150352318d68d64ed74ad.

We now put CEPH_ARGS in the actual args we parse in python, which are passed
to rados piecemeal later.  This lets you put things like --id ... in there
that need to be parsed before librados is initialized.
Merge pull request #647 from ceph/wip-ceph-cli-env

improve ceph clie CEPH_ARGS handling

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Merge pull request #646 from liewegas/wip-6385

qa/run_xfstests.sh: use old xfstests until we adapt to new org

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
ceph_argparse.py, cephtool/test.sh: fix blacklist with no nonce

It's legal to give a CephEntityAddr to osd blacklist with no nonce,
so allow it in the valid() method; also add validation of any nonce
given that it's a long >= 0.

Also fix comment on CephEntityAddr type description in MonCommands.h,
and add tests for invalid nonces (while fixing the existing tests to remove
the () around expect_false args).

Fixes: #6425
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Merge pull request #648 from dmick/wip-6425

ceph_argparse.py, cephtool/test.sh: fix blacklist with no nonce

Reviewed-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	src/pybind/ceph_argparse.py
test/common/get_command_descriptions: null terminate c string

This fixes a bunch of trailing goop I see on my machine.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge git://github.com/ceph/ceph