doc: fix deb/debian typo

Signed-off-by: Jeremy Hanmer <jeremy@dreamhost.com>
Merge pull request #124 from fzylogic/master

doc: fix deb/debian typo
cthulhu: Refactor RequestCollection to be global

This is instead of having one per ClusterMonitor.  The
idea here is two accomplish two things:
* Expose RequestCollection to ServerMonitor
* Enable REST API to easily list all the requests

The alternative was to instantiate an additional RequestCollection
for servers.  This would have been awkward, because requests on
servers are also "in" zero or more clusters, so the API querying
for requests would have become complicated, touching multiple
RequestCollections.

A separate RequestCollection encapsulated in ServerMonitor would
also have lacked calls to its on_map method for notifications.  This
way, the global RequestCollection gets all notifications, so any
request (whether a cluster one or a server one) can subscribe to anything
its interested in.

Signed-off-by: John Spray <john.spray@inktank.com>
cthulhu: Nicer OsdRequestFactory messages

Special cases for in/out/down/reweight.

Signed-off-by: John Spray <john.spray@inktank.com>
cthulhu: remove workaround for saltstack #11928

The upstream release version now includes the fix,
since 2013.1.2.

Fixes: #8075

Signed-off-by: John Spray <john.spray@inktank.com>
rest_api: add 'CLI' resource

This is to enable REST API consumers to do anything
with the Ceph CLI that we don't currently expose
fully in our API.

It uses the same mechanism as the log tailer: calling
directly out to the cluster from the REST API layer.  That
mechanism is generalised into RemoteViewSet.

Signed-off-by: John Spray <john.spray@inktank.com>
rest_api: refactor salt grain code

Concentrate the access to salt in one place.

Signed-off-by: John Spray <john.spray@inktank.com>
calamari_rest: validate 'status' properly on key

Previously attempts to reject an accepted key would
be accepted but would have no effect: now validate
that the only allowed transitions are pre->[accepted|rejected].

Also remove some comments about handling 404s, as that
has been covered by NotFound exceptions for a while.

Signed-off-by: John Spray <john.spray@inktank.com>
calamari_rest: fix API help_text on event severity

(work around rest_framework limitation and note
 the upstream PR so we can remove workaround when
 that's released)

Signed-off-by: John Spray <john.spray@inktank.com>
Makefile: only run the needed test for api docs

(was running redundant test_touch_urls_in_a_404_way)

Signed-off-by: John Spray <john.spray@inktank.com>
calamari_rest: suppress DeprecationWarnings in 3rd party code

These were annoying spam when running unit tests.

Signed-off-by: John Spray <john.spray@inktank.com>
rest_api: update requests/ and add cancellation

Add a global /request/ URL in addition to the one
which is specific to a cluster (/cluster/<fsid>/request).

Hook up the cancel() method of RequestCollection to a new
/request/<request id>/cancel URL.

Signed-off-by: John Spray <john.spray@inktank.com>
cthulhu: test/debug hooks for jobs

Enabling automated testing of cancellation.

Signed-off-by: John Spray <john.spray@inktank.com>
cthulhu: make 'manhole' module optional

One less mandatory dependency.

Signed-off-by: John Spray <john.spray@inktank.com>
calamari_rest: Make graphite module optional

One less mandatory dependency.

Signed-off-by: John Spray <john.spray@inktank.com>
calamari_rest: gracefully degrade without sqlalchemy

Makes sqlalchemy optional: even history will always appear
empty if it is absent.

One less mandatory dependency.

Signed-off-by: John Spray <john.spray@inktank.com>
cthulhu: null persistence with no sqlalchemy

One less mandatory dependency.

Signed-off-by: John Spray <john.spray@inktank.com>
requirements: a new cut-down set of deps

The minimal requirements for a no-frills
calamari instance with just the core Ceph
API functionality.

Signed-off-by: John Spray <john.spray@inktank.com>
doc: clean up development/

Enables build in a much more lightweight
environment (such as readthedocs.org)

Signed-off-by: John Spray <john.spray@inktank.com>
doc: remove setup.cfg, broke RTD build

Known pip bug, certain versions dislike a
setup.cfg in source dir.  Removing our
CFG is harmless because it was only
setting test log format.

https://github.com/pypa/pip/issues/1531

Signed-off-by: John Spray <john.spray@inktank.com>