This eliminates several ugly conditional blocks. This commit also does some
cleanup like dropping the ceph-base runtime dependency on "python", which is
implicit in "python-requests".
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The python3-ceph-argparse package is only necessary in environments where
Python 3 might not be available. For distros where Python 3 has become
standard with Python 2 an optional extension (instead of vice versa as
in the current status quo), the files in this package can (and should)
be included in ceph-common directly.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
As a follow-up to d7b493a710 we need to stop guarding
ceph-osdomap-tool
ceph-monstore-tool
with WITH_TESTS because they have been moved out of the ceph-test package.
(N.B. ceph-kvstore-tool was also moved out of ceph-test, but apparently never
had the guard.)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Sometimes the build machine has lots of processor cores and not enough
memory to successfully build Ceph on all of them at once. Calculate
how many parallel build processes we can sustain with the memory we
have and set a lower build parallelism if necessary. Never exceed
the value set by %_smp_mflags even if memory is aplenty.
Credits to Tomáš Chvátal for the original idea and implementation.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Fixes RPMLINT warning "non-standard-group Development/Libraries"
Also, the Group: line is only needed for SUSE so put it in an appropriate
distro conditional.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Previously only a service with debug_ms>=1 would dump
corrupt messages: in an upgrade test we're *alway*
interested in a corrupt message.
Signed-off-by: John Spray <john.spray@redhat.com>
list_modules is really about searching for them
on disk, so it's now probe_modules and private.
Both methods now return values instead of populating
an argument, since when called they were always writing into
a newly constructed container.
Signed-off-by: John Spray <john.spray@redhat.com>
Enable people to see can_run failures and the explanatory
messages (telling them about a missing dependency)
before trying to enable a module.
Signed-off-by: John Spray <john.spray@redhat.com>
...and for all modules, not just the active ones.
This enables us to give better feedback to the user
when they try and use a command from a disabled module,
and also fixes the race between enabling a module and
trying to use its commands.
Fixes: http://tracker.ceph.com/issues/21683
Signed-off-by: John Spray <john.spray@redhat.com>
This is to enable us to learn more about the module
before it is enabled, such as whether its can_run method
return true.
We can also use this to enable loading a module's
commands before it is enabled, to give the user
a better response when they try to use a command
belong to a module that is not loaded.
Signed-off-by: John Spray <john.spray@redhat.com>
With this macro, we can use a single Source0 line for all supported distros.
RH/CentOS/Fedora needs the prefix, while SUSE builds in the OBS use a local
tarball.
Signed-off-by: Nathan Cutler <ncutler@suse.com>