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
Merged

Conversation

cbosdo
Copy link
Collaborator

@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 as a code owner Nov 5, 2019
@ghost ghost requested a review from Ch3LL Nov 5, 2019
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch from daa649c to 14b3ff4 Compare Nov 5, 2019
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch from 14b3ff4 to c1d6831 Compare Nov 5, 2019
@cbosdo
Copy link
Collaborator Author

@cbosdo 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 Dec 12, 2019
@cbosdo cbosdo force-pushed the master-pool-running-improvements branch 3 times, most recently from 79f18f1 to e29d35e Compare Dec 20, 2019
cbosdo added 8 commits Dec 23, 2019
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 Dec 23, 2019
dwoz
dwoz approved these changes Dec 23, 2019
@dwoz dwoz merged commit d447d80 into saltstack:master Dec 23, 2019
49 checks passed
@cbosdo cbosdo deleted the master-pool-running-improvements branch Dec 26, 2019
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.

None yet

2 participants