Skip to content

Fix hostname resolution after DNS test resolver setup - #25905

Merged
bukka merged 1 commit into
php:PHP-8.4from
bukka:dns-test-hosts
Nov 29, 2026
Merged

bukka merged 1 commit into
php:PHP-8.4from
bukka:dns-test-hosts

Conversation

@bukka

@bukka bukka commented Nov 29, 2026

Copy link
Copy Markdown
Member

The LINUX_X64 jobs started failing in the Setup step on all branches, e.g. https://github.com/php/php-src/actions/runs/46308125461/job/141488150654.

The new runner images (ubuntu-24.04 version 20261122) have hostnames like ip-10-0-136-195 that are not in /etc/hosts and are only resolvable through systemd-resolved, which synthesizes the local hostname. Once resolv-setup.sh points /etc/resolv.conf to the BIND test server, the hostname no longer resolves (sudo: unable to resolve host ...), setup-slapd.sh ends up with an empty subjectAltName and openssl req fails.

This adds the hostname to /etc/hosts in resolv-setup.sh when it is not resolvable and removes it again in resolv-reset.sh.

The new GitHub runner images do not have the hostname in /etc/hosts and
rely on systemd-resolved synthesizing it. Once /etc/resolv.conf points to
the BIND test server the hostname no longer resolves, which breaks sudo
and the slapd certificate setup. Add the hostname to /etc/hosts when it is
not resolvable and remove it again in resolv-reset.sh.
@bukka
bukka merged commit 43d34e2 into php:PHP-8.4 Nov 29, 2026
16 of 18 checks passed
bukka added a commit that referenced this pull request Nov 29, 2026
* PHP-8.4:
  Fix hostname resolution after DNS test resolver setup (#25905)
bukka added a commit that referenced this pull request Nov 29, 2026
* PHP-8.5:
  Fix hostname resolution after DNS test resolver setup (#25905)
bukka added a commit that referenced this pull request Nov 29, 2026
* PHP-8.6:
  Fix hostname resolution after DNS test resolver setup (#25905)
arnaud-lb added a commit to morrisonlevi/php-src that referenced this pull request Dec 1, 2026
* PHP-8.4: (190 commits)
  JIT: Fix state left by killed processes (php#25842)
  ext/xmlwriter: report the right argument number for an invalid name in method calls
  ext/soap: fix DTD node being matched as an element
  Zend: delayed OOM clears the opline of a frame mid-op.
  Fix fd leak in compress.zlib:// when gzdopen() fails (php#25794)
  Fix NULL dereference in php_init_config() for unresolvable search path ini (phpGH-25882)
  Fix missing \ in .github/actions/test-linux/action.yml. Sorry...
  Remove idleCpu config from CI
  ext/sockets: Fix socket_close_stream_resource.phpt on Windows (phpGH-25946)
  Add missing feedback changes for phpGH-25747
  Fix phpGH-25809: SQLite3::backup() returns true when the backup fails (php#25810)
  Fix race in GHSA-r6x9-5r99-36j7 tests
  ext/curl: Fix intermittent curl test failures on FreeBSD (phpGH-25911)
  ext/intl: Fix UAF in UConverter::convert() on re-entrant encoding change
  ext/bz2: Reset input position after a decompression error
  ext/sockets: Fix leak of the stream resource in socket_close()
  ext/soap: Fix SOAP error handler dropping a custom HTTP status line
  ext/phar: Read all four bytes of tar signature flags
  Fix hostname resolution after DNS test resolver setup (php#25905)
  Fix use-after-free when proc_open() pipe is closed from its user filter
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant