ansible / mazer

Experimental Ansible Galaxy Content Manager
GNU General Public License v3.0
114 stars 18 forks source link

Implement collection install/update/remove transactions. #128

Open alikins opened 6 years ago

alikins commented 6 years ago

Feature Request

Use Case

What problem does this feature solve? Please describe. Currently, the way installs are updated is incremental. Failures or errors in the midst of installing collections can result in partial or incomplete installs.

This can fail in multiple ways including:

Proposed Solution

Describe the solution you'd like A clear and concise description of what you want to happen. Add any considered drawbacks.

There are two main parts of resolving the issue:

  1. Keeping track of the requested installs and the state of the install of each collection/repo as it is being installed, and on failure, being able to determine what is incomplete.

Once the status of the individual installs are tracked, then next step would be supporting rolling back partially installed transactions that fails.

This is collection/repo granularity

  1. Making collection archive extraction to the file system atomic.

ie, installing to a shadow dir and then mv'ing the content into final path atomically. This is to prevent ansible from potentially using partially installed content (if a ansible-playbook run reads the content dir while mazer is in the process of changing it).

Also to prevent potential file races.

And to prevent a fatal error in mazer from leaving the content path in an incomplete state.

Alternatives

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Possibly cross process locking for the case of ansible and mazer running concurrently. Quite likely that may be required in addition to the above requirements.

Implementation

Unknown

chouseknecht commented 6 years ago

@alikins

This seems like a must have for Mazer. Considering this approved, and adding it to the 1.0 milestone.