dell / dell-terraform-providers

Terraform providers will provide easy and seamless integration with Dell Infrastructure.
Mozilla Public License 2.0
3 stars 1 forks source link

[BUG] powerscale provider v1.2.0: Quota issues. #15

Closed petew-nfx closed 6 months ago

petew-nfx commented 7 months ago

The main issue is the ability to increase thresholds via terraform apply, the other issue is mentioned as it may be related.

Make a directory on cluster and set hard quota threshold to 1M. isi quota quotas create /ifs/zone1/quota_dir directory --hard-threshold=1M

After importing the quota into terraform terrafrom state show <resource> shows 0s where null should be.

    thresholds        = {
        advisory               = 0
        advisory_exceeded      = false
        advisory_last_exceeded = 0
        hard                   = 1048576
        hard_exceeded          = false
        hard_last_exceeded     = 0
        soft                   = 0
        soft_exceeded          = false
        soft_grace             = 0
        soft_last_exceeded     = 0
    }

Whereas the cluster side json shows

{
  "advisory": null,
  "advisory_exceeded": false,
  "advisory_last_exceeded": null,
  "hard": 1048576,
  "hard_exceeded": false,
  "hard_last_exceeded": null,
  "percent_advisory": null,
  "percent_soft": null,
  "soft": null,
  "soft_exceeded": false,
  "soft_grace": null,
  "soft_last_exceeded": null
}

Attempting to adjust the hard threshold. Using the resource file:

resource "powerscale_quota" "quota_dir" {
    container         = false
    enforced          = true
    include_snapshots = false
    linked            = false
    path              = "/ifs/zone1/quota_dir"
    thresholds        = {
        hard                   = 1048576
    }
    thresholds_on     = "fslogicalsize"
    type              = "directory"
}

terraform plan shows No changes.

When attempting to increase the hard threshold from 1048576 to 10485760 using terraform apply the following error occurs:

Could not update quotas with error: Linking changes cannot be done with any other quota update  400 Bad Request
gokul-srivathsan commented 7 months ago

Thanks @petew-nfx for raising this issue. We will get back to you as soon as possible. @forrestxia fyi.

P-Cao commented 7 months ago

Hi @petew-nfx , please try to remove linked = false in your config. The field linked should be used for linked quota when users try to unlink them.

petew-nfx commented 7 months ago

Thanks for clarifying the issue @P-Cao - that worked.

forrestxia commented 7 months ago

@petew-nfx can we close this issue as the problem has been addressed?

forrestxia commented 6 months ago

Hi @petew-nfx, this issue has been fixed in v1.3.0 released today, please verify and let us know if it works.

petew-nfx commented 6 months ago

Thank you. This issue can be closed.