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

Terraform setup fails when using CentOS Stream 9 #226

Open
DomGarguilo opened this issue Sep 21, 2022 · 3 comments
Open

Terraform setup fails when using CentOS Stream 9 #226

DomGarguilo opened this issue Sep 21, 2022 · 3 comments
Labels
terraform issues related to terraform

Comments

@DomGarguilo
Copy link
Member

When running through the terraform setup with a CentOS Stream 9 ami, I got the following error:

module.config_files.null_resource.upload_config_files: Creation complete after 2s [id=5009114764454071897]
module.configure_nodes.null_resource.configure_manager_node: Creating...
module.configure_nodes.null_resource.configure_manager_node: Provisioning with 'remote-exec'...
module.configure_nodes.null_resource.configure_manager_node (remote-exec): Connecting to remote host via SSH...
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Host: 34.207.226.201
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   User: hadoop
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Password: false
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Private key: false
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Certificate: false
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   SSH Agent: true
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Checking Host Key: false
module.configure_nodes.null_resource.configure_manager_node (remote-exec):   Target Platform: unix
module.configure_nodes.null_resource.configure_manager_node (remote-exec): Connected!
module.configure_nodes.null_resource.configure_manager_node (remote-exec): Check genders file validity...
module.configure_nodes.null_resource.configure_manager_node (remote-exec): /usr/local/bin/update-hosts-genders.sh: line 57: nodeattr: command not found
╷
│ Error: remote-exec provisioner error
│ 
│   with module.configure_nodes.null_resource.configure_manager_node,
│   on ../modules/configure-nodes/main.tf line 36, in resource "null_resource" "configure_manager_node":
│   36:   provisioner "remote-exec" {
│ 
│ error executing "/tmp/terraform_985881320.sh": Process exited with status 127

This blocked the setup. After switching to a CentOS 7 ami, I was able to complete setup. I am not certain that this is caused by the OS but that was the only factor I changed between runs.

@ctubbsii
Copy link
Member

Looking at that section, two things stand out:

  1. That section uses pdcp, from the pdsh command. pdsh needs to be installed first, and I doubt it is installed by default.
  2. The error says it can't find nodeattr, which is provided by the genders package, which also needs to be installed and is not installed by default.

@DomGarguilo DomGarguilo added the terraform issues related to terraform label Sep 22, 2022
@dlmarion
Copy link
Contributor

dlmarion commented Sep 22, 2022

The packages are installed as part of cloud-init here and then pdsh-mod-genders is installed here. There should be a cloud-init log file on the host and that should have more information. My guess is that the problem is the pdsh RPMs are not in the epel-release repo for CentOS 9.

Edit: I looked in epel and epel-next and I don't see them.

@ctubbsii
Copy link
Member

RHEL9 was based on Fedora 34, so you can probably download them from the F34 repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
terraform issues related to terraform
Projects
None yet
Development

No branches or pull requests

3 participants