Description
If the yum hosted metadata is fetched before it is generated then a 404 will be returned. Because the negative cache handler has been incorrectly implemented on hosted the 404 will still be returned after the metadata has been generate. This is true for RPMs as well (fetched before upload and fetched after upload). There is no way to clear the negative cache without waiting for it to expire or restarting the server.
The Yum hosted recipe is adding the NegativeCacheHandler (i.e. https://github.com/sonatype/nexus-internal/blob/30c875f80f2406800b8ec37cc618bee0cfd47897/private/plugins/nexus-repository-yum/src/main/java/org/sonatype/nexus/repository/yum/internal/hosted/YumHostedRecipe.groovy#L90)