Bug 662771
| Summary: | repo add_errata fails | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | Pradeep Kilambi <pkilambi> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 14:00:26 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 647488 | ||
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. 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
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
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 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
Fixed in build 0.117. 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
Closing with Community Release 15 pulp-0.0.223-4. |
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