test/multi_stress_watch: use condition_variable for level triggering
Reviewed-By: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
This is particularly useful for debugging purposes when clean_temps()
takes abnormally high amount of time due to flaws in crush rules etc.
Fixes: https://tracker.ceph.com/issues/47159
Signed-off-by: Neha Ojha <nojha@redhat.com>
To avoid the need to expose internal librbd symbols as public, expose
a select set of symbols via an internal plugin API for use by the
plugins.
Fixes: https://tracker.ceph.com/issues/46916
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
While UPDATE <table_name> AS <alias> ... should be valid SQL syntax. It seems
like only some sqlite version support it however.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
fromisoformat was introduced in pytho3.7. This can be worked around by
either installing
https://github.com/movermeyer/backports.datetime_fromisoformat. If a
pre3.7 python is found and the backport module is not installed,
snap_schedule falls back to parsing a fully specified timestamp
format. This commit adds the necessary code.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
To enable the use of a minutely repeat interval in the snap schedules,
this adds a guard that checks for the SNAP_SCHED_TEST env variable.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This adds a simple test for the Schedule.store_schedule. This test
exposed a bug (couldn't add schedule on different paths with the same
repeat and start time). Bug is also fixed.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This separates the Schedule class from the SnapSchedClient class.
Motivation is cleaner code layout and simpler testing.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This allows to 1) activate schedules that have previously been
deactivated due to the path no existing and 2) allowing ussers to
explicitly deactivate a schedule for debugging or maintenance purposes.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
This commit adds a bunch of interesting metadata fields to the DB and
refactors the Schedule class so that it concentrates all the DB queries
in on place. Also enables to set multiple schedules per path as long as
the (repeat interval, start time) pairs are unique.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
Timers are scheduled for the next snapshot to be taken. The next Timer
is canceled in case the snapshot DB is changed. When a Timer triggers it
also schedules the next Timer.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
If a mgr module encounters an argument values containing a '=' parsing
switches to kwargs style parsing independent of arg position. If a
non-kw argument is encountered after the first kw argument an EINVAL
error is returned.
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
It is no longer a global variable, so rename the ones that have to do
with options for unmapping (currently just "force").
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
The default pool name does not get passed to the kernel since commit
96f05a7956 ("rbd: delay determination of default pool name"). The
kernel ends up interpreting the image name as the pool name (and the
snapshot name as the image name).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>