scylladb / scylla-stress-orchestrator

Apache License 2.0
5 stars 9 forks source link

Invalid function argument during provisioning #37

Closed zimnx closed 2 years ago

zimnx commented 2 years ago

Provisioning is failing with:

13:02:29 WARN  ╷
13:02:29 WARN  │ Error: Invalid function argument
13:02:29 WARN  │ 
13:02:29 WARN  │   on main.tf line 168, in resource "null_resource" "cluster":
13:02:29 WARN  │  168:             "sudo sed -i \"s/seeds:.*/seeds: ${join(",",aws_instance.cluster[0].private_ip)} /g\" /etc/scylla/scylla.yaml",
13:02:29 WARN  │     ├────────────────
13:02:29 WARN  │     │ aws_instance.cluster[0].private_ip is "172.31.36.87"
13:02:29 WARN  │ 
13:02:29 WARN  │ Invalid value for "lists" parameter: list of string required.
13:02:29 WARN  ╵
13:02:29 WARN  ╷
13:02:29 WARN  │ Error: Invalid function argument
13:02:29 WARN  │ 
13:02:29 WARN  │   on main.tf line 168, in resource "null_resource" "cluster":
13:02:29 WARN  │  168:             "sudo sed -i \"s/seeds:.*/seeds: ${join(",",aws_instance.cluster[0].private_ip)} /g\" /etc/scylla/scylla.yaml",
13:02:29 WARN  │     ├────────────────
13:02:29 WARN  │     │ aws_instance.cluster[0].private_ip is "172.31.36.87"
13:02:29 WARN  │ 
13:02:29 WARN  │ Invalid value for "lists" parameter: list of string required.
13:02:29 WARN  ╵
13:02:29 WARN  ╷
13:02:29 WARN  │ Error: Invalid function argument
13:02:29 WARN  │ 
13:02:29 WARN  │   on main.tf line 168, in resource "null_resource" "cluster":
13:02:29 WARN  │  168:             "sudo sed -i \"s/seeds:.*/seeds: ${join(",",aws_instance.cluster[0].private_ip)} /g\" /etc/scylla/scylla.yaml",
13:02:29 WARN  │     ├────────────────
13:02:29 WARN  │     │ aws_instance.cluster[0].private_ip is "172.31.36.87"
13:02:29 WARN  │ 
13:02:29 WARN  │ Invalid value for "lists" parameter: list of string required.
13:02:29 WARN  ╵
Traceback (most recent call last):
  File "/home/maciej/.local/bin/provision_terraform", line 8, in <module>
    sys.exit(provision())
  File "/home/maciej/.local/lib/python3.10/site-packages/scyllaso/bin/provision_terraform.py", line 32, in provision
    terraform.apply(get_plan(args), workspace=args.workspace, options=args.options)
  File "/home/maciej/.local/lib/python3.10/site-packages/scyllaso/terraform.py", line 39, in apply
    raise Exception(f'Failed terraform apply, plan [{terraform_plan}], exitcode={exitcode} command=[{cmd}])')
Exception: Failed terraform apply, plan [ec2-scylla], exitcode=1 command=[terraform -chdir=ec2-scylla apply  -auto-approve])

Version: 0.1.dev3

Benchmark was generated using provided script, I changed instance type and node number (from 1 to 3).

pveentjer commented 2 years ago

This has been fixed in the following commit:

https://github.com/scylladb/scylla-stress-orchestrator/commit/b8660d6dad89b8f90c0771a59b5b749a66e0ceb8

pveentjer commented 2 years ago

If you don't want to generate a new project, you need to remove from ec2-scylla/main.tf the following:

resource "null_resource" "cluster" {
....
}

That is the part causing problems.