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

ssh session open error: 'client not avilable' using salt provisioner #17413

Closed
vectorsigma opened this issue Feb 22, 2018 · 3 comments
Closed

Comments

@vectorsigma
Copy link

I'm trying to use the salt-masterless provisioner to provision a single EC2 instance according to the states repo configured.

I'm able to ssh into the spawned instance, but the terraform binary doesn't appear to be able to, from the same machine. I'm using the latest release of terraform, as it fixed the only issue that seemed related.

Terraform Version

$ terraform -version
Terraform v0.11.3                                                                                                                                                                                    
+ provider.aws v1.9.0

Terraform Configuration Files

resource "aws_instance" "cal1" {
  ami = "${data.aws_ami.f27.id}"
  instance_type = "${var.instance_type}"
  key_name = "${var.ssh_key}"
  availability_zone = "${var.aws_region}a"
  vpc_security_group_ids = [ "${aws_security_group.only_me.id}" ]
  subnet_id = "${aws_subnet.base_vpc_az1.id}"

  provisioner "salt-masterless" {
    local_state_tree = "${var.salt_path}/salt"
    local_pillar_roots = "${var.salt_path}/pillar"
  }

  tags {
    Name = "calendar-server"
    SaltRole = "calendar-server"
  }
}
...

Debug Output

debug output

Expected Behavior

EC2 instance would be provisioned using the saltmaster.

Actual Behavior

Exits with an error:

Error: Error applying plan:

1 error(s) occurred:

* aws_instance.cal1: 1 error(s) occurred:

* Unable to install Salt: dial tcp 34.213.194.235:22: i/o timeout

Steps to Reproduce

  1. terraform plan -var-file=terraform.tfvars apply.out
  2. terraform apply apply.out

Additional Context

I have set my AWS_PROFILE environment variable. I'm also executing the terraform commands via a make file, but the target basically just runs: terraform init, terraform plan, then terraform apply. Not complicated.

References

@vectorsigma
Copy link
Author

FWIW, the salt-masterless provisioner in Packer 1.2.0 works perfectly. I don't know off hand if either project shares any code, but that might be worth investigating.

@jbardin
Copy link
Member

jbardin commented Feb 26, 2018

Hi @vectorsigma,

Thanks for filing the issue. The salt-masterless provisioner did not retry to connection if the host was not yet responsive. This should be fixed in master by #17434.

@jbardin jbardin closed this as completed Feb 26, 2018
@ghost
Copy link

ghost commented Apr 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants