This is pretty minimal at this point, but it works so far (or will, once a few open PRs merge).
Main problematic area right now is that the multi-cluster stuff isn't right. We should fix that before continuing, since ceph-daemon for once can do multiple clusters well.
Signed-off-by: Sage Weil <sage@redhat.com>
Sometimes, `authorized_keys` file does not end with a newline and
therefore the public key generated by ceph-daemon gets appended to
the same line of the previous key. Therefore we need to append a
newline before our key to guarantee that the above case does not
happen.
Signed-off-by: Ricardo Dias <rdias@suse.com>
Instead of checking if the --yes-i-really-mean-it
flag was set _after_ removing the MDS daemon, we
need to check if before starting any removal operation.
Fixes: https://tracker.ceph.com/issues/42931
Signed-off-by: Joshua Schmid <jschmid@suse.de>
mgr/dashboard: Unable to set boolean values to false when default is true
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
* refs/pull/31748/head:
qa/standalone/test_ceph_daemon.sh: remove old vg before creating
qa/standalone/test_ceph_daemon.sh: sudo for untar
qa/standalone/test_ceph_daemon.sh: sudo for losetup etc
qa/standalone/test_ceph_daemon.sh: fix overwrites of temp files
Reviewed-by: Michael Fritch <mfritch@suse.com>
mgr/dashboard: open files with UTF-8 encoding in Grafana checking script
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
`PlacementSpec` instances could be constructed with `nodes=None`, see
`OrchestratorCli._mds_add()` in orchestrator_cli/module.py, so we need
to handle the case of `None`.
also, it's dangerous to pass a list as the default parameter to a
method in python, as the value of reference point to that list will
be stored. and multiple calls of that method will share the same
instance of list. which is not expected under most circumstances.
in this change, list comprehension is unsed instead of more functional
`list(map(...))`, because, the behavior of `map()` in python3 is quite
different from that in python2. in python3, `map()` returns an iterator.
and `list()` actually materializes the iterator by walking through it,
and `list()` changes the iterator by advancing it. so, to improve the
readability and to reduce the menta load of developers, list
comprehension is better in most cases.
Signed-off-by: Kefu Chai <kchai@redhat.com>
When onodes are added to the cache, they may have more than one
reference already. Due to the implicit nature of boost::intrusive, in
the common case of creating a new Onode, they have 3 references at
this point.
Since they haven't been added to the cache yet, Onode::get() could not
pin them when they went from 1->2 references. Instead, take care of it
when they do get added to the cache. The pinning in get() is still
needed in case they get unpinned and then referenced again while still
cached.
This lack of pinning meant that newly created onodes were immediately
removed from the cache, since the last step of adding a new onode is
trimming the cache. In tests that read the object just after queueing
a write to it, the read got ENOENT, when it should have read the onode
from cache.
Fixes: https://tracker.ceph.com/issues/42495
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
The routine does type checking anyway, plus, to be uniform
with other APIs.
Fixes: http://tracker.ceph.com/issues/42923
Signed-off-by: Venky Shankar <vshankar@redhat.com>
The deepsea.tgz tar contains actual device nodes for the OSD block devices
(not symlinks or files). Must be root to untar.
Signed-off-by: Sage Weil <sage@redhat.com>
mktemp creates these files, so we have to pass --allow-overwrite (or
delete them after we get the unique name but before we write to them--this
is easier).
Broken by c7fe27a72a
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/31418/head:
test: use distinct subvolume/group/snapshot names
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
* refs/pull/31531/head:
cmake: link ceph-fuse against librt
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Snapshot existence validation code was removed from krbd. It was racy
and relied on having watch established for snapshots.
Fixes: https://tracker.ceph.com/issues/42916
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
`seastar::do_with(T&& rvalue, F&& f) takes object for lifetime
extension by rvalue reference. This imposes materialization of
a temporary to move from even when `do_with()` is being called
like:
`do_with(OpsExecuter{...}, [] { /* ... */)`.
The reason behind that is following language rule:
"Temporary objects are created when a prvalue is materialized
so that it can be used as a glvalue, which occurs (since C++17)
in the following situations:
* binding a reference to a prvalue"
(from: "Temporary object lifetime", cppreference.com)
As OpsExecuter is pretty heavy-weight, it is reasonable to avoid
`do_with()` and perform the lifetime extension with smart pointer.
Additional benefit is squeezing plain-to-errorated conversion in
`seastar::internal::do_with_state::get_future()`.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>