Bug 609120

Summary: pulp package install -p --consumerid fails
Product: [Retired] Pulp Reporter: Shveta <ssachdev>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: whayutin
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-16 14:00:05 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: 641987    

Description Shveta 2010-06-29 13:27:07 UTC
Description of problem:
pulp package install -p=zsh-html-4.2.6-3.el5.i386.rpm --consumerid=10.65.193.89
throws error 


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Created repo  pulp repo create --label=TAKE3rhel-i386-server-5 --name=rhel-i386-server-5 --arch=i386 --feed=rhn:satellite.rhn.redhat.com/rhel-i386-server-5
2. cd /var/lib/pulp/
3.[root@shveta pulp]# cd TAKE3rhel-i386-server-5/zsh-
zsh-4.2.6-3.el5.i386.rpm       zsh-html-4.2.6-3.el5.i386.rpm
4. pulp package install zsh-html-4.2.6-3.el5.i386.rpm 

  
Actual results:


Expected results:


Additional info:http://pastebin.test.redhat.com/25713

[root@shveta pulp]# pulp package install --help
Usage: pulp package install [OPTIONS]

Options:
  -h, --help            show this help message and exit
  -p PNAMES, --pkgname=PNAMES
                        Packages to install on a given consumer.
                        To specify multiple packages use multiple -p
  --consumerid=CONSUMERID
                        Consumer Id
[root@shveta pulp]# pulp package install -p=zsh-html-4.2.6-3.el5.i386.rpm --consumerid=10.65.193.89
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/juicer/controllers/base.py\", line 49, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/juicer/controllers/consumers.py\", line 173, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/juicer/controllers/consumers.py\", line 151, in installpackages\n    return self.ok(API.installpackages(id, names))\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/api/consumer.py\", line 150, in installpackages\n    agent = Agent(id)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pulp/agent.py\", line 52, in __init__\n    producer = Producer(uuid, host, port)\n  File \"/usr/lib/python2.6/site-packages/pulp-0.0.6-py2.6.egg/pmf/producer.py\", line 54, in __init__\n    socket = connect(host, port)\n  File \"/usr/lib/python2.6/site-packages/qpid/util.py\", line 43, in connect\n    sock.connect((host, port))\n  File \"<string>\", line 1, in connect\nerror: [Errno 111] Connection refused\n"
[root@shveta pulp]# pulp package info --help
Usage: pulp package info [OPTIONS]

Options:
  -h, --help            show this help message and exit
  -p NAME, --pkgname=NAME
                        Repository Label
  --repoid=REPOID       Repository Label
[root@shveta pulp]# pulp package info -p=zsh-html-4.2.6-3.el5.i386.rpm --repoid=TAKE3rhel-i386-server-5
not found
[root@shveta pulp]#

Comment 2 wes hayutin 2010-06-29 13:57:27 UTC
Agreed, if you get a Connection refused error, verify that you have pulp files under /var/www/html/pub.

If you do not.. git pull, rebuild the rpms.. and install the rpms w/ the -ivh flag. The rpm -Uvh flag does not appear to lay down all the files, I'll find out if the difference in the flags is bug or working as designed.

Comment 3 Shveta 2010-06-30 06:42:21 UTC
[root@shveta ~]# cd /var/www/html/pub/
[root@shveta pub]# ll
total 140
drwxr-xr-x. 2 apache apache 139264 2010-06-28 09:49 TAKE3rhel-i386-server-5
[root@shveta pub]# cd TAKE3rhel-i386-server-5/
[root@shveta TAKE3rhel-i386-server-5]# cd zsh-
zsh-4.2.6-3.el5.i386.rpm       zsh-html-4.2.6-3.el5.i386.rpm
[root@shveta TAKE3rhel-i386-server-5]# cd zsh-


I do have files under /var/www/html/pub.

Comment 4 Shveta 2010-07-06 11:09:14 UTC
[root@preethi f12]# pulp package install -p=Packages/zsh-4.3.10-4.fc12.i686.rpm --consumerid=10.65.193.89
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/juicer/controllers/base.py\", line 48, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/juicer/controllers/consumers.py\", line 192, in POST\n    return action(id)\n  File \"/usr/lib/python2.6/site-packages/juicer/controllers/consumers.py\", line 178, in installpackages\n    return self.ok(API.installpackages(id, names))\n  File \"/usr/lib/python2.6/site-packages/pulp/api/consumer.py\", line 150, in installpackages\n    agent = Agent(id)\n  File \"/usr/lib/python2.6/site-packages/pulp/agent.py\", line 52, in __init__\n    producer = Producer(host=host, port=port)\n  File \"/usr/lib/python2.6/site-packages/pmf/base.py\", line 43, in __init__\n    self.connect()\n  File \"/usr/lib/python2.6/site-packages/pmf/base.py\", line 61, in connect\n    raise e\nConnectError: Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/qpid/driver.py\", line 375, in dispatch\n    self.connect()\n  File \"/usr/lib/python2.6/site-packages/qpid/driver.py\", line 397, in connect\n    raise e\nerror: [Errno 111] Connection refused\n\n"

[root@preethi ~]# cd /var/www/html/pub/
[root@preethi pub]# ll
total 148
drwxr-xr-x. 15 apache apache   4096 Jun 30 11:26 f12
drwxr-xr-x.  5 apache apache 135168 Jun 28 11:15 rhel-i386-server-5
drwxr-xr-x.  3 apache apache  12288 Jul  6 07:00 test
[root@preethi pub]# cd test/
[root@preethi test]# cd z
zip-2.31-8.fc12.i686.rpm    zsh-4.3.10-4.fc12.i686.rpm
[root@preethi test]# cd zsh-4.3.10-4.fc12.i686.rpm

Comment 5 Shveta 2010-08-20 09:26:08 UTC
[root@shveta conf.d]# pulp-admin -u admin -p admin package install --name=zsh-4.2.6-3.el5.x86_64.rpm --consumerid=10.65.193.75
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 root@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.2.15 (Fedora) Server at localhost Port 8811</address>
</body></html>

Comment 7 Preethi Thomas 2010-09-10 18:03:33 UTC
verified

[root@preethi ~]#  pulp-admin -uadmin -padmin package install -n zsh --consumerid=preethi.usersys.redhat.com
Successfully Installed Packages [u'zsh-4.3.10-5.fc13.x86_64', u'zsh-4.3.10-5.fc13.x86_64'] on consumer [preethi.usersys.redhat.com]
[root@preethi ~]# rpm -q zsh
zsh-4.3.10-5.fc13.x86_64
[root@preethi ~]# rpm -qa |grep pulp
pulp-client-0.0.60-1.fc13.noarch
pulp-0.0.60-1.fc13.noarch
pulp-common-0.0.60-1.fc13.noarch

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

pulp-0.0.223-4.