Project

Profile

Help

Issue #2593

closed

Single-package error during sync is not being propogated up through the CLI

Added by dalley about 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Low
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Steps to Recreate

1. Create a scenario which will cause an error during sync on a single package
2. Attempt a sync
3. Observe that the "Error" field is empty
4. View the task details via the API to see that the "error_details" field does contain the error message

mkdir zoolander
cd zoolander
wget https://davidd.fedorapeople.org/repos/zoo-lander/cat-1.0-1.noarch.rpm
wget https://davidd.fedorapeople.org/repos/zoo-lander/camel-0.1-1.noarch.rpm
wget https://davidd.fedorapeople.org/repos/zoo-lander/bear-4.1-1.noarch.rpm
createrepo .
chmod 777 *
sudo chown root bear-4.1-1.noarch.rpm
sudo chmod 000 bear-4.1-1.noarch.rpm 
pulp-admin rpm repo create --repo-id zoolander --feed file://`pwd`
pulp-admin rpm repo sync run --repo-id zoolander

Below is the pulp-admin output for the sync command. Notice that while it reports the package for which an individual package error occurred, it does not report the error message. It is left blank.

[vagrant@dev ~]$ pulp-admin rpm repo sync run --repo-id zoolander
+----------------------------------------------------------------------+
                  Synchronizing Repository [zoolander]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.

Downloading metadata...
[-]
... completed

Downloading repository content...
[==================================================] 100%
RPMs:       1/1 items
Delta RPMs: 0/0 items

... completed

Individual package errors encountered during sync:

Package: file:///home/vagrant/zoolander/bear-4.1-1.noarch.rpm
Error:   

Downloading distribution files...
[==================================================] 100%
Distributions: 0/0 items
... completed

Importing errata...
[-]
... completed

Importing package groups/categories...
[-]
... completed

Cleaning duplicate packages...
[-]
... completed

Task Succeeded

Task Succeeded

By viewing the full progress report via the API with one of these commands

  • pulp-admin -vv tasks details --task-id <<sync_task_id>>

We can see that an error message is indeed provided in the full report

........

 "result": {
            "_ns": "repo_sync_results",
            "added_count": 0,
            "completed": "2017-02-16T20:07:35Z",
            "details": {
                "comps": {
                    "state": "FINISHED"
                },
                "content": {
                    "details": {
                        "drpm_done": 0,
                        "drpm_total": 0,
                        "rpm_done": 1,
                        "rpm_total": 1
                    },
                    "error_details": [
                        {
                            "errors": [
                                "[Errno 13] Permission denied: u'///home/vagrant/zoolander/bear-4.1-1.noarch.rpm'"
                            ],
                            "url": "file:///home/vagrant/zoolander/bear-4.1-1.noarch.rpm"
                        }
                    ],

........

Also available in: Atom PDF