Task #1200
Updated by bmbouter over 9 years ago
Each repo has 'lazy passive' or 'lazy active' enabled by setting a key named 'lazy_sync' whose value takes on either 'active' or 'passive'. These configs are read by each plugin's implementation of the 'sync' importer. h2. Plugin updates The following two things will Those sync importers need to be done in each plugins. <sad face> adjust their code flow to do the following when lazy_sync is set: * Build "the unit catalog" * If lazy_sync is set at to any value, sync the metadata and do not download non-metadata units. This will need to be done in each plugin's implementation of the sync handler. FYI, the plugin specific code is "called by the platform sync task here":https://github.com/pulp/pulp/blob/bfc6ba121ab0cf8a7d01e06f5d0b51390248d381/server/pulp/server/controllers/repository.py#L555. h2. Platform updates The handling of the lazy_sync = active case can be 100% in platform code. The task it is calling (#1199) is plugin agnostic, and also all it needs to do is dispatch the task and save the spawned task on the TaskResult for the sync. I recommend "doing this here":https://github.com/pulp/pulp/blob/bfc6ba121ab0cf8a7d01e06f5d0b51390248d381/server/pulp/server/controllers/repository.py#L604. One important point is that the publish spawned task needs to be listed *before* the generic #1199 download task. If it is not done in this order then the CLI won't show sync, then publish, then the status of the generic #1199. Instead it would should sync, a long delay while #1199 completes, and *then* the publish which on a large repo sync would not be a great CLI experience.