Bug 1266019 - RuntimeError: Unable to load file /usr/share/ipa/smb.conf.empty
RuntimeError: Unable to load file /usr/share/ipa/smb.conf.empty
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: IPA Maintainers
Namita Soman
Depends On:
  Show dependency treegraph
Reported: 2015-09-24 06:26 EDT by Sudhir Menon
Modified: 2015-09-24 07:36 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-09-24 06:55:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sudhir Menon 2015-09-24 06:26:41 EDT
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@LABS02.TEST: 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 06:54:53 EDT
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 06:55:22 EDT
I want to close this WONTFIX.
Comment 5 Tomas Babej 2015-09-24 07:36:18 EDT
I agree with Alexander on this one, the scenario is too far-fetched.

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