-
Notifications
You must be signed in to change notification settings - Fork 229
Agent installation fails on aws amzn2 #406
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
Comments
I have the same problem on Amazon Linux 2. So the problematic change is this one: #301. I think it is based on assumptions that are not always true. It wants to use dnf intead of yum if I think the right fact to use is Side note: the
So maybe even no changes are required. And the original issue (#298), that reported this, mentions documentation entry about yum module not being supported on Python 3. But it is – for years. Maybe not via native bindings, but it works. And regarding dnf support – AFAIK there's compatibility layer that allows using yum command on a dnf system. |
Don't use `python.version.major >= 3` condition to select `dnf` instead of `yum`, because it breaks Python 3 on Amazon Linux 2 setups, where `yum` is still used. Use `ansible_pkg_mgr` fact directly instead. Fixes: DataDog#406.
Don't use `python.version.major >= 3` condition to select `dnf` instead of `yum`, because it breaks Python 3 on Amazon Linux 2 setups, where `yum` is still used. Use `ansible_pkg_mgr` fact directly instead. Remove an explicit fail that's too defensive. Fixes: DataDog#406.
@msiebeneicher: could you please test your setup with changes from #412? Thanks! |
* Fix provisioning on Python 3 / Amazon Linux 2 Don't use `python.version.major >= 3` condition to select `dnf` instead of `yum`, because it breaks Python 3 on Amazon Linux 2 setups, where `yum` is still used. Use `ansible_pkg_mgr` fact directly instead. Fixes: #406. * Add manual testing on Centos 8 and Amazon Linux 2 1. Extend manual tests setup to include more operating systems – modern RedHat-style one (Centos 8) that uses dnf, legacy RedHat-style one which uses yum (Amazon Linux 2). Keep Ubuntu as a default one. 2. Run Ansible on provisioned machines automatically. By default all playbooks are run. Now there is no need to change current working directory to interact with Ansible and Vagrant. There's also no need to modify inventory file if ports change. There're also no problems with SSH known hosts anymore. 3. Update `readme.md`. 4. Git ignore `.vagrant`.
Hi,
we are using the datadog.datadog role from ansible galaxy now for a couple of time.
Since the last agent version 7.32.4 (how it looks like) our packer build is failing with the following error message:
This error happen on the latest aws ami
amzn2-ami-hvm-2.0.20211201.0-x86_64-ebs
(ami-01826408c6676f97e
) and also on the previous version (ami-0d455065dfd31a3cd
) which we already successfully used in the past.As a workaround we tried successfully to install the agent by the official shell installer on the same ec2 instance:
DD_AGENT_MAJOR_VERSION=7 DD_API_KEY=<KEy> DD_SITE="datadoghq.eu" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
I also tried the workaround described in your docs under https://docs.datadoghq.com/agent/basic_agent_usage/ansible/ which also was not working in our case because the
dnf
and thepython3-dnf
packages are not available in the default aws repositories. If I use the optiondatadog_ignore_old_centos_python3_error: true
i get the following error message:Any ideas or suggestions to handle this issue or why this issue is popping up now?
Here my used version:
datadog.datadog role version:
aws amis:
"Name": "amzn2-ami-hvm-2.0.20211201.0-x86_64-ebs",
"ImageId": "ami-01826408c6676f97e",
"CreationDate": "2021-12-01T19:55:07.000Z"
"Name": "amzn2-ami-hvm-2.0.20211005.0-x86_64-ebs",
"ImageId": "ami-0d455065dfd31a3cd",
"CreationDate": "2021-10-12T14:12:46.000Z"
The text was updated successfully, but these errors were encountered: