Bug 1266019

Summary: RuntimeError: Unable to load file /usr/share/ipa/smb.conf.empty
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: ipaAssignee: IPA Maintainers <ipa-maint>
Status: CLOSED WONTFIX QA Contact: Namita Soman <nsoman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: abokovoy, mkosek, rcritten, tbabej
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-24 10:55:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sudhir Menon 2015-09-24 10:26:41 UTC
Description of problem: Runtime error is displayed when trust is added without 
ipa-server-trust-ad rpm installed on the IPA-server

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


How reproducible: Always


Steps to Reproduce:
1. Ensure ipa-server-install commands completes successfully.
2. Ensure ipa-adtrust-install command completes successfully.
3. Now do "yum remove ipa-server-trust-ad"
4. Navigate to IPA UI | Trust Tab | Click on Add trust.
5. Specify all the trust server details and click Add

Actual results:

1. IPA Error 903: InternalError is displayed on the UI.
2. /var/log/httpd/error_log displays the below message

[Thu Sep 24 15:43:00.618964 2015] [:error] [pid 3423] ipa: ERROR: non-public: RuntimeError: Unable to load file /usr/share/ipa/smb.conf.empty
[Thu Sep 24 15:43:00.619011 2015] [:error] [pid 3423] Traceback (most recent call last):
[Thu Sep 24 15:43:00.619014 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 347, in wsgi_execute
[Thu Sep 24 15:43:00.619017 2015] [:error] [pid 3423]     result = self.Command[name](*args, **options)
[Thu Sep 24 15:43:00.619019 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 443, in __call__
[Thu Sep 24 15:43:00.619021 2015] [:error] [pid 3423]     ret = self.run(*args, **options)
[Thu Sep 24 15:43:00.619023 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 760, in run
[Thu Sep 24 15:43:00.619025 2015] [:error] [pid 3423]     return self.execute(*args, **options)
[Thu Sep 24 15:43:00.619027 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py", line 628, in execute
[Thu Sep 24 15:43:00.619032 2015] [:error] [pid 3423]     full_join = self.validate_options(*keys, **options)
[Thu Sep 24 15:43:00.619036 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/trust.py", line 746, in validate_options
[Thu Sep 24 15:43:00.619038 2015] [:error] [pid 3423]     self.trustinstance = ipaserver.dcerpc.TrustDomainJoins(self.api)
[Thu Sep 24 15:43:00.619040 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1263, in __init__
[Thu Sep 24 15:43:00.619042 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 1267, in __populate_local_domain
[Thu Sep 24 15:43:00.619044 2015] [:error] [pid 3423]   File "/usr/lib/python2.7/site-packages/ipaserver/dcerpc.py", line 788, in __init__
[Thu Sep 24 15:43:00.619046 2015] [:error] [pid 3423] RuntimeError: Unable to load file /usr/share/ipa/smb.conf.empty
[Thu Sep 24 15:43:00.619420 2015] [:error] [pid 3423] ipa: INFO: [jsonserver_session] admin: trust_add(u'TEST.IN', realm_admin=u'Administrator', realm_passwd=u'********', range_type=u'', bidirectional=True, version=u'2.156'): RuntimeError

Expected results:
Although this scenario won't be executed at a customer end, can we try to eliminate the traceback message and also if possible try to add a check to see if the ipa-server-trust-ad rpm is present on the IPA server box with the 
/usr/share/ipa/smb.conf.empty present, while adding trust from UI.

Additional info:

Comment 3 Alexander Bokovoy 2015-09-24 10:54:53 UTC
I don't think it is reasonable to add belts and suspenders everywhere. By the same logic, you could remove ipa-server package and without restarting httpd everything will still be working until some external data would be required. Do we need to add checks there as well? I don't think so.

I would rather spend time on testing real workflows and finding bugs there.

Comment 4 Alexander Bokovoy 2015-09-24 10:55:22 UTC
I want to close this WONTFIX.

Comment 5 Tomas Babej 2015-09-24 11:36:18 UTC
I agree with Alexander on this one, the scenario is too far-fetched.