Bug 655195
| Summary: | Missing --consumerid option from pulp-admin consumer bind | ||
|---|---|---|---|
| Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
| Component: | z_other | Assignee: | Jeff Ortel <jortel> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | unspecified | CC: | jason.dobies, jortel, pkilambi, skarmark |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-08-16 14:01:33 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: | 647488 | ||
|
Description
Preethi Thomas
2010-11-19 20:31:26 UTC
Looks like the --consumerid is missing from all of the pulp-admin consumer cli Fixed.
If your system is not registered to pulp server, it will show id as a required option, else it will show it 'optional':
$ sudo pulp-admin consumer info --help
Usage: pulp-admin <options> consumer info <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com (required)
--show-profile show package profile information associated with this
consumer
$ sudo pulp-admin consumer bind --help
Usage: pulp-admin <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com (required)
--repoid=REPOID repo identifier (required)
$ sudo pulp-admin consumer bind --help
Usage: pulp-admin <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com
--repoid=REPOID repo identifier (required)
Fixed in build 0.111. Reopening.
[root@10 ~]# rpm -q pulp
pulp-0.0.111-1.fc14.noarch
Here is what I am seeing
1. I deleted the consumer
[root@10 ~]# pulp-admin consumer delete
Successfully deleted consumer [10.16.79.211]
2. I don't see the --id (required) as in the example above
[root@10 ~]# pulp-admin consumer bind --help
Usage: pulp-admin <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com
--repoid=REPOID repo identifier (required)
3. I ran the consumer delete again to make sure that its deleted
[root@10 ~]# pulp-admin consumer delete
error: operation failed: "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py\", line 124, in check_roles\n result = f(instance, *fargs, **kw)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 155, in DELETE\n consumer_api.delete(id=id)\n File \"/usr/lib/python2.7/site-packages/pulp/server/event/dispatcher.py\", line 105, in call\n retval = fn(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/auditing.py\", line 199, in _audit\n result = method(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py\", line 93, in delete\n raise PulpException('Consumer [%s] does not exist', id)\nPulpException: u'Consumer [10.16.79.211] does not exist'\n"
4. Notice that --d is not listed as required
[root@10 ~]# pulp-admin consumer bind --help
Usage: pulp-admin <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com
--repoid=REPOID repo identifier (required)
5. Now I try to bind any way with the --id option
[root@10 ~]# pulp-admin consumer bind --id=10.16.79.211 --repoid=f13test
error: operation failed: "Traceback (most recent call last):\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/base.py\", line 53, in report_error\n return method(self, *args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 484, in POST\n return action(id)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/role_check.py\", line 124, in check_roles\n result = f(instance, *fargs, **kw)\n File \"/usr/lib/python2.7/site-packages/pulp/server/webservices/controllers/consumers.py\", line 273, in bind\n consumer_api.bind(id, data)\n File \"/usr/lib/python2.7/site-packages/pulp/server/auditing.py\", line 199, in _audit\n result = method(*args, **kwargs)\n File \"/usr/lib/python2.7/site-packages/pulp/server/api/consumer.py\", line 317, in bind\n raise PulpException('Consumer [%s] not found', id)\nPulpException: u'Consumer [10.16.79.211] not found'\n"
Also now I see --id option with the pulp-client consumer as well. My understanding is pulp-client should not have that option
[root@10 ~]# pulp-client consumer bind --help
Usage: pulp-client <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com
--repoid=REPOID repo identifier (required)
This works correctly when the consumer is not registered to pulp. After doing a 'pulp-client consumer delete' which removes the consumer certificate, pulp-admin requires --id. The issue is that pulp-admin deletes the consumer on the server but does not clean up the client. Namely, the consumer certificate in /etc/pki/consumer/* and pulp-admin thinks the consumer is still registered and does not require the --id argument. Adding logic in both server API ConsumerApi.delete() and on the client (gofer plugin) to ensure clean up of registration artifacts when a consumer is deleted. Fixed ac9b2e2c5bdfc32cba5cab94d03256a836620e5d Server does asynchronous RMI to consumer to clean up the consumer cert. After which, the pulp-admin tool will work as expected. Fixed in 0.120. verified
[root@pulp-f13 ~]# rpm -q pulp
pulp-0.0.121-1.fc13.noarch
[root@pulp-f13 ~]# pulp-admin consumer list
+------------------------------------------+
Consumer Information
+------------------------------------------+
Id 10.16.79.185
Description None
Subscribed Repos /pulp/api/consumers/10.16.79.185/repoids/
Additional info {}
[root@pulp-f13 ~]#
[root@pulp-f13 ~]#
[root@pulp-f13 ~]#
[root@pulp-f13 ~]# pulp-client consumer delete
Successfully deleted consumer [10.16.79.185]
[root@pulp-f13 ~]#
[root@pulp-f13 ~]#
[root@pulp-f13 ~]#
[root@pulp-f13 ~]#
[root@pulp-f13 ~]# pulp-admin consumer bind --help
Usage: pulp-admin <options> consumer bind <options>
Options:
-h, --help show this help message and exit
--id=ID consumer identifier eg: foo.example.com (required)
--repoid=REPOID repo identifier (required)
Closing with Community Release 15 pulp-0.0.223-4. |