Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1283879
Description of problem: When ipa-winsync-migrate command is run on the system which is not yet configured as ipa-server, the traceback message displayed on the console should be replaced with user-friendly message saying that 'IPA is not configured on this system' Version-Release number of selected component (if applicable): 7.2 How reproducible:Always, when IPA server is not configured on the system Steps to Reproduce: 1. Login to RHEL7.2 2. Run "yum install ipa-server ipa-server-trust-ad" 3. Ensure "ipa-server-install" is not run. 4. Now do "ipa-winsync-migrate" 5. Now do "ipa-adtrust-install" Actual results: 4. traceback message is displayed on the console. [root@ipaserver1 ~]# ipa-winsync-migrate ipa: WARNING: session memcached servers not running Traceback (most recent call last): File "/usr/sbin/ipa-winsync-migrate", line 23, in <module> WinsyncMigrate.run_cli() File "/usr/lib/python2.7/site-packages/ipapython/admintool.py", line 124, in run_cli sys.exit(cls.main(sys.argv)) File "/usr/lib/python2.7/site-packages/ipaserver/install/ipa_winsync_migrate.py", line 346, in main api.Backend.ldap2.connect(ccache) File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 63, in connect conn = self.create_connection(*args, **kw) File "/usr/lib/python2.7/site-packages/ipaserver/plugins/ldap2.py", line 149, in create_connection client_controls=clientctrls) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 1070, in gssapi_bind '', auth_tokens, server_controls, client_controls) File "/usr/lib64/python2.7/contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "/usr/lib/python2.7/site-packages/ipapython/ipaldap.py", line 975, in error_handler error=info) ipalib.errors.NetworkError: cannot connect to 'ldap://localhost:389': 5. Traceback message is not displayed on the console, although ipa-server-install is not run on the system [root@ipaserver1 ~]# ipa-adtrust-install The log file for this installation can be found in /var/log/ipaserver-install.log IPA is not configured on this system. Expected results: Instead of the traceback message seen in Actual Results 4, the output should be similar to what we see in Actual Results 5. Basically replace traceback message with user-friendly message on the console. Additional info:
attachment freeipa-rga-0064-Check-if-IPA-is-configured-before-attempting-a-winsy.patch
master:
This will be pushed to ipa-4-2 too.
ipa-4-2:
Metadata Update from @pvoborni: - Issue assigned to rga - Issue set to the milestone: FreeIPA 4.2.4
Login to comment on this ticket.