Project

Profile

Help

Issue #1127

closed

Incorrect error message when sync fails with Permission Denied

Added by igulina@redhat.com over 8 years ago. Updated almost 5 years ago.

Status:
CLOSED - WONTFIX
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.7.0 Beta
Platform Release:
OS:
RHEL 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

>> rpm -qa pulp-server
pulp-server-2.7.0-0.4.beta.el7.noarch

Verifying #995
1. Download https://pulp.plan.io/attachments/download/124/repo.tar.gz
2. unzip anywhere, there will be a repo named "zoo5"
3. create rpm repo with --feed=file:///path/to/zoo5
4. sync this repo
5 get error:

Task Failed
Error retrieving metadata: Not found

6. sync with -vv option:

"traceback": "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n R = retval = fun(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 394, in call\n return super(Task, self).__call__(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in protected_call\n return self.run(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/sync.py\", line 93, in sync\n call_config)\n File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/sync.py\", line 147, in _do_sync\n sync_report = sync_repo(transfer_repo, conduit, call_config)\n File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 559, in wrap_f\n return f(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/importer.py\", line 66, in sync_repo\n report = self._current_sync.run()\n File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/importers/yum/sync.py\", line 178, in run\n # was not able to find any valid url\nPulpCodedException: Error retrieving metadata: Not found\n",

Actions #1

Updated by ipanova@redhat.com over 8 years ago

I am not able to reproduce this. Fresh install of pulp 2.7.0.0.3.beta

# wget https://pulp.plan.io/attachments/download/124/repo.tar.gz
--2015-07-10 14:44:05--  https://pulp.plan.io/attachments/download/124/repo.tar.gz
Resolving pulp.plan.io (pulp.plan.io)... 82.98.82.207
Connecting to pulp.plan.io (pulp.plan.io)|82.98.82.207|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17137 (17K) [application/x-gzip]
Saving to: ‘repo.tar.gz’

repo.tar.gz                                     100%[=======================================================================================================>]  16.74K  --.-KB/s   in 0.02s  

2015-07-10 14:44:05 (776 KB/s) - ‘repo.tar.gz’ saved [17137/17137]

[root@ec2-54-78-44-32 ~]# tar -zxvf repo.tar.gz -C /var/lib/pulp/
zoo5/
zoo5/images/
zoo5/images/test1.img
zoo5/images/test2.img
zoo5/updateinfo.xml
zoo5/walrus-0.3-0.8.noarch.rpm
zoo5/.treeinfo
zoo5/giraffe-0.3-0.8.noarch.rpm
zoo5/lion-0.3-0.8.noarch.rpm
zoo5/squirrel-0.3-0.8.noarch.rpm
zoo5/elephant-0.3-0.8.noarch.rpm
zoo5/CHANGESET
zoo5/cheetah-0.3-0.8.noarch.rpm
zoo5/monkey-0.3-0.8.noarch.rpm
zoo5/PULP_MANIFEST
zoo5/penguin-0.3-0.8.noarch.rpm
zoo5/empty.iso
zoo5/repodata/
zoo5/repodata/a4ea9fcdce31dc8673c7a9ba66c086bd6a16e1eff717e3896dd1cac444a1423c-primary.xml.gz
zoo5/repodata/69d65cdebffc6199d3adb3e38b06ca9abaae6c1c7366805099987b28f182178d-filelists.sqlite.bz2
zoo5/repodata/799241a518a4a6b11a68f8e6fbdb719875f87832f60accc0851ced0d6a0497c6-updateinfo.xml.gz
zoo5/repodata/0e54cb196011da03698dce677434bd28a75df9babdddc34ee5b0cdfcae5074fb-updateinfo.xml.gz
zoo5/repodata/32c0e38317aade0c057b173ff62344e912e1bd650409c6ac31aecee78e3413af-comps.xml.gz
zoo5/repodata/63aedd074d9f0daf7c6be8c61f91d76a962bb6ceda86b9abd2140f154c320fa2-other.sqlite.bz2
zoo5/repodata/06661e2a9839cf0beebcf409410ca4f93c09081f4e772fd0d03e1faf62705a11-comps.xml
zoo5/repodata/298ce23f48b3613e030d19f3d9c2ff2df31c2f08479bdf94cebb87c208e48c0e-filelists.xml.gz
zoo5/repodata/fb9b9508e148368d0edf7e03dc905b343937fd958e6531cce6380933d18c3455-primary.sqlite.bz2
zoo5/repodata/0c4d57a68f9a3b13dabc6f8b01ca8958aa796167cececee04717edfc26d02f2d-other.xml.gz
zoo5/repodata/repomd.xml
zoo5/create.sh
[root@ec2-54-78-44-32 ~]# pulp-admin -u admin -p admin rpm repo create --repo-id ccc --feed=file:///var/lib/pulp/zoo5/
Successfully created repository [ccc]

[root@ec2-54-78-44-32 ~]# pulp-admin -u admin -p admin rpm repo sync run --repo-id ccc
+----------------------------------------------------------------------+
                     Synchronizing Repository [ccc]
+----------------------------------------------------------------------+

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

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

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

... completed

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

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

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

Task Succeeded

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
8 of 8 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
2 of 2 items
... completed

Publishing Comps file
[==================================================] 100%
3 of 3 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[-]
... completed

Writing Listings File
[-]
... completed

Task Succeeded

Can someone else confirm that he also was not able to reproduce that?

Actions #2

Updated by mhrivnak over 8 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

This was likely a filesystem permission or selinux issue, where the apache user could not read the files. For example, the apache process cannot read from /tmp.

Please re-open if you think there is a pulp bug here.

Actions #3

Updated by igulina@redhat.com over 8 years ago

  • Subject changed from metadata: Not found when sync repo with local feed to Incorrect error message when sync fails with Permission Denied
  • Status changed from CLOSED - WORKSFORME to NEW

If a directory doesn't have permissions for apache and SElinux is Enforcing, pulp returns an error:

Task Failed
Error retrieving metadata: Not found

I expect smth like Permission denied.

>> pulp-admin rpm repo create --repo-id zoo --feed=file:///home/ec2-user/zoo5/
The specified user does not have permission to execute the given command

>> pulp-admin login -u admin -p admin 
Successfully logged in. Session certificate will expire at Jul 20 15:25:20 2015
GMT.

>> pulp-admin rpm repo create --repo-id zoo --feed=file:///home/ec2-user/zoo5/
Successfully created repository [zoo]

>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

>> sudo su -
Last login: Mon Jul 13 11:14:22 EDT 2015 on pts/0

>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found
>> getenforce 
Enforcing
>> setenforce 1
>> getenforce 
>> setenforce 0
>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

>> exit
>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

[-]
Waiting to begin...

Task Failed

Error retrieving metadata: Not found

>> ls -l zoo5/
total 52
-rw-r--r--. 1 ec2-user ec2-user  167 May 20 18:17 CHANGESET
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 cheetah-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 1487 May 20 18:17 create.sh
-rw-r--r--. 1 ec2-user ec2-user 2244 May 20 18:17 elephant-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user    0 May 20 18:17 empty.iso
-rw-r--r--. 1 ec2-user ec2-user 2236 May 20 18:17 giraffe-0.3-0.8.noarch.rpm
drwxr-xr-x. 2 ec2-user ec2-user   38 May 20 18:17 images
-rw-r--r--. 1 ec2-user ec2-user 2212 May 20 18:17 lion-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 monkey-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 penguin-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user   80 May 20 18:17 PULP_MANIFEST
drwxr-xr-x. 2 ec2-user ec2-user 4096 May 20 18:17 repodata
-rw-r--r--. 1 ec2-user ec2-user 2248 May 20 18:17 squirrel-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user  839 May 20 18:17 updateinfo.xml
-rw-r--r--. 1 ec2-user ec2-user 2236 May 20 18:17 walrus-0.3-0.8.noarch.rpm
>> rpm -qa pulp-server
pulp-server-2.7.0-0.4.beta.el7.noarch
>> chown apache:apache /home/ec2-user/zoo5/
chown: changing ownership of ‘/home/ec2-user/zoo5/’: Operation not permitted
>>sudo chown apache:apache /home/ec2-user/zoo5/
>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

>> ls -l /home/ec2-user/zoo5/
total 52
-rw-r--r--. 1 ec2-user ec2-user  167 May 20 18:17 CHANGESET
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 cheetah-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 1487 May 20 18:17 create.sh
-rw-r--r--. 1 ec2-user ec2-user 2244 May 20 18:17 elephant-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user    0 May 20 18:17 empty.iso
-rw-r--r--. 1 ec2-user ec2-user 2236 May 20 18:17 giraffe-0.3-0.8.noarch.rpm
drwxr-xr-x. 2 ec2-user ec2-user   38 May 20 18:17 images
-rw-r--r--. 1 ec2-user ec2-user 2212 May 20 18:17 lion-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 monkey-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user 2232 May 20 18:17 penguin-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user   80 May 20 18:17 PULP_MANIFEST
drwxr-xr-x. 2 ec2-user ec2-user 4096 May 20 18:17 repodata
-rw-r--r--. 1 ec2-user ec2-user 2248 May 20 18:17 squirrel-0.3-0.8.noarch.rpm
-rw-r--r--. 1 ec2-user ec2-user  839 May 20 18:17 updateinfo.xml
-rw-r--r--. 1 ec2-user ec2-user 2236 May 20 18:17 walrus-0.3-0.8.noarch.rpm
>> ls -l /home/ec2-user/
total 24
-rw-r--r--. 1 ec2-user ec2-user 17137 May 20 18:30 repo.tar.gz
drwxr-xr-x. 4 apache   apache    4096 May 20 18:17 zoo5
>> sudo chown -R apache:apache /home/ec2-user/zoo5/
>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

>> ls -l /home/ec2-user/zoo5/
total 52
-rw-r--r--. 1 apache apache  167 May 20 18:17 CHANGESET
-rw-r--r--. 1 apache apache 2232 May 20 18:17 cheetah-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache 1487 May 20 18:17 create.sh
-rw-r--r--. 1 apache apache 2244 May 20 18:17 elephant-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache    0 May 20 18:17 empty.iso
-rw-r--r--. 1 apache apache 2236 May 20 18:17 giraffe-0.3-0.8.noarch.rpm
drwxr-xr-x. 2 apache apache   38 May 20 18:17 images
-rw-r--r--. 1 apache apache 2212 May 20 18:17 lion-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache 2232 May 20 18:17 monkey-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache 2232 May 20 18:17 penguin-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache   80 May 20 18:17 PULP_MANIFEST
drwxr-xr-x. 2 apache apache 4096 May 20 18:17 repodata
-rw-r--r--. 1 apache apache 2248 May 20 18:17 squirrel-0.3-0.8.noarch.rpm
-rw-r--r--. 1 apache apache  839 May 20 18:17 updateinfo.xml
-rw-r--r--. 1 apache apache 2236 May 20 18:17 walrus-0.3-0.8.noarch.rpm

>> sudo su -
Last login: Mon Jul 13 11:31:12 EDT 2015 on pts/0
>> pulp-admin rpm repo sync run --repo-id zoo
+----------------------------------------------------------------------+
                     Synchronizing Repository [zoo]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

Moving evering to /var/lib/
>> mv /home/ec2-user/zoo5/ /var/lib
>> ls -l /var/lib/
total 20
drwxr-xr-x. 2 root    root      66 Jul 13 11:10 alternatives
drwx------. 3 root    root      17 Sep 29  2014 authconfig
drwxr-xr-x. 2 chrony  chrony    18 Jul 13 11:13 chrony
drwxr-xr-x. 8 root    root      98 Jan 16 17:01 cloud
drwx------. 2 apache  apache     6 Dec  2  2014 dav
drwxr-xr-x. 2 root    root       6 Nov 28  2014 dbus
drwxr-xr-x. 2 root    root       6 Jan 22 03:26 dhclient
drwxr-xr-x. 2 root    root       6 Feb 28 20:12 dnsmasq
drwxr-xr-x. 2 root    root       6 Mar 13  2014 games
drwxr-xr-x. 3 root    root      22 Jul 13 11:12 gofer
drwxr-xr-x. 2 root    root       6 Jun 11  2014 hiera
drwxr-xr-x. 2 root    root      27 Feb  9 14:33 inital-setup
drwxr-xr-x. 2 root    root       6 May  7 08:49 initramfs
-rw-r--r--. 1 root    root     508 Jul 13 08:17 logrotate.status
drwxr-xr-x. 2 root    root      36 Jul 13 07:43 misc
drwxr-x---. 4 mongodb root    4096 Jul 13 11:11 mongodb
drwxr-xr-x. 2 root    root    4096 Jan 29 14:50 NetworkManager
drwxr-xr-x. 2 root    root       6 Jan 26  2014 os-prober
drwxr-x---. 3 root    polkitd   27 Feb  9 14:30 polkit-1
drwx------. 2 postfix root      24 Jul 13 07:43 postfix
drwxr-xr-x. 5 apache  apache    62 Jul 13 11:13 pulp
drwxr-xr-x. 2 puppet  puppet     6 Aug 19  2014 puppet
drwxr-xr-x. 3 qpidd   qpidd     19 Jul 13 11:09 qpidd
drwxr-xr-x. 5 root    root      64 Feb 19 07:20 rhsm
drwxr-xr-x. 2 root    root    4096 Jan 12 06:19 rpm
drwxr-xr-x. 3 root    root      17 Jul 13 11:10 rpm-state
drwx------. 2 root    root       6 Oct  7  2014 rsyslog
drwxr-xr-x. 2 root    root       6 Nov 10  2014 selinux
drwxr-xr-x. 4 root    root      33 Jan 15 04:17 stateless
drwxr-xr-x. 4 root    root      53 May 21 03:36 systemd
drwx------. 2 tss     tss        6 May 26 12:08 tpm
drwxr-xr-x. 2 root    root       6 Sep 17  2014 up2date
drwxr-xr-x. 7 root    root      88 Jul 13 11:13 yum
drwxr-xr-x. 4 apache  apache  4096 May 20 18:17 zoo5
>> pulp-admin rpm repo create --repo-id marfusha --feed=file://var/lib/zoo5/
Successfully created repository [marfusha]

>> pulp-admin rpm repo sync run --repo-id marfusha
+----------------------------------------------------------------------+
                  Synchronizing Repository [marfusha]
+----------------------------------------------------------------------+

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

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

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

... completed

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

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

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

Task Succeeded

Initializing repo metadata
[-]
... completed

Publishing Distribution files
[-]
... completed

Publishing RPMs
[==================================================] 100%
8 of 8 items
... completed

Publishing Delta RPMs
... skipped

Publishing Errata
[==================================================] 100%
2 of 2 items
... completed

Publishing Comps file
[==================================================] 100%
3 of 3 items
... completed

Publishing Metadata.
[-]
... completed

Closing repo metadata
[-]
... completed

Generating sqlite files
... skipped

Publishing files to web
[-]
... completed

Writing Listings File
[-]
... completed

Task Succeeded

>>  setenforce 1
>> pulp-admin rpm repo sync run --repo-id marfusha
+----------------------------------------------------------------------+
                  Synchronizing Repository [marfusha]
+----------------------------------------------------------------------+

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

Task Failed

Error retrieving metadata: Not found

It might be related to #1128

Actions #4

Updated by jortel@redhat.com over 8 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by igulina@redhat.com over 8 years ago

  • Parent issue set to #995
Actions #6

Updated by igulina@redhat.com over 8 years ago

  • Parent issue deleted (#995)
Actions #7

Updated by igulina@redhat.com over 8 years ago

  • Blocked by Issue #995: Syncing yum repo raises error added
Actions #8

Updated by igulina@redhat.com over 8 years ago

  • Blocked by deleted (Issue #995: Syncing yum repo raises error)
Actions #9

Updated by igulina@redhat.com over 8 years ago

  • Blocks Issue #995: Syncing yum repo raises error added
Actions #10

Updated by bmbouter over 8 years ago

  • Blocks deleted (Issue #995: Syncing yum repo raises error)
Actions #11

Updated by bmbouter almost 5 years ago

  • Status changed from NEW to CLOSED - WONTFIX
Actions #12

Updated by bmbouter almost 5 years ago

Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.

Actions #13

Updated by bmbouter almost 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF