在设置"host_network"选项时,AWS 指纹识别器在 OpenStack 上出现故障。
问题
我使用了 Nomad 版本 1.9.7 的 Nomad 客户端一段时间。然后,我将以下内容添加到 nomad.hcl 配置文件中,并重启 Nomad。之后,Nomad 通过 systemd 启动 - 这就是 Nomad 进入重启循环的原因。客户端记录了以下内容:
Apr 3 08:36:42 nomad-client-0 nomad[8142]: SDK 2025/04/03 08:36:42 WARN falling back to IMDSv1: operation error ec2imds: getToken, http response error StatusCode: 404, request to EC2 IMDS failed
和 Apr 3 08:42:55 nomad-client-0 nomad[8345]: 2025-04-03T08:42:55.038Z [ERROR] agent: error starting agent: error="client setup failed: fingerprinting failed: operation error ec2imds: GetMetadata, canceled, context deadline exceeded" Apr 3 08:42:55 nomad-client-0 systemd[1]: nomad.service: Main process exited, code=exited, status=1/FAILURE Apr 3 08:42:55 nomad-client-0 systemd[1]: nomad.service: Failed with result 'exit-code'. Apr 3 08:42:57 nomad-client-0 systemd[1]: nomad.service: Scheduled restart job, restart counter is at 1. Apr 3 08:42:57 nomad-client-0 systemd[1]: Stopped Nomad. Apr 3 08:42:57 nomad-client-0 systemd[1]: Started Nomad.
有趣的事情是:即使停止 Nomad 删除所有 /opt/nomad 内容,删除新的配置选项并重启,Nomad 仍然不会启动。 我切换回 Nomad 1.8.3(因为我仍然在客户端上有它),并且使用 host_network 配置后,它可以正常启动。 预期结果:Nomad 1.9.7 应该能够正常启动,使用 host_network 配置。 BTW:我有一个客户端使用 Nomad 1.9.7,它正常工作 - 我不知道为什么它在另一个客户端上不工作。 实际结果:如上所述。客户端退出。
内容来源: hashicorp/nomad