-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronization specification proposal for multihost tests #1706
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
summary: Define synchronization method for each TMT step | ||
|
||
description: | | ||
The main idea of :ref:`/spec/plans/provision/multihost` | ||
tests is to run certain tasks in parallel (e.g., a RestAPI | ||
requests from a client to a server). Therefore, these kinds | ||
of tests may require test synchronization. | ||
The synchronization method may be specified for each step | ||
by providing one of defined options under ``step`` keyword. | ||
This creates a synchronization barrier before each provided step. | ||
|
||
start | ||
Synchronize at the beginning of the ``step`` by adding | ||
a synchronization barrier at the beginning of the step. | ||
In case of multiple configurations, it also adds a barrier | ||
at the beginning of the ``step``, even if the configuration | ||
filters out every ``test``. | ||
name | ||
Synchronize execution of tests with the same name. Standalone | ||
tests (without parallel test on a different guest) instantly | ||
pass synchronization barrier. ``tmt`` is not responsible for | ||
possible synchronization problems caused by duplicate test names | ||
and similar mistakes. | ||
index | ||
Synchronize execution of all tests by adding a synchronization | ||
barriers in front of each ``test`` execution. | ||
none | ||
**Default** value, which disables the synchronization for | ||
given ``step``. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general, I lack more details about the properties of this "synchronization barrier", namely conditions required to match to pass the barrier. Ok, the general idea is clear, there would be some kind of synchronization points in tmt's workflow, but how do they behave, and what actors are involved?
I'm afraid all this needs to be specified - it should be fairly doable to implement any set of rules, more or less complicated, but synchronization does have many aspects and corner cases, and the specification here seems like a tautology to me: "Synchronize at the beginning of the WRT |
||
|
||
More complex synchronization scenarios can be found :ref:`Multihost synchronization examples. <multihost synchronization example>` | ||
|
||
example: | ||
- | | ||
discover: | ||
how: fmf | ||
url: https://src.fedoraproject.org/rpms/tmt/ | ||
where: client | ||
sync: name # add sync barrier before | ||
|
||
- | | ||
prepare: | ||
- name: packages | ||
how: ansible | ||
playbook: plans/packages.yml | ||
- name: services | ||
how: shell | ||
script: | ||
- systemctl start iperf3.service | ||
- systemctl start netperf.service | ||
- systemctl stop firewalld.service | ||
sync: index # add sync barrier in front of each shell command | ||
|
||
execute: | ||
how: tmt | ||
sync: start # add sync barrier before the execute step |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean
tmt
needs to implement some heuristics to do the syncing properly? Like having two test sets.for
server
and for
client
tmt
should somehow realize that the first common match istest-multi-1
and sync on that? I guess that may become quite complicated when more than 2 servers are involved and there is quite a lot of space for deadlocks. Would you have some specific idea how this would be implemented?