Bug 880020 - rhevm-manage-domains -passwordFile=<existing empty file> give exception.
Summary: rhevm-manage-domains -passwordFile=<existing empty file> give exception.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-config
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.1.1
Assignee: Yair Zaslavsky
QA Contact: Ilanit Stein
URL:
Whiteboard: infra
Depends On: 870052
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-26 02:44 UTC by Chris Pelland
Modified: 2016-02-10 19:10 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When an empty file was provided as the -passwordFile argument to the rhevm-manage-domains script then a NullPointerException (NPE) was thrown and a stack trace displayed. The rhevm-manage-domains script has been updated to detect whether or not the -passwordFile contains any data and handle the situation where it does not contain any more gracefully.
Clone Of: 870052
Environment:
Last Closed: 2013-01-15 15:13:14 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0003 0 normal SHIPPED_LIVE rhevm bug fix update 2013-01-15 20:11:48 UTC

Description Chris Pelland 2012-11-26 02:44:48 UTC
+++ This bug was initially created as a clone of Bug #870052 +++

Description of problem:

Running rhevm-manage-domains with -passwordFile=pass, when pass is existing empty file, give jave exception:


[root@lilach-rhel yum.repos.d]# rhevm-manage-domains  -action=add -addPermissions -domain=qa.lab.tlv.redhat.com -user=vdcadmin  -passwordFile=pass  -provider=activeDirectory
Error:  exception message: java.lang.NullPointerException
        at org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck$KerberosUtilCallbackHandler.handle(KerberosConfigCheck.java:85)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(LoginContext.java:969)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler$1.run(LoginContext.java:966)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext$SecureCallbackHandler.handle(LoginContext.java:965)
        at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:870)
        at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:715)
        at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:580)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at javax.security.auth.login.LoginContext.invoke(LoginContext.java:784)
        at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:698)
        at javax.security.auth.login.LoginContext$4.run(LoginContext.java:696)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:695)
        at javax.security.auth.login.LoginContext.login(LoginContext.java:594)
        at org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck.checkAuthentication(KerberosConfigCheck.java:225)
        at org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck.authenticate(KerberosConfigCheck.java:216)
        at org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck.validateKerberosInstallation(KerberosConfigCheck.java:155)
        at org.ovirt.engine.core.utils.kerberos.KerberosConfigCheck.checkInstallation(KerberosConfigCheck.java:144)
        at org.ovirt.engine.core.utils.kerberos.ManageDomains.checkKerberosConfiguration(ManageDomains.java:628)
        at org.ovirt.engine.core.utils.kerberos.ManageDomains.testConfiguration(ManageDomains.java:778)
        at org.ovirt.engine.core.utils.kerberos.ManageDomains.addDomain(ManageDomains.java:440)
        at org.ovirt.engine.core.utils.kerberos.ManageDomains.runCommand(ManageDomains.java:238)
        at org.ovirt.engine.core.utils.kerberos.ManageDomains.main(ManageDomains.java:166)

Failure while testing domain qa.lab.tlv.redhat.com. Details: Kerberos error. Please check log for further details.


Version-Release number of selected component (if applicable):
SI22

How reproducible:
100%

Expected results:
Give just error which is user understandable & readble.

--- Additional comment from Ravi Nori on 2012-11-01 00:28:22 EDT ---

link : http://gerrit.ovirt.org/#/c/8965/

hash : cd3bc4ca2faca9efb46ec402093649b1f4af8c06

Comment 2 Ilanit Stein 2012-12-16 13:38:36 UTC
Verified on SI25.1:

[root@lilach-rhel ~]# rhevm-manage-domains  -action=add -addPermissions -domain=qa.lab.tlv.redhat.com -user=vdcadmin -provider=activeDirectory -passwordFile=pass
password file is empty
[root@lilach-rhel ~]# rm pass
rm: remove regular empty file `pass'? y
[root@lilach-rhel ~]# rhevm-manage-domains  -action=add -addPermissions -domain=qa.lab.tlv.redhat.com -user=vdcadmin -provider=activeDirectory -passwordFile=pass
failed reading password from password file

No errors on any recoed for the above actions in engine.log

Comment 4 errata-xmlrpc 2013-01-15 15:13:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0003.html


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