actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

MacOS 14 Runner Cant Resolve keyserver.ubuntu.com #9777

Closed steelhead31 closed 2 days ago

steelhead31 commented 2 weeks ago

Description

The MACOS 14 github action runner is unable to resolve keyserver.ubuntu.com for retrieving GPG keys.

Currently using this workaround to replace the keyserver name with its IP address which works

sed -i '' 's/keyserver\.ubuntu\.com/185.125.188.27/g'

Platforms affected

Runner images affected

Image version and build link

Link : https://github.com/adoptium/infrastructure/actions/runs/8922598468/job/24505071773

Current runner version: '2.316.0' Operating System macOS 14.4.1 23E224 Runner Image Runner Image Provisioner GITHUB_TOKEN Permissions Secret source: None Prepare workflow directory Prepare all required actions Getting action download info Download action repository 'actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633' (SHA:9bb56186c3b09b4f86b1c65136769dd318469633) Complete job name: macOS (macos-14)

Is it regression?

No

Expected behavior

The machine should be able to resolve the DNS name to its IP address

Actual behavior

TASK [ant : GPG Signature verification] ****************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NoneType: None
fatal: [localhost]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 2, "stderr": "gpg: directory '/Users/runner/.gnupg' created\ngpg: keyserver receive failed: No route to host\n", "stderr_lines": ["gpg: directory '/Users/runner/.gnupg' created", "gpg: keyserver receive failed: No route to host"], "stdout": "", "stdout_lines": []}

Repro steps

Import a gpg key from keyserver.ubuntu.com on a macos14 runner.

shamil-mubarakshin commented 1 week ago

Hey @steelhead31. System itself is resolving keyserver.ubuntu.com correctly. There might be some name resolution issue when using gpg which I will check and get back

steelhead31 commented 1 week ago

@shamil-mubarakshin Thanks!

shamil-mubarakshin commented 1 week ago

@steelhead31, looks like it is something MacOs specific. I get similar results when running command on a local Mac machine, as well as Actions MacOS offerings. It is also sporadic (some complete successfully over a number of attempts). In Actions I found using dirmngr.conf and standard-resolver yielding results:

  - run: |
      mkdir -p ~/.gnupg/
      touch ~/.gnupg/dirmngr.conf
      echo "standard-resolver" >  ~/.gnupg/dirmngr.conf

So far it doesn't look like something to be resolved on an image side. Let me know if you have any additional information

steelhead31 commented 1 week ago

Thanks for the response, I'll check with some of our Mac developers, see if anyone else has seen this behaviour outside of the runner. The workaround works for now.

steelhead31 commented 2 days ago

Ok, since it looks intermittent, I'll assume its server side @ Ubuntu, will keep an eye on this.