Affects Version/s: 6.13.0, 6.11.3
Fix Version/s: None
Whenever the metadata for the RPM remote repository cache is corrupted, Artifactory fails to update the metadata from the remote endpoint and the yum client fails with the error "Metadata file does not match checksum". We tried setting the "Metadata retrieval cache period" to 0 and we expect that as this parameter is set to 0, Artifactory should be able to fetch the metadata every time a request comes but the request is not handled until and unless we delete the contents of the cache and perform zap cache.
We were able to reproduce the same behaviour by corrupting the metadata manually.
These are the steps we followed,
- Create a remote repository "rpm-elastic" in Artifactory instance Art-1 which connects to https://artifacts.elastic.co/packages/
- Create a smart remote repository "rpm-smart-elastic" in other Artifactory instance Art-2 which points to "rpm-elastic" repository of Art-1.
- Configure the yum client to work with "rpm-smart-elastic" and we would be able to install and list the elasticsearch packages.
Now to reproduce the issue,
1. Created one local repository "rpm-local" in Art-2 and added the corrupted metadata files.
2. Replicated the metadata files from "rpm-local" to "rpm-smart-elastic" repository, now the "rpm-smart-elastic" contains the corrupted metadata file in its cache.
3. Once the files are replicated, we changed the remote endpoint of the smart remote repository "rpm-smart-elastic" to point to the "rpm-elastic" repository of Art-1.
4. When we try to list or install the elasticsearch package using the yum client, it throws "Metadata file does not match checksum" instead of fetching the new metadata from Art-1's "rpm-elastic" repository.
To work around the issue, we manually should clear the cache and perform zap cache so that Artifactory could get the new Metadata from the remote endpoint otherwise we can use the expirePackagesMetadata plugin.