saltstack / saltstack/salt

[BUG] parallel salt-cloud libvirt creation fails

Open
#58,995 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Salt-Cloud ZD
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description

Creating multiple instances in parallel with salt-cloud using libvirt fails.

Steps to Reproduce the behavior

salt-cloud -m /etc/salt/cloud.map.conf -P vm1 vm2
[DEBUG   ] libvirt error (1, 18, "internal error: pool 'system' has asynchronous jobs running.", 2, 'internal error: %s', "pool 'system' has asynchronous jobs running.", None, -1, -1)
[INFO    ] Cleaning up after exception
[DEBUG   ] volume xxx.qcow2 cleaned up
[DEBUG   ] libvirt error (1, 18, "internal error: pool 'system' has asynchronous jobs running.", 2, 'internal error: %s', "pool 'system' has asynchronous jobs running.", None, -1, -1)
[INFO    ] Cleaning up after exception
[DEBUG   ] volume yyy.qcow2 cleaned up

Expected behavior

If VMs can not be created in parallel with libvirt and salt-cloud, this should be:

  • documented; and
  • automatically prevented, either by ignoring -P for this provider, or exiting with an error if -P is provided.

If VMs can be created in parallel with some improved code, then ideally it would be implemented.

Version

Second-hand report using 3002.

Additional context

In fairness, the salt-cloud docs do warn that parallel creation may not work for all providers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the salt-cloud -m /etc/salt/cloud.map.conf -P vm1 vm2 command and the libvirt provider, using the reported asynchronous pool error as the symptom to trace. Review the salt-cloud parallel-creation path and provider documentation; the work is done when parallel behavior is either supported reliably or explicitly prevented and documented.

Written by the indexing model from the issue text.

Assessment

Domain
cloud, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.