Code for each command has a return value set yet cephfs-shell itself
doesn't exit with proper return value. This makes cephfs-shell quit with
zero return value all the time.
Also, many tests execute cephfs-shell commands expecting the command to
fail but without expecting the method issuing the command to fail. Fix
these test accordingly by adding a new method (negtest_cephfs_shell_cmd)
that expects the command to fail and allows verifying return value and
error messages.
Fixes: https://tracker.ceph.com/issues/44113
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Re-arrange in the order of their usefulness and use keyword arguments
instead of positional arguments to reduce chances of errors, especially
since test_every_cephfs_shell_cmd_at_invocation overrides these methods.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Move code from __main__ to different methods to avoid sequence of block
of code that are not strictly related to each other. This must cleanup
the code under __main__ and must improve readability.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Test passing each CephFS shell command at invocation of shell. The test
replaces run_cephfs_shell_cmd (and other related methods) by it's own
version of the same method that runs each shell command as
"cephfs-shell -c ceph.conf shellcmd" instead of
"cephfs-shell -c ceph.conf -- shellcmd" and then run each
test_cephfs_shell.py.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Commands like "cephfs-shell mkdir a" should just create the directory
and quit immediately with the command's return value instead of
launching a shell session. A shell session should be launched only if
there are no arguments following "cephfs-shell".
Fixes: https://tracker.ceph.com/issues/43248
Signed-off-by: Rishabh Dave <ridave@redhat.com>
Code in qa/ uses both StringIO and BytesIO. Let's use StringIO
exclusively (unless necessary) for uniformity. The reason for using
StringIO over BytesIO is that tests mostly need stdout as string than
as bytes and StringIO is used more frequently used in qa/ code at this
point.
Signed-off-by: Rishabh Dave <ridave@redhat.com>
mgr/cephadm: use jinja2 to render templates
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
rgw: Adding data cache and CDN capabilities
Reviewed-by: Mark Kogan <mkogan@redhat.com>
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
mgr/dashboard: Migrate Tabs from ngx-bootstrap to ng-bootstrap
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
mgr/dashboard: Use TestBed.inject instead of TestBed.get
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Stephan Müller <smueller@suse.com>
cephadm: fix package is not running when enabler is not none
Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Using ng-bootstrap for Tabs will allow us to easily implement some new features
like only loading 1 tab at a time (already implemented here) and
saving/restoring last opened tab.
Modified the table component to use a clone of the columns list.
Making changes directly to columns var was causing problem when the table was
loaded a second time.
Fixes: https://tracker.ceph.com/issues/45017
Signed-off-by: Tiago Melo <tmelo@suse.com>
The IOs are already dispatched but are not cleared from the
container. This can result in an assertion failure in the destructor.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
When creating the new image dispatch layer, the original flush
upon write-block was dropped. This is resulting in some random race
conditions where object IO is still in-flight when the write-block
indicates it's complete.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
This avoids a potential race with the exclusive lock being acquired by
another thread while the image dispatch layer attempts to acquire it.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
IO from later dispatch layers might have caused the need to acquire the lock
(i.e. like an image refresh). In that case, the IO will be blocked waiting for
the exclusive lock to be acquired -- but will deadlock waiting for the IO
to flush.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
If a journal replay flush is in-progress when the ImageReplayer is stopped,
it can race and result in an assertion failure due to two attempted shutdowns
of the same journal replay state machine.
Fixes: https://tracker.ceph.com/issues/45409
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
otherwise, "osc build" fails like:
[ 5545s] libcephfs-devel-16.0.0-2172.ga59fb9ffac.x86_64.rpm: directories not owned by a package:
[ 5545s] - /usr/include/cephfs/metrics
this addresses a regression introduced by
c669de12e0
Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/vstart_runner: do not teardown test_path if "create-cluster-…
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Kiefer Chang <kiefer.chang@suse.com>