Skip to content

Commit

Permalink
Parallelize the provision step
Browse files Browse the repository at this point in the history
This change requires refactoring of current queue internals, to better
support the third kind of parallelization & queueing. A custom queue
task is needed, to run provisioning in parallel, and the step takes care
of ordering of provision phases and actions.
  • Loading branch information
happz authored and psss committed Jan 5, 2024
1 parent 5723f88 commit 0aa7db6
Show file tree
Hide file tree
Showing 15 changed files with 742 additions and 374 deletions.
18 changes: 18 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@
Releases
======================

tmt-1.31
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The :ref:`/spec/plans/provision` step is now able to perform
**provisioning of multiple guests in parallel**. This can
considerably shorten the time needed for guest provisioning in
multihost plans. However, whether the parallel provisioning would
take place depends on what provision plugins were involved,
because not all plugins are compatible with this feature yet. As
of now, only :ref:`/spec/plans/provision/artemis`,
:ref:`/spec/plans/provision/connect`,
:ref:`/spec/plans/provision/container`,
:ref:`/spec/plans/provision/local`, and
:ref:`/spec/plans/provision/virtual` are supported. All other
plugins would gracefully fall back to the pre-1.31 behavior,
provisioning in sequence.


tmt-1.30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion tests/login/step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rlJournalStart
rlAssertGrep "interactive" "output"

if [ "$step" = "provision" ]; then
rlRun "grep '^ $step$' -A6 output | grep -i interactive"
rlRun "grep '^ $step$' -A12 output | grep -i interactive"
elif [ "$step" = "prepare" ]; then
rlRun "grep '^ $step$' -A8 output | grep -i interactive"
elif [ "$step" = "execute" ]; then
Expand Down
8 changes: 4 additions & 4 deletions tests/multihost/complete/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function check_current_topology () {
}

function check_shared_topology () {
rlAssertEquals "Guest names" "client-1 client-2 server" "$(yq -r '."guest-names" | join(" ")' $1)"
rlAssertEquals "Role names" "client server" "$(yq -r '."role-names" | join(" ")' $1)"
rlAssertEquals "Client role guests" "client-1 client-2" "$(yq -r '.roles.client | join(" ")' $1)"
rlAssertEquals "Server role guests" "server" "$(yq -r '.roles.server | join(" ")' $1)"
rlAssertEquals "Guest names" "client-1 client-2 server" "$(yq -r '."guest-names" | sort | join(" ")' $1)"
rlAssertEquals "Role names" "client server" "$(yq -r '."role-names" | sort | join(" ")' $1)"
rlAssertEquals "Client role guests" "client-1 client-2" "$(yq -r '.roles.client | sort | join(" ")' $1)"
rlAssertEquals "Server role guests" "server" "$(yq -r '.roles.server | sort | join(" ")' $1)"

rlAssertEquals "Guest client-1 name" "client-1" "$(yq -r '.guests["client-1"].name' $1)"
rlAssertEquals "Guest client-1 role" "client" "$(yq -r '.guests["client-1"].role' $1)"
Expand Down
Loading

0 comments on commit 0aa7db6

Please sign in to comment.