Hide Forgot
Description of problem: When run virt-who with wrong hypervisor username and password, it still run normally although throw up error info in the log. Version-Release number of selected component (if applicable): virt-who-0.16-5.el6.noarch subscription-manager-1.16.8-3.el6.x86_64 python-rhsm-1.16.6-1.el6.x86_64 How reproducible: Always Steps to Reproduce: 1. Register system to satellite6 2. Run virt-who with error username and password at CLI mode: [root@sgi-xe270-01 ~]# virt-who --hyperv --hyperv-owner=ACME_Corporation --hyperv-env=Library --hyperv-server=10.73.5.227 --hyperv-username=administrator --hyperv-password=XXXXXXX 2016-03-03 02:41:49,700 INFO: Using reporter_id='sgi-xe270-01.rhts.eng.bos.redhat.com' 2016-03-03 02:41:49,703 INFO: Using configuration "env/cmdline" ("hyperv" mode) 2016-03-03 02:41:53,300 ERROR: Virt backend 'env/cmdline' fails with error: Incorrect domain/username/password 2016-03-03 02:41:53,301 INFO: Waiting 60 seconds before retrying backend 'env/cmdline' 2016-03-03 02:42:56,808 ERROR: Virt backend 'env/cmdline' fails with error: Incorrect domain/username/password 2016-03-03 02:42:56,808 INFO: Waiting 60 seconds before retrying backend 'env/cmdline' Actual results: Although it will throw up error info "fails with error: Incorrect domain/username/password" virt-who thread can't terminated automatically,it still retry every 60s, Expected results: When username and password is error, virt-who should not only throw up error info in the log but also terminated automatically. Additional info:
I don't think virt-who should terminate itself in this case, there are couple of scenarios to consider: 1) admin first starts virt-who and after that creates user in the hypervisor 2) temporary outage in authentication mechanism on hypervisor (e.g. when LDAP server is not available for some time and hypervisor tries to authenticate against local users) Overall I think that virt-who shouldn't stop when hypervisor username/password is not valid. Opinions?
Liushihui, do you agree with my reasoning in comment #2?
Redak, OK, I understand it now. However, I have another concern about this problem since virt-who throw up some exception info when it failed to connect vcenter. please see it as the following. Can virt-who just send some brief error info as it show on hyperv(Incorrect domain/username/password)? 2016-10-18 04:43:17,765 [virtwho.test-esx1 ERROR] Esx-1(23748):MainThread @esx.py:login:346 - Unable to login to ESX Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 341, in login self.client.service.Login(_this=self.sc.sessionManager, userName=self.username, password=self.password) File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in __call__ return client.invoke(args, kwargs) File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/usr/lib/python2.7/site-packages/suds/client.py", line 647, in send result = self.succeeded(binding, reply.message) File "/usr/lib/python2.7/site-packages/suds/client.py", line 684, in succeeded reply, result = binding.get_reply(self.method, reply) File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 151, in get_reply self.detect_fault(soapbody) File "/usr/lib/python2.7/site-packages/suds/bindings/binding.py", line 182, in detect_fault raise WebFault(p, fault) WebFault: Server raised fault: 'Cannot complete login due to an incorrect user name or password.'
closed it, if exception error is still exist, please file a new bug for it.