This callback can be used to track progress and also to attempt to cancel
the operation while it's in-progress by returning a negative error code
from the callback.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
use a smart pointer instead of using 'new' to resolve a memory leak .
Fixes: https://tracker.ceph.com/issues/40936
Signed-off-by: XiaoGuoDong2019 <xiaogd@inspur.com>
fix klocwork issues:
function 'strcpy' does not check buffer boundaries but outputs to buffer 'watcher.addr' of fixed size (256)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
put_file() in vstart_runner.py should ignore the error when source and
destination paths supplied are same, since source and destination for
put_file() method in teuthology are on different machines, they
represent different locations.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a method to test that the cd command changes the current working
directory to the path passed as an argument to it.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a method to test that the cd command changes the current working
directory to root when no argument is passed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Move tests into different classes created on the basis of a shell
functionality within the testsuite. This arrangement allows running
tests related to only one functionality at a time.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a new method that runs the given CephFS shell script on the given
mount and returns the output with whitespace removed.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Add a method to test_cephfs_shell.py that allows running CephFS shell
script using option "-b" of cephfs-shell.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Instead the current working directory should change to root when no
argument is passed to cd.
Fixes: http://tracker.ceph.com/issues/40476
Signed-off-by: Rishabh Dave <ridave@redhat.com>
this header uses `std::string`, `std::string_view` and
`std::stringstream`, so it should include the corresponding headers.
Signed-off-by: Kefu Chai <kchai@redhat.com>
in python2, in addition to `str`, a string could also be unicode
string. there is chance that user passes a unicode string to
`set_health_checks()`, so let's check for unicode string also.
in python3, all strings are `unicode` string, and `PyString_Check()` is
defined as an alias of `PyUnicode_Check()`, so we are fine with python3.
the wrapper method of `PyString_ToString()` returns a pair of converted
string and a bool. if it fails to detect a string, an empty string and
false are returned.
Signed-off-by: Kefu Chai <kchai@redhat.com>
dep-report.sh depends on .Po and .Plo files under .deps/, which is
created by automake. but we've switched to CMake. so we cannot use
these depfile or temporary depfiles anymore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/29034/head:
doc/mgr/crash: document missing commands, options
qa/suites/rados/singleton/all/test-crash: whitelist RECENT_CRASH
qa/suites/rados/mgr/tasks/insights: whitelist RECENT_CRASH
qa/tasks/mgr/test_insights: crash module now rejects bad crash reports
mgr/telemetry: fix remote into crash do_ls()
mgr/crash: don't make these methods static
mgr/BaseMgrModule: handle unicode health detail strings
mgr/crash: verify timestamp is valid
qa/suites/mgr: whitelist RECENT_CRASH
mgr/crash: remove unused var
mgr/crash: remove unused import 'six'
qa/workunits/rados/test_crash: health check
mgr/crash: improve validation on post
mgr/crash: automatically prune old crashes after a year
mgr/crash: raise RECENT_CRASH warning for recent (new) crashes
mgr/crash: add 'crash ls-new'
mgr/crash: add option and serve infra
mgr/crash: keep copy of crashes in memory
mgr/pg_autoscaler: adjust style to match built-in tables
mgr/crash: make 'crash ls' a nice table with a NEW column
mgr/crash: nicely format 'crash info' output
mgr/crash: add 'crash archive <id>', 'crash archive-all' commands
Reviewed-by: Neha Ojha <nojha@redhat.com>
* refs/pull/29180/head:
mon/FSCommand: set pg_num_min via 'fs new', not in mgr/volumes
mon/FSCommands: set pg_autoscale_factor on 'fs new', not via mgr/volumes
mon: set recovery_priority=5 on fs metadata pool
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
* refs/pull/29124/head:
test/old/test*buffers.cc: remove tests against bufferlist
test/old/test_*seek_read: remove this test
test/old/test{crush,bucket}: remove stale tests
test/old/testmpi.cc: remove this test
test/old/testxattr.cc: remove this test
test/old/testtree.cc: remove test for BinaryTree
Reviewed-by: Sage Weil <sage@redhat.com>
This commit fixes a problem caused by changes to the error
descriptions in the RBD python bindings introduced in:
a66b06cc764ba66cdabfe2856e9f1bcd738f0772
Signed-off-by: Ricardo Dias <rdias@suse.com>
Otherwise one can get a "API rate limit exceeded for $YOUR_IP." message
when working from company offices and such.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
complete_external_callback (which requires ImageCtx) is used to
prevent concurrent callbacks, and not needed in this particular case.
Signed-off-by: Mykola Golub <mgolub@suse.com>
in fbd4836d, a regression is introduced:
self.log("failed to read erasure_code_profile. %s was likely removed",
pool)
because `self.log` is actually a lambda which just do
self.logger.info(x)
in this change
* `Thrasher.log()` is added for three reasons:
- in PEP-8,
> Always use a def statement instead of an assignment statement that
> binds a lambda expression directly to an identifier
so a better way is to define a method using `def`
- and i think it helps with the readability
* `logger` parameter is now mandatory now in the constructor of
`Thrasher` class. because the instance of this class is only created
by `qa/tasks/thrashosds.py`, like:
thrash_proc = ceph_manager.Thrasher(
cluster_manager,
config,
logger=log.getChild('thrasher')
)
and `log.getChild()` does not return `None`, so there is no need to
handle that case.
Signed-off-by: Kefu Chai <kchai@redhat.com>