Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import an IPv6 cluster #1090

Open
telnoratti opened this issue Nov 7, 2019 · 0 comments
Open

Failed to import an IPv6 cluster #1090

telnoratti opened this issue Nov 7, 2019 · 0 comments

Comments

@telnoratti
Copy link

I've been trying to use tendrl with an IPv6 only gluster cluster. I tried to import the cluster, but got the following error:

Failure in Job a6a15cb6-603c-42a3-bbba-8048d12342c9 Flow tendrl.flows.ImportCluster with error: Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/tendrl/commons/jobs/__init__.py", line 235, in process_job the_flow.run() File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/import_cluster/__init__.py", line 131, in run exc_traceback) FlowExecutionFailedError: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/import_cluster/__init__.py", line 98, in run\n super(ImportCluster, self).run()\n', ' File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/__init__.py", line 129, in run\n ret_val = self._execute_atom(atom_fqn)\n', ' File "/usr/lib/python2.7/site-packages/tendrl/commons/flows/__init__.py", line 252, in _execute_atom\n parameters=self.parameters\n', ' File "/usr/lib/python2.7/site-packages/tendrl/commons/objects/gluster_peer/atoms/gluster_server_peer_check/__init__.py", line 42, in run\n peer_hostname\n', 'gaierror: [Errno -2] Name or service not known\n'] 

I think the problem is https://github.com/Tendrl/commons/blob/master/tendrl/commons/objects/gluster_peer/atoms/gluster_server_peer_check/__init__.py#L41 which is using the deprecated gethostbyname. https://docs.python.org/2/library/socket.html#socket.gethostbyname. This should be using getaddrinfo which supports IPv6 and IPv4. There seems to be another use at https://github.com/Tendrl/commons/blob/master/tendrl/commons/objects/gluster_peer/atoms/gluster_server_peer_check/__init__.py#L56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant