Bug 973402
Summary: | using rpm consumer errata install run causes an unexpected error | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Jeremy Cline <jcline> |
Component: | rpm-support | Assignee: | Michael Hrivnak <mhrivnak> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 2.2 Beta | CC: | mhrivnak, nobody, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | 2.2.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-10 15:45:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jeremy Cline
2013-06-11 21:04:43 UTC
Set up a test repo: 1. pulp-admin rpm repo create --repo-id=errata_install --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/ 2. pulp-admin rpm repo sync run --repo-id=errata_install 3. pulp-admin rpm consumer bind --consumer-id=jeremy --repo-id=errata_install 4. pulp-admin rpm consumer package install run --consumer-id=jeremy --name=grinder_test_package-2.0 [jcline@jcline ~]$ rpm -q grinder_test_package grinder_test_package-2.0-1.fc14.noarch Attempt to install an errata: pulp-admin rpm consumer errata install run --consumer-id=jeremy --errata-id=ginder_test_4 agent.log: 2013-06-12 16:25:14,932 [INFO][worker-0] bind() @ repolib.py:108 - Binding repo [errata_install] 2013-06-12 16:25:14,932 [INFO][worker-0] _handle_host_urls() @ repolib.py:342 - Configuring repo [errata_install] to use baseurl [https://jcline.vm.redhat.com/pulp/repos/errata_install] 2013-06-12 16:25:14,932 [INFO][worker-0] bind() @ repolib.py:134 - Adding new repo [errata_install] 2013-06-12 16:25:14,933 [INFO][worker-0] sendreply() @ rmi.py:172 - 26b18e65-8946-43e8-82bc-aa58f1d881bb processed in: 45 (ms) 2013-06-12 16:26:48,456 [INFO][worker-0] dispatch() @ dispatcher.py:631 - request: {'classname': 'Content', 'kws': {}, 'args': [[{'unit_key': {'name': 'grinder_test_package-2.0'}, 'type_id': 'rpm'}], {'apply': True, 'reboot': False, 'importkeys': False}], 'method': 'install', 'cntr': None} 2013-06-12 16:26:51,198 [INFO][worker-0] sendreply() @ rmi.py:172 - 3a791654-751c-4bdc-a06c-709a4cc431bc processed in: 2.785 (seconds) 2013-06-12 16:27:55,141 [INFO][worker-0] dispatch() @ dispatcher.py:631 - request: {'classname': 'Content', 'kws': {}, 'args': [[], {'apply': True, 'reboot': False, 'importkeys': False}], 'method': 'install', 'cntr': None} 2013-06-12 16:27:55,142 [INFO][worker-0] sendreply() @ rmi.py:172 - d0b8a873-c723-4592-97a0-9f5c5ec18bfa processed in: 34 (ms) OK. I don't know what I'm doing different today, but I can get an erratum to successfully install. If I don't use yum clean all first, I do get DownloadCallback instance has no attribute 'fsize'. 1. pulp-admin rpm repo create --repo-id=errata_test --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/ 2. pulp-admin rpm repo sync run --repo-id=errata_test 3. sudo pulp-consumer -u admin register --consumer-id=jeremy 4. pulp-admin rpm consumer bind --consumer-id=jeremy --repo-id=errata_test 5. pulp-admin rpm consumer package install run --consumer-id=jeremy --name=grinder_test_package-2.0 [jcline@jcline ~]$ rpm -qa | grep grinder grinder-0.1.16-1.fc18.noarch grinder_test_package-2.0-1.fc14.noarch [jcline@jcline ~]$ pulp-admin rpm consumer errata install run --consumer-id=jeremy --errata-id=grinder_test_3 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... Refresh Repository Metadata [ OK ] Downloading Packages [ FAILED ] Install Failed DownloadCallback instance has no attribute 'fsize' [jcline@jcline ~]$ sudo yum clean all Loaded plugins: langpacks, presto, pulp-profile-update, refresh-packagekit Cleaning repos: errata_test fedora pulp-v2-testing updates Cleaning up Everything No delta-package files removed by presto [jcline@jcline ~]$ pulp-admin rpm consumer errata install run --consumer-id=jeremy --errata-id=grinder_test_3 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... Refresh Repository Metadata [ OK ] Downloading Packages [ OK ] Check Package Signatures [ OK ] Running Test Transaction [ OK ] Running Transaction [ OK ] Install Succeeded ... [jcline@jcline ~]$ rpm -qa | grep grinder grinder-0.1.16-1.fc18.noarch grinder_test_package-3.0-1.fc14.noarch The KeyError in the original bug report occurs if I specify a non-existent consumer and/or non-existent errata-id, or if the consumer is not bound to the repo containing the erratum. The same KeyError occurs on puppet install/uninstall/update commands as well. To reproduce: 1. pulp-admin puppet repo create --repo-id=puppet-repo --feed=http://forge.puppetlabs.com/ --queries=puppetlabs 2. Sync the repo and bind a consumer to it. 3. pulp-admin puppet consumer install run --consumer-id=puppet-install --content-unit=puppetlabs/stdlib https://github.com/pulp/pulp/pull/517 The CallReport.progress is initialized as "progress or {}". So, {} is a valid value for the progress. After reproducing, I was able to verify that the agent is not passing an invalid progress report. Instead, we see this error when the CLI polls the tasks and attempts to render the progress before it is ever updated by the agent. In light of this, I believe it's safe to only render the progress report when it's not None or {}. Note: We're only fixing the KeyError on 'steps' here. build: 2.2.0-0.4.beta failing this as well. Not sure what the issue is here I cant seem to get the errata to install so according to my errata applicability I should be able to install the package grinder_test_4. but {'erratum': {'filters': {'id': {'$in': ['grinder_test_package', 'grinder_test_4']}}}} Request Body { "consumer_criteria": { "sort": [ [ "id", "ascending" ] ], "filters": { "id": { "$in": [ "test.consumer" ] } } }, "repo_criteria": {}, "unit_criteria": { "erratum": { "filters": { "id": { "$in": [ "grinder_test_package", "grinder_test_4" ] } } } } } Response Body { "erratum": { "test.consumer": [ { "details": { "status": "final", "from": "pulp-list", "description": null, "title": "Test Errata referring to grinder_test_package-4.0", "issued": "2010-11-7 00:00:00", "pkglist": [ { "packages": [ { "src": "grinder_test_package-4.0-1.fc14.src.rpm", "name": "grinder_test_package", "sum": [ "md5", "d89e83ed183fa55dfb0bd2eec14db93c" ], "filename": "grinder_test_package-4.0-1.fc14.noarch.rpm", "epoch": "0", "version": "4.0", "release": "1.fc14", "arch": "noarch" } ], "name": "F14 Pulp Test Packages", "short": "F14PTP" } ], "version": "1", "references": [], "_content_type_id": "erratum", "_ns": "units_erratum", "_id": "39345ebb-d8e4-4a45-add5-daade8cbc3af", "type": "enhancements", "id": "grinder_test_4" }, "summary": { "unit_key": "grinder_test_4" } } ] } } But from agent.log [root@qe-blade-03 ~]# rpm -q grinder_test_package grinder_test_package-2.0-1.fc14.noarch [root@qe-blade-03 ~]# [root@qe-blade-03 ~]# 2013-06-20 15:35:01,094 [INFO][worker-0] dispatch() @ dispatcher.py:631 - request: {'classname': 'Content', 'kws': {}, 'args': [[], {'apply': True, 'reboot': False, 'importkeys': False}], 'method': 'install', 'cntr': None} 2013-06-20 15:35:01,095 [INFO][worker-0] sendreply() @ rmi.py:172 - d8c586b7-c168-4cb9-96fc-4c6b378f1a9c processed in: 547 (ms) build: 2.2.0-0.23.beta verified [root@cloud-qe-14 ~]# pulp-admin rpm repo create --repo-id=errata_install --feed=http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/ Successfully created repository [errata_install] [root@cloud-qe-14 ~]# pulp-admin rpm repo sync run --repo-id=errata_install +----------------------------------------------------------------------+ Synchronizing Repository [errata_install] +----------------------------------------------------------------------+ This command may be exited by pressing ctrl+c without affecting the actual operation on the server. Downloading metadata... [\] ... completed Downloading repository content... [==================================================] 100% RPMs: 11/11 items Delta RPMs: 0/0 items ... completed Downloading distribution files... [==================================================] 100% Distributions: 0/0 items ... completed Importing errata... [-] ... completed Importing package groups/categories... [-] ... completed Publishing packages... [==================================================] 100% Packages: 11/11 items ... completed Publishing distributions... [==================================================] 100% Distributions: 0/0 items ... completed Generating metadata [\] ... completed Publishing repository over HTTPS [-] ... completed [root@cloud-qe-14 ~]# pulp-admin rpm consumer bind --consumer-id=consumer1 --repo-id=errata_install This command may be exited via ctrl+c without affecting the request. -- Updating Pulp Server -- [-] Waiting to begin... [-] Running... Task Succeeded -- Notifying the Consumer -- [-] Waiting to begin... [|] Running... Task Succeeded [root@cloud-qe-14 ~]# pulp-admin rpm consumer package install run --consumer-id=consumer1 --name=grinder_test_package-2.0 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... Refresh Repository Metadata [ OK ] Downloading Packages [ OK ] Check Package Signatures [ OK ] Running Test Transaction [ OK ] Running Transaction [ OK ] Install Succeeded +----------------------------------------------------------------------+ Installed +----------------------------------------------------------------------+ Name: grinder_test_package Version: 2.0 Arch: noarch Repoid: errata_install [root@cloud-qe-14 ~]# pulp-admin rpm consumer errata install run --consumer-id=consumer1 --errata-id=grinder_test_3 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... Refresh Repository Metadata [ OK ] Downloading Packages [ OK ] Check Package Signatures [ OK ] Running Test Transaction [ OK ] Running Transaction [ OK ] Install Succeeded +----------------------------------------------------------------------+ Installed +----------------------------------------------------------------------+ Name: grinder_test_package Version: 3.0 Arch: noarch Repoid: errata_install [root@cloud-qe-14 ~]# [root@cloud-qe-14 ~]# pulp-admin rpm consumer errata install run --consumer-id=consumer1 --errata-id=grinder_test_4 This command may be exited via ctrl+c without affecting the request. [-] Waiting to begin... Refresh Repository Metadata [ OK ] Downloading Packages [ OK ] Check Package Signatures [ OK ] Running Test Transaction [ OK ] Running Transaction [ OK ] Install Succeeded +----------------------------------------------------------------------+ Installed +----------------------------------------------------------------------+ Name: grinder_test_package Version: 4.0 Arch: noarch Repoid: errata_install [root@cloud-qe-14 ~]# [root@ibm-x3550m3-09 ~]# rpm -q grinder_test_package grinder_test_package-3.0-1.fc14.noarch [root@ibm-x3550m3-09 ~]# rpm -q grinder_test_package grinder_test_package-4.0-1.fc14.noarch [root@ibm-x3550m3-09 ~]# |