clincha-org / clincha

Configuration and monitoring of clinch-home infrastructure
https://clinch-home.com
1 stars 1 forks source link

Terraform unable to deploy new servers #86

Closed clincha closed 1 year ago

clincha commented 1 year ago

I haven't changed the code since it was working in Bristol. I wonder if there are issues with the Proxmox updates

Stack trace from this run.

╷
│ Warning: Value for undeclared variable
│ 
│ The root module does not declare a variable named "TF_LOG" but a value was
│ found in file
│ "/home/tfc-agent/.tfc-agent/component/terraform/runs/run-yZmhDm8eh7ozT5zi/terraform.tfvars".
│ If you meant to use this value, add a "variable" block to the
│ configuration.
│ 
│ To silence these warnings, use TF_VAR_... environment variables to provide
│ certain "global" settings to all configurations in your organization. To
│ reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Error: Get "https://192.168.1.13:8006/api2/json/access/users?full=1": dial tcp 192.168.1.13:8006: connect: connection timed out
│ 
│   with provider["registry.terraform.io/telmate/proxmox"].bri-s-03,
│   on providers.tf line 25, in provider "proxmox":
│   25: provider "proxmox" {
│ 
╵
╷
│ Error: Get "https://192.168.1.11:8006/api2/json/access/users?full=1": dial tcp 192.168.1.11:8006: connect: connection timed out
│ 
│   with provider["registry.terraform.io/telmate/proxmox"].bri-s-01,
│   on providers.tf line 9, in provider "proxmox":
│    9: provider "proxmox" {
│ 
╵
╷
│ Error: Get "https://192.168.1.12:8006/api2/json/access/users?full=1": dial tcp 192.168.1.12:8006: connect: connection timed out
│ 
│   with provider["registry.terraform.io/telmate/proxmox"].bri-s-02,
│   on providers.tf line 17, in provider "proxmox":
│   17: provider "proxmox" {
│ 
clincha commented 1 year ago

I deleted and readded the token for terraform in the Proxmox console. I don't think this will help but it needed rotated anyway

clincha commented 1 year ago

I added in the right tokens for the accounts and it started working again. Terraform is not having the best time with this deployment.

image

clincha commented 1 year ago

I ran journalctl which gave me some good information:

image

clincha commented 1 year ago

Timed out waiting for device dev-mapper-rl\x2dswap.device. ... dev-mapper-rl\x2dswap.device: Job dev-mapper-rl\x2dswap.device/start failed with result 'timeout'.

clincha commented 1 year ago

I needed to set the scsi controller that the Terraform code applied to the same as the one Packer set. I also needed to remove the additional disk.

  scsihw      = "virtio-scsi-pci"