Bug 662771 - repo add_errata fails
Summary: repo add_errata fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-12-13 20:18 UTC by Preethi Thomas
Modified: 2011-08-16 14:00 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:00:26 UTC
Embargoed:


Attachments (Terms of Use)

Description Preethi Thomas 2010-12-13 20:18:43 UTC
Description of problem:
[root@preethi ~]# rpm -q pulp
pulp-0.0.114-1.fc14.noarch


[root@preethi ~]#  pulp-admin -u admin -p admin repo add_errata --id=pulp --errata=FEDORA-2010-16827 --source=f14-updates
error: operation failed: "Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py\", line 124, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py\", line 540, in add_errata\n    api.add_errata(id, data['errataid'])\n  File \"/usr/lib/python2.7/site-packages/pulp/server/api/repo.py\", line 704, in add_errata\n    updateinfo.generate_updateinfo(repo)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/updateinfo.py\", line 127, in generate_updateinfo\n    updateinfo_path)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/upload.py\", line 110, in modify_repo\n    raise ModifyRepoError(out)\nModifyRepoError: Could not access repository: /var/lib/pulp/repos/pulp/repodata/repomd.xml not found\n"



2010-12-13 15:22:09,091 [INFO][Dummy-4] create_repo() @ upload.py:90 - Checking what metadata types are available: ['filelists', 'other', 'primary']
2010-12-13 15:22:09,423 [INFO][Dummy-4] create_repo() @ upload.py:102 - [createrepo --update /var/lib/pulp/repos/repos/pulp/pulp/fedora-14/i386] on /var/lib/pulp/repos/repos/pulp/pulp/fedora-14/i386 finished
2010-12-13 15:22:09,494 [ERROR][Dummy-4] generate_updateinfo() @ updateinfo.py:123 - Error writing updateinfo.xml to path /var/lib/pulp/repos/pulp//updateinfo.xml
2010-12-13 15:22:09,712 [ERROR][Dummy-4] modify_repo() @ upload.py:109 - modifyrepo on /var/lib/pulp/repos/pulp/repodata failed
2010-12-13 15:22:09,713 [ERROR][Dummy-4] report_error() @ base.py:57 - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py", line 53, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py", line 124, in check_roles
    result = f(instance, *fargs, **kw)
  File "/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py", line 540, in add_errata
    api.add_errata(id, data['errataid'])
  File "/usr/lib/python2.7/site-packages/pulp/server/api/repo.py", line 704, in add_errata
    updateinfo.generate_updateinfo(repo)
  File "/usr/lib/python2.7/site-packages/pulp/server/updateinfo.py", line 127, in generate_updateinfo
    updateinfo_path)
  File "/usr/lib/python2.7/site-packages/pulp/server/upload.py", line 110, in modify_repo
    raise ModifyRepoError(out)
ModifyRepoError: Could not access repository: /var/lib/pulp/repos/pulp/repodata/repomd.xml not found

Comment 1 Pradeep Kilambi 2010-12-13 20:27:02 UTC
that looks like your pulp repo doesnt have any metadata in it? you cannot add an  errata to a repo that has no metadata. If there is no repomd.xml then the repo is invalid imo.

Comment 2 Pradeep Kilambi 2010-12-13 20:30:55 UTC
also make sure that directory is readable, I just did the following:


$ sudo pulp-admin repo create --id=foo
Successfully created repository [ foo ]


$ sudo pulp-admin repo content --id=pk03
+------------------------------------------+
              Contents of pk03
+------------------------------------------+

Packages in pk03: 

emoticons-0.1-2.x86_64.rpm
patb-0.1-2.x86_64.rpm

Errata in pk03: 

RHEA-2010:9999

files in pk03: 

 none


$ sudo pulp-admin repo add_errata --id=foo --source=pk03 -eRHEA-2010:9999
Successfully added Errata ['RHEA-2010:9999'] to repo [foo].


$ sudo ls /var/lib/pulp/repos/foo/
emoticons-0.1-2.x86_64.rpm  patb-0.1-2.x86_64.rpm       repodata/                   updateinfo.xml

Comment 3 Pradeep Kilambi 2010-12-13 20:59:26 UTC
With a fedora repo:


$ sudo pulp-admin repo add_errata --id=bar --source=f13-updates --errata=FEDORA-2010-8880
Successfully added Errata ['FEDORA-2010-8880'] to repo [bar].

$ sudo pulp-admin repo content --id=bar
+------------------------------------------+
               Contents of bar
+------------------------------------------+

Packages in bar: 

cas-1.0-0.fc13.noarch.rpm
cas-admin-1.0-0.fc13.noarch.rpm
R-IRanges-devel-1.6.8-1.fc13.i686.rpm
R-IRanges-devel-1.6.8-1.fc13.x86_64.rpm
R-IRanges-1.6.8-1.fc13.x86_64.rpm
cas-server-1.0-0.fc13.noarch.rpm

Errata in bar: 

FEDORA-2010-10564
FEDORA-2010-8880

files in bar: 

 none

Comment 4 Preethi Thomas 2010-12-13 21:13:16 UTC
here is what I get. If I try to  add the errata to a repo with packages it gives the error. But if its a fresh repo with nothing in it. It is successful.


Failed Case

[root@preethi ~]# pulp-admin -u admin -p admin repo create --id=gpg --name=gpg  --feed=yum:http://10.16.79.198/gpg-repo/ --keys=/root/gpg-keys/RPM-GPG-KEY-pthomas 
uploading /root/gpg-keys/RPM-GPG-KEY-pthomas
Successfully created repository [ gpg ]

[root@preethi ~]# pulp-admin -u admin -p admin repo sync --id=gpg -F
Sync for repository gpg started
You can safely CTRL+C this current command and it will continue
[==================================================] 100% (1 of 1 pkgs)
Sync: Finished


[root@preethi ~]# ls /var/lib/pulp/repos/gpg-repo/
cachecookie                       packages               repomd.xml
filelists.xml.gz                  primary.xml.gz         RPM-GPG-KEY-pthomas
grinder-0.0.65-1.fc13.noarch.rpm  primary.xml.gz.sqlite
other.xml.gz                      repodata




Successful case


[root@preethi ~]# pulp-admin repo create --id=foo
Successfully created repository [ foo ]


[root@preethi ~]#  pulp-admin -u admin -p admin repo add_errata --id=foo --errata=FEDORA-2010-16827 --source=f14-updates
Successfully added Errata ['FEDORA-2010-16827'] to repo [foo].





[root@preethi ~]#  pulp-admin -u admin -p admin repo add_errata --id=gpg --errata=FEDORA-2010-16827 --source=f14-updates
error: operation failed: "Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py\", line 124, in check_roles\n    result = f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/repositories.py\", line 540, in add_errata\n    api.add_errata(id, data['errataid'])\n  File \"/usr/lib/python2.7/site-packages/pulp/server/api/repo.py\", line 704, in add_errata\n    updateinfo.generate_updateinfo(repo)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/updateinfo.py\", line 127, in generate_updateinfo\n    updateinfo_path)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/upload.py\", line 110, in modify_repo\n    raise ModifyRepoError(out)\nModifyRepoError: Could not access repository: /var/lib/pulp/repos/gpg/repodata/repomd.xml not found\n"


[root@preethi ~]# ls /var/lib/pulp/repos/gpg-repo/cachecookie                                 other.xml.gz
filelists.xml.gz                            packages
grinder-0.0.65-1.fc13.noarch.rpm            primary.xml.gz
gstreamermm-0.10.8-1.fc14.i686.rpm          primary.xml.gz.sqlite
gstreamermm-0.10.8-1.fc14.x86_64.rpm        repodata
gstreamermm-devel-0.10.8-1.fc14.i686.rpm    repomd.xml
gstreamermm-devel-0.10.8-1.fc14.x86_64.rpm  RPM-GPG-KEY-pthomas

Comment 5 Pradeep Kilambi 2010-12-13 21:37:19 UTC
Actually it has nothing to do with empty vs full.. it has to do with repos with relative path ==feed vs repoid.. 

The reason being I only added that support this morning. I did few more tweaks. But try to test this again with today code and you should see it working.

[pkilambi@prad src{master}]$ sudo pulp-admin repo create --id=testrepo --feed=yum:http://10.16.76.78/pub/updates/
Successfully created repository [ testrepo ]

[pkilambi@prad src{master}]$ sudo pulp-admin repo sync --id=testrepo
Sync for repository testrepo started
Use "repo status" to check on the progress

[pkilambi@prad src{master}]$ sudo pulp-admin repo content --id=testrepo
+------------------------------------------+
            Contents of testrepo
+------------------------------------------+

Packages in testrepo: 

emoticons-0.1-2.x86_64.rpm
patb-0.1-2.x86_64.rpm

Errata in testrepo: 

RHEA-2010:9999

files in testrepo: 

 none

[pkilambi@prad src{master}]$ sudo pulp-admin repo add_errata --id=testrepo --source=f13-updates --errata=FEDORA-2010-8880
Successfully added Errata ['FEDORA-2010-8880'] to repo [testrepo].

$ sudo pulp-admin repo content --id=testrepo
+------------------------------------------+
            Contents of testrepo
+------------------------------------------+

Packages in testrepo: 

emoticons-0.1-2.x86_64.rpm
patb-0.1-2.x86_64.rpm
cas-1.0-0.fc13.noarch.rpm
cas-admin-1.0-0.fc13.noarch.rpm
cas-server-1.0-0.fc13.noarch.rpm

Errata in testrepo: 

RHEA-2010:9999
FEDORA-2010-8880

files in testrepo: 

 none

Comment 6 Jay Dobies 2010-12-20 19:46:32 UTC
Fixed in build 0.117.

Comment 7 Preethi Thomas 2010-12-20 20:59:20 UTC
verified


[root@preethi ~]# pulp-admin -u admin -p admin repo add_errata --id=gpg  --errata=FEDORA-2010-16827 --source=f14-updates
Successfully added Errata ['FEDORA-2010-16827'] to repo [gpg].

[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo content --id=gpg
+------------------------------------------+
               Contents of gpg
+------------------------------------------+

Packages in gpg: 

gstreamermm-devel-0.10.8-1.fc14.x86_64.rpm
gstreamermm-devel-0.10.8-1.fc14.i686.rpm
gstreamermm-0.10.8-1.fc14.i686.rpm
gstreamermm-0.10.8-1.fc14.x86_64.rpm
grinder-0.0.65-1.fc13.noarch.rpm

Errata in gpg: 

FEDORA-2010-16827

files in gpg: 

 none

Comment 8 Preethi Thomas 2011-08-16 14:00:26 UTC
Closing with Community Release 15

pulp-0.0.223-4.


Note You need to log in before you can comment on or make changes to this bug.