Skip to content
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

pool running improvements #55202

Merged
merged 8 commits into from
Dec 23, 2019

Conversation

cbosdo
Copy link
Contributor

@cbosdo cbosdo commented Nov 5, 2019

What does this PR do?

Enhances the virt.pool_running state to allow editing the pool and handle the test parameter.

What issues does this PR fix or reference?

Previous Behavior

virt.pool_running would only be reporting on a running or starting an existing pool.

New Behavior

virt.pool_running now updates an existing pool if needed, thus restarting the pool if changed.
It also handles the test parameter.

Tests written?

Yes

Commits signed with GPG?

Yes

@cbosdo cbosdo requested a review from a team as a code owner November 5, 2019 10:38
@ghost ghost requested a review from Ch3LL November 5, 2019 10:38
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch from daa649c to 14b3ff4 Compare November 5, 2019 11:13
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch from 14b3ff4 to c1d6831 Compare November 5, 2019 20:48
@cbosdo
Copy link
Contributor Author

cbosdo commented Nov 5, 2019

Based on master + PR #54196

@cbosdo cbosdo force-pushed the master-pool-running-improvements branch 2 times, most recently from f063b84 to 5046b48 Compare December 12, 2019 17:09
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch 3 times, most recently from 79f18f1 to e29d35e Compare December 20, 2019 08:33
When all the source_* parameters of _gen_pool_xml are None, no <source>
element should be generated. Instead we had the following:

    <source><path dir="None"/></source>

Rather than filling a source structure with empty members, directly pass
a None for the source as expected by the jinja template.
Add a function that allows changing a virtual storage pool. By using the
test=True parameter, this function can be used to check if a change
would be done.
With this commit the virt.pool_running state is capable to update an
existing pool before ensuring it is running.

This also adds support for the test parameter.
virt.pool_define example are mentioning a uuid property while this one
should be named value. The code was right, but not the doc.
In order to define iscsi-direct virtual storage pools, the use needs to
be able to provide the initiator IQN. Add a parameter for it in:
  * virt.pool_define module function
  * virt.pool_update module function
  * virt.pool_running state
According to libvirt schemas and doc only the volume secrets have a
type.
Libvirt stores RBD and iSCSI passwords in secrets. Add a password field
in the source_auth parameter of virt.pool_define and virt.pool_update to
set the password value rather than reuse an already defined libvirt
secret.
libvirt needs the CIFS source path not to start with a /. Let's remove
them since this could be a common user mistake.
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch from e29d35e to 24f593a Compare December 23, 2019 08:16
@dwoz dwoz merged commit d447d80 into saltstack:master Dec 23, 2019
@cbosdo cbosdo deleted the master-pool-running-improvements branch December 26, 2019 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants