Bug 1092572
| Summary: | Puppet install distributors on big puppet repos become unavailable during the time it is getting "recreated" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Petter Hassberg <petter.hassberg> | ||||
| Component: | puppet-support | Assignee: | Barnaby Court <bcourt> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 2.3 | CC: | bcourt, jrooth, mhrivnak, petter.hassberg, pthomas, rbarlow, skarmark | ||||
| Target Milestone: | --- | Keywords: | Reopened, Triaged | ||||
| Target Release: | 2.5.0 | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-11-24 21:33:46 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Petter Hassberg
2014-04-29 13:35:07 UTC
OK clarification, its when publishing the repo the problem pops up, and not simply uploading to it. Can you please provide the specific pulp commands that you are running? We don't fully understand what you are attempting to do. Please feel free re-open this if you would like to add complete steps to reproduce. OK
The call is for the repo to puppet_install_distributor:
"/pulp/api/v2/repositories/%s/" % repo_id
This ~ is the payload:
{
"id": puppet_install_distributor
}
What we do when adding a unit to a puppet repo, before being able to import this module into foreman, we do a publish of the puppet repo.
When publish is coming to the step of the "install distributor" for that repo, not only does it take sometimes a very long time to perform the publish operation, but also since it starts by clearing the destination directory, if target path is used by a puppet master, that whole puppet environment is efficiently unusable until the publish operation is complete.
# clear out pre-existing contents
try:
self._clear_destination_directory(destination)
except (IOError, OSError), e:
return publish_conduit.build_failure_report(
'failed to clear destination directory: %s' % str(e),
self.detail_report.report)
# actually publish
for unit in units:
[...]
With the behavior to start the publish operation with clearing the pre-existing contents first is problematic, since if foreman starts an import during the time between the destination dir is cleared and to the point in time where the whole repo is published, it will want to DELETE the classes not yet published on the node.
Also, if the dir is used by a puppet master, puppet will be unable to run intil the whole directory is republished.
hence my suggestion to:
1. only the units which have a newer timestamp than last publish date for repo gets expanded onto the dstination dir (the other ones left as is)
or
2. destination in this code is a temporary destination onto where the units are published, then as a final step. the new dir gets moved to the "real" destination dir.
Created attachment 910020 [details]
Proposed patch
Proposed fix to create a temporary directory for pulp modules while running the install_distributor, so as to minimize the gap in where the module path is unusable.
This was fixed in the 2.4.1-0.1.alpha build. We are rebasing pulp-2.4.1, and so all of these bugs can no longer be considered MODIFIED. We will need to recheck them against the rebased build to make sure the cherry picking strategy did not introduce any regressions. build: 2.5.0-0.6.beta verified pulp-puppet-handlers-2.5.0-0.8.beta.el6.noarch python-pulp-puppet-common-2.5.0-0.8.beta.el6.noarch pulp-puppet-plugins-2.5.0-0.8.beta.el6.noarch pulp-puppet-admin-extensions-2.5.0-0.8.beta.el6.noarch pulp-puppet-consumer-extensions-2.5.0-0.8.beta.el6.noarch [root@qe-blade-12 ~]# [root@qe-blade-12 ~]# |