terraform-provider-ovh icon indicating copy to clipboard operation
terraform-provider-ovh copied to clipboard

nasha

Open goblain opened this issue 6 years ago • 6 comments

draft for nasha partition/access mgmt, docs to follow, is it possible to get nasha service for acceptance testing, that would be provided with something like OVH_NASHA env var ?

would solve https://github.com/terraform-providers/terraform-provider-ovh/issues/11

goblain avatar Jun 25 '18 08:06 goblain

@yanndegat any comments on getting test service for this ?

goblain avatar Aug 03 '18 08:08 goblain

@yanndegat any thoughts on testing for this ? we'd need a nasha service to do so. Should I pored some tests for that or can we integrate this resource without tests fr the moment ? (if so, I'll rebase and prep this for merge in upcoming days)

also, a second thought here. As I use this in production already, I can say that removal of ACL from NASHA service is unstable for me due to OVH API side issues, got any way to find out if this is a known problem ("ovhError" on the acl removal task) ?

goblain avatar Oct 12 '18 08:10 goblain

hi @goblain

i'll try to ping someone from the nasha team to get feedback on this issue with ACLs.

regarding the tests, i feel like we should add at least a few. i'll try to see if we can get a nasha service for the hashicorp test account.

thanks a lot once again for all the tough work

yanndegat avatar Oct 19 '18 05:10 yanndegat

@yanndegat added tests. If you check that with cd ovh; TF_ACC=true go test -v -run TestAccDedicatedNASHA having the required env vars set (new one is OVH_NASHA_SERVICE) you can see it fails with error like

=== RUN   TestAccDedicatedNASHA                         
--- FAIL: TestAccDedicatedNASHA (125.50s)            
    testing.go:552: Error destroying resource! WARNING: Dangling resources                                                                                                                                           
        may exist. The full state and error is shown below.                                               
                                                                       
        Error: Error applying: 1 error(s) occurred:                                                       
                                                    
        * ovh_dedicated_nasha_partition_access.testacc (destroy): 1 error(s) occurred:
                                                             
        * ovh_dedicated_nasha_partition_access.testacc: waiting for NASHA partition access: unexpected state 'ovhError', wanted target 'done'. last error: %!s(<nil>)
                                                 
    State: ovh_dedicated_nasha_partition.testacc:           
      ID = dedicated_nasha_zpool-000000_partition_testacc_a69755fc97807f58425ee68b0e2ec262
      capacity = 0                               
      name = testacc_a69755fc97807f58425ee68b0e2ec262
      protocol = NFS                             
      service_name = zpool-000000
      size = 10                                                                                                                        
      used_by_snapshots = 0                                                                                   
        ovh_dedicated_nasha_partition_access.testacc:
          ID = dedicated_nasha_zpool-000000_partition_testacc_a69755fc97807f58425ee68b0e2ec262_access_10.10.10.10/32
          ip = 10.10.10.10/32
          partition_name = testacc_a69755fc97807f58425ee68b0e2ec262                               
          service_name = zpool-000000
          type = readonly                                     
                                                     
          Dependencies:                                     
            ovh_dedicated_nasha_partition.testacc                                                         
FAIL                                                                    
exit status 1                                                                                             
FAIL    github.com/terraform-providers/terraform-provider-ovh/ovh       125.507s

as you can see it fails cause during Destroy phase the nasha_partition_access is not correctly deleted due to the responsible task going into ovhError state, which in turn leaves the partition it self not deleted as well, so we have failed test run and leftovers.

As I am running with these resources for a while now, I can tell you that it's rathr rare to see this destruction call to succeed

goblain avatar Oct 23 '18 10:10 goblain

hey, any news about this ?

goblain avatar Jun 04 '19 07:06 goblain

Can this be merged, someday ?

131 avatar Jul 20 '22 10:07 131

NAS-HA have been implemented, fixed :)

scraly avatar Jan 29 '23 10:01 scraly