| Summary: | Need better error messages when package install fails on consumer | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | Jeff Ortel <jortel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.0.0 | Keywords: | Triaged |
| 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: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
The yum InstallError is being propagated back and exposed in the CLI properly. The problem is that the Task.failed() method is assigning Task.exception = repr(exception) which strips useful information.
e = InstallError('No package(s) available to install')
print repr(e)
results in:
InstallError()
Changed to set Task.exception = str(exception). build: 0.255 verified [root@preethi ~]# rpm -q pulp pulp-0.0.255-1.fc15.noarch [root@preethi ~]# [root@preethi ~]# pulp-admin package install --consumerid=pulp-client -n test Created task id: 8ab8fc91-2a70-11e1-b89e-002564a85a58 Waiting: [\] Install failed: No package(s) available to install Looks like this is failing in the latest qe build ( i tested it on rhel5)
[root@rhel5-pulp ~]# rpm -q pulp
pulp-0.0.263-1
[root@rhel5-pulp ~]# pulp-admin package install --consumerid=f16-client -n screen
Created task id: 7cffdf85-4cf2-11e1-9f4c-545200737b2f
Waiting: [\]
Consumer ID: f16-client [ FAILED ] Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gofer/rmi/dispatcher.py", line 485, in __call__
retval = method(*args, **keywords)
File "/usr/lib64/gofer/plugins/pulpplugin.py", line 205, in install
installed = p.install(names)
File "/usr/lib64/gofer/plugins/package.py", line 176, in install
yb.install(pattern=info)
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 3569, in install
raise Errors.InstallError, _('No package(s) available to install')
InstallError: No package(s) available to install
Python 2.4 compat issue fixed in gofer 0.65. build: 0.265 verified [root@preethi ~]# rpm -q pulp pulp-0.0.267-1.fc15.noarch [root@preethi ~]# pulp-admin package install -n test --consumerid=client1 Created task id: 965fc980-5d7a-11e1-9b67-002564a85a58 Waiting: [\] Consumer ID: client1 [ FAILED ] No package(s) available to install [root@preethi ~]# pulp-admin package install -n zsh --consumerid=client1 Created task id: 9ea61f85-5d7a-11e1-91a2-002564a85a58 Waiting: [\] Consumer ID: client1 [ SUCCEEDED ] ===================================================================== Package Arch Version Repository ===================================================================== Installed: zsh x86_64 4.3.10 rhel6 [root@preethi ~]# pulp-admin package install -n zsh --consumerid=client1 Created task id: b5e5ac97-5d7a-11e1-a9fe-002564a85a58 Waiting: [\] Consumer ID: client1 [ SUCCEEDED ] Nothing to do [root@preethi ~]# Pulp v1.0 is released Closed Current Release. Pulp v1.0 is released. |
Description of problem: Need better error messages when package install fails on consumer [root@preethi ~]# pulp-admin package install -n zsh --consumerid=pulp-client Created task id: da485099-20eb-11e1-a27c-002564a85a58 Waiting: [\] Install failed: InstallError() [root@preethi ~]# 2011-12-07 10:58:10,157 13758:140295039612672: pulp.server.tasking.task:ERROR: task:455 Task failed: Task 42797fe6-20ec-11e1-8d51-002564a85a58: ConsumerApi.__installpackages(pulp-client, ['zsh'], ) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/pulp/server/tasking/task.py", line 404, in run result = self.callable(*self.args, **self.kwargs) File "/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py", line 456, in __installpackages return packages.install(names, reboot) File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 72, in __call__ return self.stub._send(request, opts) File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 133, in _send return self.__send(request, options) File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 164, in __send any=opts.any) File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 144, in send return self.__getreply(sn, reader) File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 181, in __getreply return self.__onreply(envelope) File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 197, in __onreply raise RemoteException.instance(reply) InstallError: No package(s) available to install Version-Release number of selected component (if applicable): [root@preethi ~]# rpm -q pulp pulp-0.0.254-1.fc15.noarch