Project

Profile

Help

Story #6353

Updated by ttereshc over 3 years ago

### Motivation 

 * Clients **Problem:** clients installing packages from RPM mirrors hosted by Pulp don't have access to the original metadata provided in the remote repository. 
 * There are problems with caching and/or load-balancing if multiple instances of pulp produce different metadata syncing from the same remote repository.  
 * If a repo contains duplicated content under different paths, such repo can't be synced at all, unless a path is a part of the content natural key. 

 ### Proposed solution. 

 Add  

 **Solution:** add ability to create repository versions that contain the original metadata from the remote repository. repository 

 This could be accomplished by the following: 

  * Have introducing a way new repository type to distinguish between repositories with managed content and with the exact mirror (e.g. create RPM plugin:  

  - RpmMirrorRepository - only supports sync operation 

 The RPMDistribution will need to support users providing a repository with exact_mirror=True or a new dedicated repository type, RpmMirrorRepository) 
  * For such repos, create a publication at sync time (includes published artifacts and metadata). 
  * For such repos, publish is no-op and always returns the existing publication for the requested repo version. 
  * For such repos, no modifications are allowed except the sync version in mirror mode.  

 #### Pros 

  * non-invasive, only additive model changes 
  * can be implemented in addition to publications. If a plugin which needs it repository or it can be moved to repo version is specified, the pulpcore if it allows plugin input at certain points. 
  * leaves a way for further improvement to handle a more general case, see the full proposal here https://hackmd.io/02KBjCD3Q0WP7p4ALwzhJw#relative_path-in-PublishedArtifact-only 

 #### Cons 

  * doesn't solve the problem of various relative paths for the same content in general way 
  * a separate code path (at times) to handle RpmDistribution should validate that this type repository is of repositories.    RpmMirrorRepository type. 


Back