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

[yugabyted] Cannot start yugabyted in GitLab CI with ipv6 advertise address #25741

Open
1 task done
jameshartig opened this issue Jan 24, 2025 · 0 comments
Open
1 task done
Labels
area/ecosystem Label for all ecosystem related projects kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@jameshartig
Copy link
Contributor

jameshartig commented Jan 24, 2025

Jira Link: DB-15023

Description

We use GitLab CI and use GitLab Services to run a yugabyte container alongside our application tests. This was working fine with 2.20.x but when we recently upgraded to 2024.1.3.1 it started breaking with the following traceback:

Service container logs:
2025-01-24T21:51:52.196190462Z Traceback (most recent call last):
2025-01-24T21:51:52.196260451Z   File "bin/yugabyted", line 9757, in <module>
2025-01-24T21:51:52.196268431Z     ControlScript().run()
2025-01-24T21:51:52.196274661Z   File "bin/yugabyted", line 7675, in run
2025-01-24T21:51:52.196280001Z     self.validate_and_set_configs(args)
2025-01-24T21:51:52.196285201Z   File "bin/yugabyted", line 7098, in validate_and_set_configs
2025-01-24T21:51:52.196290411Z     self.configs.temp_data["ui_port_available"] = self.is_port_available(
2025-01-24T21:51:52.196295731Z   File "bin/yugabyted", line 2434, in is_port_available
2025-01-24T21:51:52.196300630Z     return s.connect_ex((advertise_ip, int(port))) != 0
2025-01-24T21:51:52.196305601Z socket.gaierror: [Errno -9] Address family for hostname not supported

The container was run as such:

  services:
    - name: ${DEFAULT_DEPENDENCY_PROXY_ADDRESS}yugabytedb/yugabyte:2024.1.3.1-b8
      alias: yugabytedb
      # when we run SELECT * FROM yb_servers() we need the public_ip column to
      # have a reachable IP so we get the public IP of the docker container and
      # send that to --listen but then we still want to listen on all IPs
      command:
        [
          "/bin/bash",
          "-c",
          "bin/yugabyted start --background=false --advertise_address $(hostname -i | awk '{ print $1; exit }') --tserver_flags 'cql_proxy_bind_address=[::]:9042,pgsql_proxy_bind_address=[::]:5433'",
        ]

Specifically in this case $(hostname -i | awk '{ print $1; exit }') ended up being fd76:5338:4685:1:0:242:ac11:3. The socket is being created with AF_INET instead of AF_INET6 which is causing the issue. I believe GitLab runners only support IPv6 now so we are required to use IPv6. We also must use advertise_address because we have a smart driver and it the addresses in yb_servers() must be connectable from our unit tests.

This appears to have been changed in 89e314b.

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@jameshartig jameshartig added area/ecosystem Label for all ecosystem related projects area/ybd yugabyted project related Github tickets. status/awaiting-triage Issue awaiting triage labels Jan 24, 2025
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Jan 24, 2025
@yugabyte-ci yugabyte-ci removed the area/ybd yugabyted project related Github tickets. label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ecosystem Label for all ecosystem related projects kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants