+++ This bug was initially created as a clone of Bug #655256 +++ Two issues when trying to create a new consumer: 1) I have to issue the --server flag twice 2) After successfully creating the consumer I still have to use --username and --password to list repos $ sudo pulp-client --server=gibson.pdx.redhat.com consumer create --id=gibson ERROR: The server hostname you have configured in /etc/pulp/client.conf does not match the hostname returned from the Pulp server you are connecting to. You have: [localhost] configured but got: [gibson.pdx.redhat.com] from the server. Please correct the host in the /etc/pulp/client.conf file $ sudo pulp-client --server=gibson.pdx.redhat.com consumer create --id=gibson error: operation failed: "Authorization failed. Check your username and password or your certificate" $ sudo pulp-client --username=admin --password=redhat --server=gibson.pdx.redhat.com consumer create --id=gibson Successfully created consumer [ gibson ] $ sudo pulp-client repo list error: operation failed: "Authorization failed. Check your username and password or your certificate" $ sudo pulp-client --username=admin --password=admin repo list +------------------------------------------+ List of Available Repositories +------------------------------------------+ Label f14-x86_64 .... --- Additional comment from pkilambi on 2010-11-23 09:34:02 EST --- fixed! commit 79462a0bf7cb4f782970b89ceb15f7d74c9c9daa Author: Pradeep Kilambi <pkilambi> Date: Tue Nov 23 09:34:06 2010 -0500 --- Additional comment from jason.dobies on 2010-11-29 09:16:04 EST --- Fixed in 0.109. --- Additional comment from pthomas on 2010-11-29 09:28:16 EST --- Looks like this is fails_qa [root@preethi ~]# pulp-client --server=preethi.usersys.redhat.com consumer create --id=preethi.usersys.redhat.com ERROR: The server hostname you have configured in /etc/pulp/client.conf does not match the hostname returned from the Pulp server you are connecting to. You have: [localhost.localdomain] configured but got: [preethi.usersys.redhat.com] from the server. Please correct the host in the /etc/pulp/client.conf file You have new mail in /var/spool/mail/root [root@preethi ~]# pulp-client --server=preethi.usersys.redhat.com consumer create --id=preethi.usersys.redhat.com error: operation failed: "Authorization failed. Check your username and password or your certificate" [root@preethi ~]# pulp-client -u admin -p admin --server=preethi.usersys.redhat.com consumer create --id=preethi.usersys.redhat.com Successfully created consumer [ preethi.usersys.redhat.com ] The second part is a pass [root@preethi ~]# pulp-client repo list +------------------------------------------+ List of Available Repositories +------------------------------------------+ Label f13 Name f13 FeedURL http://download.devel.redhat.com/released/F-13/GOLD/Fedora/x86_64/os/ FeedType yum Arch x86_64 Sync Schedule None Packages 3102 Files 0 Distributions ks-f13-x86_64 Publish True Clones []
conclusion from discussion on IRC: * fix the requirement to run --server 2x before it works * dont override conf with server value if you want to permanently change it, edit the conf file
commit f40ffff0efbc2843af6612befe1cc60e0ad5304c Author: Pradeep Kilambi <pkilambi> Date: Mon Jan 3 16:12:54 2011 -0500 633988, 658162 - server option enhancements: * server option will not update config file any more and picks up server url at runtime from cli * user shouldnt have to run commands twice to take effect Test: * --server should take precedence over config * if no --server cli uses config url * config is not overwritten when --server is specified
Fixed in 0.120.
Verified [root@10 ~]# rpm -q pulp pulp-0.0.121-1.fc14.noarch [root@10 ~]# pulp-client --help Usage: pulp-client <options> <command> Supported Commands: consumer consumer specific actions to pulp server errata errata specific actions to pulp server repo repository specific actions to pulp server Options: -h, --help show this help message and exit Pulp User Account Credentials: -u USERNAME, --username=USERNAME account username -p PASSWORD, --password=PASSWORD account password -s SERVER, --server=SERVER pulp server host [root@10 ~]# When --server option is specified the result as follows [root@10 ~]# pulp-client --server=preethi.usersys.redhat.com -u admin -p admin consumer create --id=10.16.79.226 warning: this client is not registered; please register to continue Successfully created consumer [ 10.16.79.226 ] On the server [root@preethi ~]# pulp-admin consumer list +------------------------------------------+ Consumer Information +------------------------------------------+ Id preethi.usersys.redhat.com Description None Subscribed Repos /pulp/api/consumers/preethi.usersys.redhat.com/repoids/ Additional info {} Id 10.16.79.226 Description None Subscribed Repos /pulp/api/consumers/10.16.79.226/repoids/ Additional info {} [root@10 ~]# pulp-client --server=preethi.usersys.redhat.com -u admin -p admin consumer create --id=10.16.79.226 warning: this client is not registered; please register to continue Successfully created consumer [ 10.16.79.226 ] When --server is not specified the config is being used [root@10 ~]# pulp-client -u admin -p admin consumer create --id=10.16.79.226 warning: this client is not registered; please register to continue Successfully created consumer [ 10.16.79.226 ] [root@10 ~]# pulp-admin consumer list+------------------------------------------+ Consumer Information +------------------------------------------+ Id 10.16.79.226 Description None Subscribed Repos /pulp/api/consumers/10.16.79.226/repoids/ Additional info {}
Closing with Community Release 15 pulp-0.0.223-4.