Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem: pa CLI does not check if machine is enrolled before attempting to contact IPA server
Version-Release number of selected component (if applicable):
ipa-server-4.5.0-13.el7.x86_64
How reproducible: Always
Steps to Reproduce:
1. Ensure that IPA server is not installed on a system
2. Now try to run the below command.
#ipa trust-add --type=ad ipaad2008r2.test --admin Administrator --password --two-way=True --server=zombie.ipaad2008r2.test
Actual results:
[root@autohv02 ~]# ipa trust-add --type=ad ipaad2008r2.test --admin Administrator --password --two-way=True --server=zombie.ipaad2008r2.test
ipa: ERROR: IOError: [Errno 2] No such file or directory
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1348, in run
api.finalize()
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 714, in finalize
self.__do_if_not_done('load_plugins')
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 421, in __do_if_not_done
getattr(self, name)()
File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 592, in load_plugins
for package in self.packages:
File "/usr/lib/python2.7/site-packages/ipalib/__init__.py", line 948, in packages
ipaclient.remote_plugins.get_package(self),
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/__init__.py", line 126, in get_package
plugins = schema.get_package(server_info, client)
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 534, in get_package
schema = Schema(client)
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 385, in __init__
fingerprint, ttl = self._fetch(client, ignore_cache=read_failed)
File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 409, in _fetch
schema = client.forward(u'schema', **kwargs)['result']
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1096, in forward
return self._call_command(command, params)
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1077, in _call_command
return command(*params)
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1218, in _call
return self.__request(name, args)
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1185, in __request
verbose=self.__verbose >= 3,
File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 672, in single_request
h = self.make_connection(host)
File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 549, in make_connection
tls_version_max=api.env.tls_version_max)
File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 322, in create_https_connection
ctx.load_verify_locations(cafile)
IOError: [Errno 2] No such file or directory
ipa: ERROR: an internal error has occurred
Expected results:
Fix the traceback with proper error message for e.g
"IPA is not configured on the system"
Additional info:
When I run the command, I'm getting a different error:
[vagrant@localhost rpms]$ ipa trust-add --type=ad ipaad2008r2.test --admin Administrator --password --two-way=True --server=zombie.ipaad2008r2.test
ipa: ERROR: cannot connect to 'http://localhost:8888/ipa/json': [Errno 111]
Connection refused
[vagrant@localhost ~]$ ipa --version
VERSION: 4.5.1, API_VERSION: 2.224
Sudhir, what do you mean by "Ensure that IPA server is not installed on a system"? It means that the client (or another component) is installed?
Comment 6Florence Blanc-Renaud
2017-08-08 14:19:09 UTC
Description of problem: pa CLI does not check if machine is enrolled before attempting to contact IPA server Version-Release number of selected component (if applicable): ipa-server-4.5.0-13.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. Ensure that IPA server is not installed on a system 2. Now try to run the below command. #ipa trust-add --type=ad ipaad2008r2.test --admin Administrator --password --two-way=True --server=zombie.ipaad2008r2.test Actual results: [root@autohv02 ~]# ipa trust-add --type=ad ipaad2008r2.test --admin Administrator --password --two-way=True --server=zombie.ipaad2008r2.test ipa: ERROR: IOError: [Errno 2] No such file or directory Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1348, in run api.finalize() File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 714, in finalize self.__do_if_not_done('load_plugins') File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 421, in __do_if_not_done getattr(self, name)() File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 592, in load_plugins for package in self.packages: File "/usr/lib/python2.7/site-packages/ipalib/__init__.py", line 948, in packages ipaclient.remote_plugins.get_package(self), File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/__init__.py", line 126, in get_package plugins = schema.get_package(server_info, client) File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 534, in get_package schema = Schema(client) File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 385, in __init__ fingerprint, ttl = self._fetch(client, ignore_cache=read_failed) File "/usr/lib/python2.7/site-packages/ipaclient/remote_plugins/schema.py", line 409, in _fetch schema = client.forward(u'schema', **kwargs)['result'] File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1096, in forward return self._call_command(command, params) File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1077, in _call_command return command(*params) File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1218, in _call return self.__request(name, args) File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 1185, in __request verbose=self.__verbose >= 3, File "/usr/lib64/python2.7/xmlrpclib.py", line 1273, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 672, in single_request h = self.make_connection(host) File "/usr/lib/python2.7/site-packages/ipalib/rpc.py", line 549, in make_connection tls_version_max=api.env.tls_version_max) File "/usr/lib/python2.7/site-packages/ipalib/util.py", line 322, in create_https_connection ctx.load_verify_locations(cafile) IOError: [Errno 2] No such file or directory ipa: ERROR: an internal error has occurred Expected results: Fix the traceback with proper error message for e.g "IPA is not configured on the system" Additional info: