Issue #1835
closed
export fails when units are not downloaded
Status:
CLOSED - CURRENTRELEASE
Description
When a repository has been sync'd with an on_demand download policy, and one or more units have not been fully downloaded, the export distributor will fail, reporting numerous file copy operation failures. The distributor should instead fail gracefull.
A good option would be to check at the beginning of the task if all units in the repo are downloaded, using a simple database query. Fail gracefully if not. This would prevent it from attempting any copy operations.
- Platform Release set to 2.8.3
- Status changed from NEW to ASSIGNED
- Assignee set to mhrivnak
When trying to export a repo with undownloaded files, this should be the new behavior:
$ pulp-admin rpm repo export run --repo-id=rhel7
+----------------------------------------------------------------------+
Publishing Repository [rhel7]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Task Failed
The repository cannot be exported because some units have not yet been
downloaded.
When trying to export a repo group with undownloaded files, this should be the new behavior:
$ pulp-admin rpm repo group export run --group-id=g1
+----------------------------------------------------------------------+
Exporting Repository Group [g1]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Task Failed
The repository group cannot be exported because these repos have units that have
not yet been downloaded: rhel7, rhel7-copy
- Status changed from ASSIGNED to POST
- Priority changed from Normal to High
- Triaged changed from No to Yes
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Verified
[root@mgmt5 ~]# rpm -qa pulp-server
pulp-server-2.8.3-0.1.beta.git.68.46caf15.el7.noarch
[root@mgmt5 ~]#
[root@mgmt5 ~]# pulp-admin rpm repo group export run --group-id grp1
+----------------------------------------------------------------------+
Exporting Repository Group [grp1]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Task Failed
The repository group cannot be exported because these repos have units that are
not downloaded: zoo
[root@mgmt5 ~]# pulp-admin rpm repo export run --repo-id zoo
+----------------------------------------------------------------------+
Publishing Repository [zoo]
+----------------------------------------------------------------------+
This command may be exited via ctrl+c without affecting the request.
Task Failed
The repository cannot be exported because some units are not downloaded.
[root@mgmt5 ~]#
- Status changed from MODIFIED to 5
- Status changed from 5 to 6
- Status changed from 6 to CLOSED - CURRENTRELEASE
Also available in: Atom
PDF
added distributor methods to ensure all units in a repo have been downloaded
https://pulp.plan.io/issues/1835
re #1835