dell/terraform-provider-redfish

NEW FEATURE - Implement Lock to avoid asynchronous operations to collide

mikeletux opened this issue ยท 0 comments

Community Note

  • Please vote on this issue by adding a ๐Ÿ‘ reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

When dealing with this provider, resources need to be aware of other resources, because when performing configurations, server reboots might be needed.
This causes race conditions if several resources creation are run concurrently.

To avoid this, and also to avoid the depends_on tag (Terraform recommends to use this as last resort), Hashicorp suggested to implement a global Lock used by resources when it comes to configuring a server. This will make aware one resource of the creation of other one.

New or Affected Resource(s)

  • redfish_user_account
  • redfish_bios
  • redfish_storage_volume
  • redfish_virtual_media
  • redfish_power
  • redfish_simple_update

Tasks

  • Implement Lock in a separate package
  • Declare the Lock as a global variable in provider.go
  • Use the Lock in redfish_user_account resource
  • Use the Lock in redfish_bios resource
  • Use the Lock in redfish_storage_volume resource
  • Use the Lock in redfish_virtual_media resource
  • Use the Lock in redfish_power resource
  • Use the Lock in redfish_simple_update resource

References

  • #0000