Bug 722543 - pulp-client consumer create should restrict one consumer create
Summary: pulp-client consumer create should restrict one consumer create
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 29
Assignee: Pradeep Kilambi
QA Contact: dgao
URL:
Whiteboard:
: 676864 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-15 15:37 UTC by dgao
Modified: 2013-09-09 16:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description dgao 2011-07-15 15:37:45 UTC
[root@pulp-qe ~]# pulp-client -u admin -p admin consumer create --id=foo
Successfully created consumer [ foo ]

[root@pulp-qe ~]# pulp-client -u admin -p admin consumer create --id=bar
Successfully created consumer [ bar ]

[root@pulp-qe ~]# pulp-client -u admin -p admin consumer create --id=baz
Successfully created consumer [ baz ]

[root@pulp-qe ~]# ls /etc/pki/content/
foo  pulp-protected-repos
[root@pulp-qe ~]# ls /etc/pki/consumer/
cert.pem

[root@pulp-qe ~]# openssl x509 -in /etc/pki/consumer/cert.pem -text
Certificate:
    Data:
        Version: 1 (0x0)
        Serial Number: 20 (0x14)
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: CN=localhost
        Validity
            Not Before: Jul 15 15:33:29 2011 GMT
            Not After : Jul 12 15:33:29 2021 GMT
        Subject: CN=baz


So for intent and purposes, all the previous consumers cannot be used except for the newest one. 

As a result, it would cause bug like: https://bugzilla.redhat.com/show_bug.cgi?id=676864

Comment 1 Sayli Karmarkar 2011-07-18 06:35:24 UTC
There should be a message in place warning consumers that they are already registered and let them explicitly override it.

Comment 2 Sayli Karmarkar 2011-07-20 15:45:52 UTC
This should also be done for user creation.

Comment 3 Sayli Karmarkar 2011-07-20 15:47:16 UTC
Fix needs to also cleanup previous consumer.

Comment 4 Pradeep Kilambi 2011-10-07 16:05:31 UTC
commit 84efcce5919ca96cd512952ad55382373e3018ac

$ sudo pulp-consumer -u admin -p admin consumer register --id=prad
warning: this client is not known to the pulp server; run 'pulp-consumer consumer register' to register it
Successfully registered consumer [ prad ]

$ sudo pulp-consumer -u admin -p admin consumer register --id=prad1
A consumer [prad] already registered on this system; Please unregister existing consumer before registering.

$ sudo pulp-consumer -u admin -p admin consumer unregister
Successfully unregistered consumer [prad]

$ sudo pulp-consumer -u admin -p admin consumer register --id=prad1
warning: this client is not known to the pulp server; run 'pulp-consumer consumer register' to register it
Successfully registered consumer [ prad1 ]

Comment 5 Pradeep Kilambi 2011-10-10 18:23:01 UTC
*** Bug 676864 has been marked as a duplicate of this bug. ***

Comment 6 Jeff Ortel 2011-10-13 00:49:16 UTC
build: 0.238

Comment 7 Preethi Thomas 2011-10-19 13:01:49 UTC
verified
[root@pulp-client ~]# rpm -q pulp-consumer
pulp-consumer-0.0.239-1.fc14.noarch
[root@pulp-client ~]# 

[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer register --id=pulp-client
warning: this client is not known to the pulp server; run 'pulp-consumer consumer register' to register it
Successfully registered consumer [ pulp-client ]

[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer register --id=pulp-client1
A consumer [pulp-client] already registered on this system; Please unregister existing consumer before registering.
[root@pulp-client ~]# 
[root@pulp-client ~]# 
[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer unregister
Successfully unregistered consumer [pulp-client]

[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer register --id=pulp-client1
warning: this client is not known to the pulp server; run 'pulp-consumer consumer register' to register it
Successfully registered consumer [ pulp-client1 ]

[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer register --id=pulp-client
A consumer [pulp-client1] already registered on this system; Please unregister existing consumer before registering.
[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer unregisterSuccessfully unregistered consumer [pulp-client1]

[root@pulp-client ~]# pulp-consumer -u admin -p admin consumer register --id=pulp-client
warning: this client is not known to the pulp server; run 'pulp-consumer consumer register' to register it
Successfully registered consumer [ pulp-client ]

Comment 8 Preethi Thomas 2012-02-24 20:18:11 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 9 Preethi Thomas 2012-02-24 20:18:52 UTC
Pulp v1.0 is released.


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