creating an empty publication before syncing with mirror=true could cause clients to refuse to use metadata
Given the current workflow with katello:
- create a repository and a remote pointing to some upstream repo
- create a publication against version zero (timestamp in the repomd.xml file is CURRENT_TIME)
- distribute it
- configure a client to use the repo, yum repolist will show zero packages (as expected)
- Sync the repo with mirror=true
- distribute the newly created publication
- run yum repolist on the client
The client will refuse to pull down new metadata becuase the new metadata has an older timestamp than the original empty metadata.
A likely solution is to support specifying a repomd.xml timestamp when creating a publication.
Updated by dalley about 2 years ago
- Triaged changed from No to Yes
The way we'll probably fix this long-term is by bifurcating "repositories" into repositories which are exact clones of the upstream ones, like Katello library repos, and managed repos.
Clone repos can't be modified or published, and managed repos can't be synced against remotes. See for more details: https://pulp.plan.io/issues/8856
In the meantime we can only really mitigate this issue by (having Katello) not publish, or having a special case which uses a revision of 0 if the repository is going to be empty (no packages), which will resolve the issue in one particular case. Generally speaking if the repo is flipping between mirror and non-mirror, there is not a lot we can do.