rgw: Adds passwd alternative to keystone admin token

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

This adds options parsing to have a user, password and tenant,
to be able to ask for a token.
This token is then used to authenticate against keystone, instead
of relying on the admin token.
Otherwise, you can still use the admin token to authenticate.
This doesn't change the existing behaviour.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
rgw: Use keystone password to validate token too

Adds the alternative use of password, instead of admin token,
to validate tokens.

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
rgw: Use JSONFormatter to use keystone API

Signed-off-by: Christophe Courtaut <christophe.courtaut@gmail.com>
doc/release-notes: fix indentation

ERROR: /srv/autobuild-ceph/gitbuilder.git/build/doc/release-notes.rst:48: Unexpected indentation.

Signed-off-by: Sage Weil <sage@inktank.com>
doc/release-notes: fix formatting

Signed-off-by: Sage Weil <sage@inktank.com>
doc/release-notes: formatting

Signed-off-by: Sage Weil <sage@inktank.com>
doc: Removed nova-volume, early Ceph references and Folsom references.

fixes: 5006

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Restored show_image_direct and added a link to older versions.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Removed the Folsom reference.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
os/chain_listxattr: fix leak fix

e22347df3854a5c5ebc6631c62d70447d67d722d added a bad goto; just free
explicitly instead.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
test/rados/list.cc: we might get some objects more than once

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
test/osd/RadosModel.h: select and reserve roll_back_to atomically

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
PGLog: remove obsolete assert in merge_log

This assert assumes that if olog.head != log.head, olog contains
a log entry at log.head, which may not be true since pg splitting
might have left the log with arbitrary holes.

Related: 0c2769d3321bff6e85ec57c85a08ee0b8e751bcb
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
prio-q: initialize cur iterator

For new SubQueues `cur` is not intialized, so front/pop_front will freak
out. I honestly I have no idea how this hasn't been seen, but it was
being triggered frequently on OSX.

Fixes: #6686

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
sharedptr_registry.hpp: removed ptrs need to not blast contents

See the included unit test update.  Consider:
1) x = lookup_or_create(1, 1)
2) remove(1)
3) y = lookup_or_create(1, 2)
4) x.reset()
5) z = lookup(1)

The bug is that z will be null since x.reset() caused the
cleanup callback to remove y's key value from contents.

To fix this, contents also records the pointer value for
the weak_ptr.  The removal callback only removes the
key from contents if it matches the ptr in contents.

This should work since the pointer passed to the removal
callback must be unique up to that point since it has
not yet been deleted.

This allowed a pg removal -> pg recreation -> pg removal
sequence to cause the second pg removal entry to be
erroneously cleared by the first pg removal's destructor
as it finally made its way through the removal queue.

Fixes: #5951
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
[rgw] Set initialized to true after populating table in hex_to_num()

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Wrap hex_to_num table into class HexTable

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Merge pull request #766 from kri5/wip-5374

Rebase of Wip 5374 against master

Reviewed-by: Yehuda Sadeh <yehdua@inktank.com>
Merge pull request #792 from ceph/wip-doc-openstack

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
docs: Fix a typo in RGW documentation