This isn't perfect, but it's better than nothing. Prevent enabling the
allow_ec_overwrites flag if any of a sample of pgs in the pool map to
osds using filestore. This mainly protects filestore-only clusters
from enabling it.
If a filestore osd is started later, warn in the cluster log when it
gets a pg with ec overwrites enabled.
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Sometimes I get output like:
HEALTH_ERR 2 pgs stuck unclean; Full ratio(s) out of order
Which goes away over time. So it is a transit issue
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
in given keyring file, should alert user and should not allow this import.
Because in 'ceph auth list' we keep all the keyrings with caps and importing
'client.admin' user keyring without caps locks the cluster with error[1]
because admin keyring caps are missing in 'ceph auth'.
[1] Error connecting to cluster: PermissionDeniedError
Fixes: http://tracker.ceph.com/issues/18932
Signed-off-by: Vikhyat Umrao <vumrao@redhat.com>
When a variable is not being observed we currently mark it
"unchangable". This can be misleading so try something hopefully a
little more informative.
Fixes: http://tracker.ceph.com/issues/18424
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
This means users don't have to manually translate a rule
they just created to a ruleset ID in order to map a pool
to it.
Signed-off-by: Sage Weil <sage@redhat.com>
This is a dev hack to generate a bunch of bogus osdmaps. The maps are
all screwed up anyway (e.g., invalid addrs) and this is minimally useful.
Signed-off-by: Sage Weil <sage@redhat.com>
If we have an OSD with a weight that's not 1.0 and mark it out,
we should restore the same weight when we mark it back in. We
already do this when an OSD is automatically marked out, just
not when it is explicitly marked out.
Signed-off-by: Sage Weil <sage@redhat.com>
The variable 'pgs_per_osd' set value from 'new_pgs' divided by 'expected_osds',
and its type is integer. So it would remove the decimal point and get smaller value.
This would have problem in some situations, for exmaple:
The limitation of pg creating for one OSD is '32'.
There have 3 OSDs and I want to increase pgs for a pool.
It should be the limitation for creating new pgs up to '96(32 * 3)' at once.
Now, I create '98' pgs for a pool.
In original code, '98' would be divided by 'expected_osds' and get the floating value '32....'
Because of the type which is integer, the 'pgs_per_osd' would be set to 32.
Then the value won't bigger than the limitation and get the wrong result.
Signed-off-by: DesmondS <desmond.s@inwinstack.com>
Fixes: http://tracker.ceph.com/issues/17169
For newly created cluster the CEPH_OSDMAP_REQUIRE_KRAKEN will be
automatically set, while for existing clusters it will not.
This change add "require_jewel_osds" to white list, so user
can access it by the "ceph osd set *" command family.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
create temp directory and files in $TMPDIR. the $TMPDIR is hard-wired to
/tmp before this change, we'd better respect the env variable $TMPDIR,
so it would be more consistent, and easier to do the cleanup if any.
Signed-off-by: Kefu Chai <kchai@redhat.com>
this fixes failures like,
/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/cephtool/test.sh:
line 32: ceph osd blacklist ls | grep 192.168.0.1: command not found
where the failure is not the "failure" we are expecting.
in our tests, following command
expect_false "ceph osd blacklist ls | grep 192.168.0.1"
is designed to to verify that "ceph osd blacklist ls | grep 192.168.0.1"
fails with non-zero return code. but expect_false() evaluates the command
line using plain "$@", which will send the arguments direct to the shell,
and $0 is "ceph auth get client.xx | grep caps | grep mon", which does
not exist and is not built-in command. so we need to check the grep
command instead.
for multiple piped command line, use
expect_false sh <<< "echo foo | grep bar | grep baz"
Signed-off-by: Kefu Chai <kchai@redhat.com>