Multihost synchronization
The issue gathers all discussions regarding synchronization problems in multi-host tests.
Adding several points and proposals from the last discussion.
All sync is an enumerator with these values:
- start - synchronize at the beginning of the step, the first test execution
- name - synchronize with the same test names
- index - synchronize all tests, synchronization barrier before each test
- none - do not synchronize
Multihost
- L1 metadata (test metadata) key multihost: true
- Could be used for filtering relevant multihost tests
- Could be worked around by “filter: tag:multihost”
- Could also be useful for syncing multihost tests only
- Mixing singlehost & multihost tests has a real use case
- For example single host setup tasks
- There could be a different number of setup tasks on server/client
- Or sandwich testing: setup / test / inter-setup / test-again
- wow differentiates setup tasks and init tasks
- BeakerJobWatch uses this information
Keyword correct location
Defining sync in the execution step is too late and hard to process. The current proposal is to make sync a step attribute with the values defined above.
Examples
prepare:
- name: packages
how: ansible
playbook: plans/packages.yml
- name: services
how: shell
script: systemctl start service
sync: index
execute:
how: tmt
sync: start
discover:
- name: setup-tasks
how: fmf
url: https://github.com/teemtee/tmt
sync: none
- name: multihost-tests
how: fmf
url: https://src.fedoraproject.org/rpms/tmt/
where: client
sync: name
It would be great to gather more advanced user stories or test cases requiring complex synchronization patterns and barriers.
@sopos @kkaarreell : Would you please provide your feedback and use-cases?
@adiosnb See https://github.com/teemtee/tmt/discussions/1702#discussioncomment-4226375
Generic multi-host test discussion can be found here: https://github.com/teemtee/tmt/discussions/1702
@adiosnb hi, is this issue still valid? There is a degree of synchronization implemented in tmt, as described in https://tmt.readthedocs.io/en/stable/guide.html#multihost-testing, and the test-level synchronization is not implemented on purpose, and 3rd party libraries can be used for that, as documented in https://tmt.readthedocs.io/en/stable/guide.html#synchronization-libraries.
Basic synchronization implemented, for more advanced use cases users are adviced to check synchronization libraries.