Bug 860709

Summary: After upgrading CFSE Pulp is not working correctly
Product: Red Hat Satellite Reporter: Hayk Hovsepyan <hhovsepy>
Component: APIAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Hayk Hovsepyan <hhovsepy>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: asettle, cwelton, dmacpher, jlaska, lzap, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
After upgrading from CloudForms System Engine 1.0.1 to 1.1, remote package installation to systems failed and provided an incorrect error for "repo info" and "system packages --install" commands. This fix corrects the errors and successfully installs packages to systems remotely.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 19:56:42 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 Hayk Hovsepyan 2012-09-26 14:25:37 UTC
Description of problem:
After upgrading CFSE 1.0.1 to 1.1 it is not possible to install packages to systems remotely.
CLI command "system packages --install lion --name $sysname --environment dev"
shows strange error: "Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48....."

Version-Release number of selected component (if applicable):
katello-qpid-broker-key-pair-1.0-1.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-common-1.1.12-9.el6cf.noarch
katello-1.1.12-9.el6cf.noarch
katello-configure-1.1.9-4.el6cf.noarch
katello-glue-foreman-0.1.318-1.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-5.el6cf.noarch
katello-glue-candlepin-1.1.12-9.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-pulp-1.1.12-9.el6cf.noarch
katello-cli-1.1.8-5.el6cf.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-agent-1.1.2-1.el6cf.noarch

How reproducible:
always

Steps to Reproduce:
1. Install CFSE 1.0.1 on rhel62-base.
2. Create repo and promote it to some environment. For example zoo repo.
3. Register client and subscribe it.
4. Upgrade CFSE to 1.1 to puddle #2.
4.1  Create repo /etc/yum.repos.d/cfse-upgrade.repo. where "baseurl=http://download.lab.bos.redhat.com/rel-eng/CloudForms/1.1/2012-09-24.2/el6-se/x86_64/os/"
4.2  Stop services: "service katello-jobs stop; service katello stop; service pulp-server stop; service tomcat6 stop; service elasticsearch stop;" 
4.3 Upgrade katello: "yum -y update pulp* candlepin* katello*" and "katello-upgrade -y".
4.4 Start services: "service elasticsearch start; service tomcat6 start; service pulp-server start; service katello start; service katello-jobs start;". 

5.  Verify that repo which was created still exists. "repo info --name zoo --product zoo". You will see that instead of showing repo info it shows strange error.
6.  Try to install some package, from existing repo, remotely on system by CLI: "system packages --install lion --name $sysname --environment dev". You will see that it shows error, but should install package.


Actual results:
Error is shown in "repo info" and "system packages --install" commands.

Expected results:
No error should be shown. Commands should work as they worked before upgrade.

Comment 2 Hayk Hovsepyan 2012-09-27 11:29:36 UTC
Here is the full error message:

Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n    value = method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 593, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/consumers.py\", line 408, in installpackages\n    async.enqueue(task, unique=False)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/async.py\", line 58, in enqueue\n    _queue.enqueue(task, unique)\nAttributeError: 'NoneType' object has no attribute 'enqueue'\n

Comment 4 Lukas Zapletal 2012-09-27 14:32:04 UTC
Taking, please ack it. Trying to repro on RHEL6.3 now, did you try it on RHEL 6.3 too?

Comment 5 Hayk Hovsepyan 2012-09-27 14:42:16 UTC
It fails on RHEL 6.3 as well.

Comment 6 Lukas Zapletal 2012-10-01 16:31:38 UTC
Reproduced:

[root@bb sgs]# kk repo info --name "Nature Enterprise x86_64 1.1" --product "Nature Enterprise"
Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py\", line 127, in _auth_decorator\n    value = method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py\", line 430, in GET\n    task = scheduled_sync.find_scheduled_task(repo['id'], '_sync')\n  File \"/usr/lib/python2.6/site-packages/pulp/server/api/scheduled_sync.py\", line 149, in find_scheduled_task\n    for task in async.find_async(method_name=method_name):\n  File \"/usr/lib/python2.6/site-packages/pulp/server/async.py\", line 110, in find_async\n    return _queue.find(**kwargs)\nAttributeError: 'NoneType' object has no attribute 'find'\n

Looking into it.

Comment 8 Lukas Zapletal 2012-10-02 09:00:00 UTC
https://github.com/Katello/katello/pull/771

Comment 11 Hayk Hovsepyan 2012-10-03 14:45:21 UTC
Verified on revision:
katello-qpid-broker-key-pair-1.0-1.noarch
katello-agent-0.17-1.el6.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-glue-pulp-1.1.12-12.el6cf.noarch
katello-glue-foreman-0.1.318-1.el6cf.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-6.el6cf.noarch
katello-glue-candlepin-1.1.12-12.el6cf.noarch
katello-cli-1.1.8-6.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-selinux-1.1.1-1.el6cf.noarch
katello-common-1.1.12-12.el6cf.noarch
katello-1.1.12-12.el6cf.noarch
katello-configure-1.1.9-6.el6cf.noarch

Now it does not show errors and installs packages to systems remotely.

Comment 13 errata-xmlrpc 2012-12-04 19:56:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html