Content is not downloaded after switching from on_demand to immediate policy
Steps to reproduce:
- create repo
- create importer with on_demand policy
- update importer, set policy to immediate
- sync again
Observe that no files were downloaded.
My guess is that importer looks into
pulp_file_filecontent only and builds
inventory based on the data from it without checking an existence of corresponding artifact in case of immediate policy.
#2 Updated by firstname.lastname@example.org almost 3 years ago
The basic problem is that the importer is determining there is no content in the remote repository that needs to be added to the local (pulp) repository. Nothing to do.
We need to take a holistic approach here.
- The user is responsible for triggering a repository-download task when changing the policy to immediate.
- The policy change (to immediate) could trigger a repository-download task automatically. But, what if this fails?
- The policy change needs to be noticed by the plugin (perhaps with help from the platform). Upon noticing this, the plugin needs to attempt to download artifacts just as it does when adding content (to the repository) that already exists.
The last option involving the importer is least desirable. It adds unwanted complexity to every importer. Either 1 or 2 or combination of 1 and 2 seems like the best idea.
Please register to edit this issue