MusicDin / kubitect

Kubitect provides a simple way to set up a highly available Kubernetes cluster across multiple hosts.

Home Page:https://kubitect.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error creating multiple data resource pools on the same host

MusicDin opened this issue · comments

│ Error: error creating libvirt storage pool: operation failed: Storage source conflict with pool: 'local-rook-pool-data-resource-pool'
│ 
│   with module.host_localhost.libvirt_pool.data_resource_pools["rook-pool-2"],
│   on modules/host/main.tf line 29, in resource "libvirt_pool" "data_resource_pools":
│   29: resource "libvirt_pool" "data_resource_pools" {

Data resource pool names are different but paths are the same:

resource "libvirt_pool" "data_resource_pools" {

  for_each = { for pool in var.hosts_dataResourcePools : pool.name => pool }

  name = "${var.cluster_name}-${each.key}-data-resource-pool"
  type = "dir"
  path = pathexpand("${trimsuffix(each.value.path, "/")}/${var.cluster_name}-data-resource-pool" # -${each.key} is missing
}