Bug 618828 - wrong error message when running pulp packagegroup delete_package
Summary: wrong error message when running pulp packagegroup delete_package
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other (Show other bugs)
(Show other bugs)
Version: unspecified
Hardware: All Linux
low
medium
Target Milestone: ---
: ---
Assignee: Sayli Karmarkar
QA Contact: Preethi Thomas
URL:
Whiteboard:
Keywords: QA-Closed
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-27 20:20 UTC by Preethi Thomas
Modified: 2015-03-23 01:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 16:11:43 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Preethi Thomas 2010-07-27 20:20:28 UTC
Description of problem:

If you run the pulp packagegroup delete_package without the package name the error message shows as "Please specify the package name to add to the group" it should be " Please specify the package name to delete from the group"

[root@preethi ~]# pulp packagegroup delete_package --repoid=rhel-x86_64-client-vt-5 --id=rhel5_vt /var/lib/pulp/rhel-x86_64-client-vt-5/kvm-83-164.el5_5.12.x86_64.rpm
Please specify the package name to add to the group


ults:


Additional info:

Comment 1 Sayli Karmarkar 2010-08-10 07:14:57 UTC
$ git commit -a -m "618828 - Correcting wrong error message for package_delete operation for packagegroups"
Created commit a39b76d: 618828 - Correcting wrong error message for package_delete operation for packagegroups

Comment 2 Shveta 2010-08-18 11:04:43 UTC
[root@fedora12g2 grinder]# pulp-admin -u admin -p admin packagegroup delete_package --repoid=TAKE3rhel-i386-server-5 --id=grpid
package name required. Try --help

Comment 3 Shveta 2010-08-18 11:05:22 UTC
If package doesnt exist in repo.

[root@fedora12g2 grinder]# pulp-admin -u admin -p admin packagegroup delete_package --repoid=TAKE3rhel-i386-server-5 --id=grpid --pkgname=System
"Traceback (most recent call last):\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line 51, in report_error\n    return method(self, *args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102, in check_roles\n    ret=f(instance, *fargs, **kw)\n  File \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/repositories.py\", line 321, in delete_package_from_group\n    return self.ok(api.delete_package_from_group(id, groupid, pkg_name, gtype))\n  File \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 186, in _audit\n    result = method(*args, **kwargs)\n  File \"/usr/lib/python2.6/site-packages/pulp/api/repo.py\", line 431, in delete_package_from_group\n    % (groupid, repoid))\nPulpException: u'No PackageGroup with id: grpid exists in repo TAKE3rhel-i386-server-5'\n"

Comment 4 Sayli Karmarkar 2010-09-03 00:16:40 UTC
Shveta, This is a different independent error. Can you open a separate bug for this? Pls attach output of "pulp-admin -u admin -p admin packagegroup list" and "pulp-admin -u admin -p admin repo list" in that bug. Thanks,

~SayliK

(In reply to comment #3)
> If package doesnt exist in repo.
> 
> [root@fedora12g2 grinder]# pulp-admin -u admin -p admin packagegroup
> delete_package --repoid=TAKE3rhel-i386-server-5 --id=grpid --pkgname=System
> "Traceback (most recent call last):\n  File
> \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/base.py\", line
> 51, in report_error\n    return method(self, *args, **kwargs)\n  File
> \"/usr/lib/python2.6/site-packages/pulp/webservices/role_check.py\", line 102,
> in check_roles\n    ret=f(instance, *fargs, **kw)\n  File
> \"/usr/lib/python2.6/site-packages/pulp/webservices/controllers/repositories.py\",
> line 321, in delete_package_from_group\n    return
> self.ok(api.delete_package_from_group(id, groupid, pkg_name, gtype))\n  File
> \"/usr/lib/python2.6/site-packages/pulp/auditing.py\", line 186, in _audit\n   
> result = method(*args, **kwargs)\n  File
> \"/usr/lib/python2.6/site-packages/pulp/api/repo.py\", line 431, in
> delete_package_from_group\n    % (groupid, repoid))\nPulpException: u'No
> PackageGroup with id: grpid exists in repo TAKE3rhel-i386-server-5'\n"

Comment 5 Preethi Thomas 2010-09-08 12:33:11 UTC
verified

[root@preethi ~]# pulp-admin -uadmin -padmin packagegroup delete_package --repoid=f13 --id=test-pkggrp --pkgname zsh
Package [zsh] deleted from group [test-pkggrp] in repository [f13]
[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
You have new mail in /var/spool/mail/root
[root@preethi ~]# rpm -qa | grep grinder
grinder-0.0.60-1.fc13.noarch

Comment 6 Preethi Thomas 2010-10-20 16:11:43 UTC
Closed after review.


Note You need to log in before you can comment on or make changes to this bug.