Closed pavel-z1 closed 2 years ago
The error is occuring inside ipalib, part of FreeIPA, it might be an issue there or on ansible-freeipa.
Can you provide CentOS and package versions? Can you provide details on the configuration you are using so that it can be reproduced?
Hi @rjeffman
I am use CentOS Linux release 8.1.1911 (Core) with kernel 4.18.0-147.8.1.el8_1.x86_64. This is latest public CentOS 8.
Steps to reproduce issue:
ipareplica_setup_dns: yes
ipareplica_forwarders:
- 8.8.8.8
- 1.1.1.1
Having the same problem trying to use these ansible roles for a FreeIPA deployment on CentOS 8!
We did a temporary try-catch patch for /usr/lib/python3.6/site-packages/ipalib/cli.py
to get around this error for now;
try:
if sys.stdout.isatty():
try:
winsize = fcntl.ioctl(sys.stdout, termios.TIOCGWINSZ,
struct.pack('HHHH', 0, 0, 0, 0))
return struct.unpack('HHHH', winsize)[1]
except IOError:
pass
except AttributeError:
pass
return None
I had exactly the same issue on an updated CentOS 8.
I fixed that by adding the missing isatty
method to theAnsibleModuleLog
class.
diff --git a/roles/ipareplica/module_utils/ansible_ipa_replica.py b/roles/ipareplica/module_utils/ansible_ipa_replica.py
index b0f0d03..f6681d5 100644
--- a/roles/ipareplica/module_utils/ansible_ipa_replica.py
+++ b/roles/ipareplica/module_utils/ansible_ipa_replica.py
@@ -191,6 +191,9 @@ class AnsibleModuleLog():
def info(self, msg):
self.module.debug(msg)
+ def isatty(self):
+ return False
+
def write(self, msg):
self.module.debug(msg)
# self.module.warn(msg)
Just run into this issue 2 years later. Is there any reason keeping those 3 lines from being added upstream?
I wonder why this does happen, as CentOS is used a lot on testing and I was never able to reproduce this. My guess is that this is shadowing another issue.
@Drugantibus can you provide the settings you are using to deploy the replica?
@rjeffman This is actually on Fedora 34 ("Cloud Edition", on EC2). Here are the vars used:
ipaserver_domain: ***
ipaserver_realm: ***
ipaserver_setup_dns: true
ipaserver_forwarders: 10.0.0.2
ipaserver_reverse_zones: 0.10.in-addr.arpa
ipaserver_allow_zone_overlap: true
ipaserver_no_dnssec_validation: true
ipareplica_server: ipa01.***
ipareplica_setup_dns: true
ipareplica_setup_ca: true
ipareplica_forwarders: 10.0.0.2
ipareplica_no_dnssec_validation: true
ipaclient_mkhomedir: true
ipaclient_all_ip_addresses: true
ipaclient_ssh_trust_dns: true
ipasssd_enable_dns_updates: true
@Drugantibus can you deploy the replica using the command line, in the same environment?
Just ran into this issue on centos stream 9 with ansible_freeipa 1.8.1 With the workaround from iiomnium it passes.
@rjeffman I can do some tests if you need someone.
Hi
I try to install FreeIPA on CentOS 8. All installation steps (Setup DS, Setup CA) works, except setup DNS role.
During execution TASK [ipareplica : Install - Setup DNS] I receive error:
Full Traceback:
I saw closed issue https://github.com/freeipa/ansible-freeipa/issues/117 but no solution is provided. Can you please help to solve issue?