The add_to_ceph_s field was not initialized causing unit
test failures from check-generated.sh:
**** ProgressEvent test 1 dump_json check failed ****
ceph-dencoder type ProgressEvent select_test 1 dump_json > /tmp/typ-akwRrjNtt
ceph-dencoder type ProgressEvent select_test 1 encode decode dump_json > /tmp/typ-iDmGaq17A
4c4
< "add_to_ceph_s": false
---
> "add_to_ceph_s": true
Fixes: https://tracker.ceph.com/issues/63950
Signed-off-by: Prashant D <pdhange@redhat.com>
src/mon/OSDMonitor.cc: more descriptive loggings for crc mismatch
Reviewed-by: Laura Flores <lflores@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Follow the same formula to build up obj_state and version_id
in all call sites.
Resolves: rhbz#2163667
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
…ca()
Intelligently push an object to a replica. make use of existing
clones/heads and dup data ranges where possible.
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Edit the section "Add/Remove a Key" in doc/radosgw/admin.rst. Each
operation (e.g. "Adding an S3 key pair for a user", "Removing an S3 key
pair for a user") now has its own subsection. This increased granularity
should make it easier in the future to link to each of these specific
operations, if needed.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
Make minor corrections to doc/releases/reef.rst. These corrections were
suggested by Anthony D'Atri in https://github.com/ceph/ceph/pull/55049.
Signed-off-by: Zac Dover <zac.dover@proton.me>
Disable the Restart= line in the init containers systemd template.
It is commented out as there are probably more appropriate workarounds
to use in the future but this should fix testing on centos8 based
systems.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Now that there is a more robust init_containers.run script, we can use
the new stop and poststop subcommands from the systemd unit.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Convert the init containers run script to be based on a template, like
the sidecar run scripts are. The new script is loosely based on the
sidecars run script but only does actions in batches - logically
iterating over each init container configured.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Move the generation of the init container run script to a small function
fixing a missing `set -e` along the way. This isolates the logic of
generating this run script.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Convert a bunch of invocations of rm via a subprocess to function calls.
This should make it easier (or possible?) to test the function
in the unit test framework as well as possibly saving a few resources.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Remove a line from _rm_cluster that has no effect. The line uses
call_throws to execute an `rm -rf` command. The argument contains
asterisk chars that indicate that the file(s)/dir(s) to be created are
expected to match the given pattern. However, globs do not work in this
context in contemporary versions of cephadm.
To double check I added the following temporary unit test:
```
def test_does_it_glob(tmp_path):
from cephadmlib.call_wrappers import call_throws
d1 = (tmp_path / 'dir1')
d1.mkdir()
fns = ['f1.txt', 'f2.txt', 'f3.txt', 'f4']
for fn in fns:
with open(d1/fn, "w") as fh:
fh.write("xxx")
assert d1.exists()
for fn in fns:
assert (d1 / fn).exists()
ctx = FakeContext()
call_throws(ctx, ['rm', '-rf', f'{d1}/*.txt'])
print('files:', os.listdir(d1))
assert d1.exists()
for fn in fns:
if fn.endswith('.txt'):
assert not (d1 / fn).exists()
else:
assert (d1 / fn).exists()
```
If globs worked in this context this test would have passed. It does
not. I confirmed that the current implementation of call/call_wrapper
does not execute the command in a shell context.
I wondered if it was possible that an earlier version of cephadm did
execute this command in a shell context and some changes along the way
changed the behavior. I tracked the origin of the line back to
16ebc62034 the first change to implement
rm-cluster. In this commit the code uses subprocess.check_output
directly. I am familiar with check_output and unless `shell=True` is
passed this function doesn't execute the args in a shell context. The
`shell=True` argument is not passed to check_output. This means that the
very first implementation of this line suffered from the same issue
- it would have no effect on any files except one named with actual
asterisk (`*`) characters.
While I'm sure there was a good intention behind this line, the fact
that it persisted in the code so long in a non-functional state and no
one noticed in both production and qa testing makes me feel that it can
be safely removed with no negative effect. Removing the line simplifies
the code and avoids needing to spend effort unit-testing or manually
checking a fix.
Signed-off-by: John Mulligan <jmulligan@redhat.com>