roles_to_remotes will take a config key, 'roles' by default,
and search cluster.remotes for those roles, returning a list
of remotes that hold it. The list is uniquified by default,
but that can be overridden. So you can have a task that
should run on specific roles, configure it with
"roles: [mon.0 server.0 osd.2]", and call this to get a list
of remotes that contain those roles.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
When testing new tasks, it's a drag to have to keep manually unlocking
the targets. Default behavior is to keep them locked for any failure;
this allows overriding that choice for the case where the failure is
in debugging the task, where the state of the targets isn't important.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
This involves moving everything in build_ceph_cluster() inside the try:
block, so if an exception fails the cleanup in the finally: block will
actually be executed.
New versions of ssh-keyscan return two keytypes if possible; this
breaks the comparison of "number of lines of output from keyscan"
to "number of hosts we request keys from". Fix by asking for only
one type of key (as older ssh-keyscans did).
Fixes: #7164
Signed-off-by: Dan Mick <dan.mick@inktank.com>
This is the main source of noise when running valgrind +
tcmalloc. Apparently there are other issues, so I think we
still need the notcmalloc gitbuilder, but this gets us part of
the way.
Signed-off-by: Sage Weil <sage@inktank.com>
See #7171. In rare cases CRUSH can't handle it when only 2/6 of
the OSDs are marked in. Avoid those situations for now.
Signed-off-by: Sage Weil <sage@inktank.com>
Currently, to see if a node has rebooted into the right kernel,
need_to_install() compares a given 40-char commit hash with a 7-char
commit hash abbreviation it pulls from the output of 'uname -r'.
gitbuilders can now export UTS_RELEASE kernel version string through
.../$SHA1/version file. Use this string instead of the 40-char commit
hash and compare it with the output of 'uname -r' directly. This saves
us the parsing exercise and, more importantly, makes it possible to
install clean tagged kernels using 'tag:' element, which wasn't
possible before because version string of such kernels doesn't have
a commit hash in it.
If version file is unavailable, fallback to the existing way of doing
things.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
in connect(). The bug caused vm behavior to happen for a
target if any of the machines in the cluster was a vm. The code
was also changed to set the key to none only if rsa or dsa keys
were used on a vm.
Fixes: 7113
Signed-off-by: Warren Usui <warren.usui@inktank.com>