Bug 733270
Summary: | Re-registering an already registered system shouldn't be allowed | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> |
Component: | katello-agent | Assignee: | Ivan Necas <inecas> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.1 | CC: | bkearney, inecas |
Target Milestone: | Unspecified | ||
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 17:53:40 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: | 747354 |
Description
Sachin Ghai
2011-08-25 10:41:19 UTC
Validation added in commit b2ba6a8838edf7ccffb5cca1fdb69ace3489a376. Note: The registration of the system using different name still works. Question for bkearney: Should be katello-cli able to prevent from registering the system twice using different names, something like subscription manager does? I dont believe so. The Katello CLI is an admin tool.. so I should be able to register lots of different machines. Subscription-manager i registering "this" machine, so it makes sense to stop from double registering. I was verifying this defect with following build: [root@dhcp193-175 f15]# rpm -qa | grep katello katello-repos-0.1.4-1.el6.noarch katello-cli-0.1.20-1.el6.noarch katello-glue-pulp-0.1.123-1.el6.x86_64 katello-cli-common-0.1.20-1.el6.noarch katello-glue-foreman-0.1.123-1.el6.x86_64 katello-configure-0.1.21-1.el6.noarch katello-glue-candlepin-0.1.123-1.el6.x86_64 katello-common-0.1.123-1.el6.noarch katello-0.1.123-1.el6.x86_64 katello-all-0.1.123-1.el6.x86_64 Following system was already registered. [root@dhcp193-175 f15]# katello -u admin -p admin system list --org ACME_Corporation -------------------------------------------------------------------------------- Systems List For Org [ ACME_Corporation ] Name -------------------------------------------------------------------------------- dhcp201-191.englab.pnq.redhat.com If you re-register the same machine and within same env, you will get the validation failed error twice as below.. katello> system register --name dhcp201-191.englab.pnq.redhat.com --org ACME_Corporation --env test Validation failed: Name has already been taken, Name has already been taken Here message contains "Name has already been taken" twice and it needs to be corrected. Verified in following katello build: [root@dhcp201-162 ~]# rpm -qa | grep katello katello-0.1.154-1.el6.noarch katello-trusted-ssl-cert-1.0-1.noarch katello-cli-common-0.1.30-1.el6.noarch katello-glue-pulp-0.1.154-1.el6.noarch katello-configure-0.1.46-1.el6.noarch katello-qpid-broker-key-pair-1.0-1.noarch katello-glue-candlepin-0.1.154-1.el6.noarch katello-all-0.1.154-1.el6.noarch katello-repos-0.1.4-1.el6.noarch katello-cli-0.1.30-1.el6.noarch katello-glue-foreman-0.1.154-1.el6.noarch katello-common-0.1.154-1.el6.noarch katello-certs-tools-1.0.1-1.el6.noarch katello-httpd-ssl-key-pair-1.0-1.noarch Registering the same system twice in same org and env throws proper validation message: katello> system register --name dhcp201-139.englab.pnq.redhat.com --org ACME_Corporation --env test Validation failed: Name has already been taken getting rid of 6.0.0 version since that doesn't exist |