Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand retry regexp for vCenter #760

Merged
merged 2 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changes/v3.0.0/714-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* vCenter management types `VCenter` and `types.VSphereVirtualCenter` adds Create, Update and Delete
methods: `VCDClient.CreateVcenter`, `VCDClient.GetAllVCenters`, `VCDClient.GetVCenterByName`,
`VCDClient.GetVCenterById`, `VCenter.Update`, `VCenter.Delete`, `VCenter.RefreshVcenter`,
`VCenter.Refresh` [GH-714, GH-724, GH-747, GH-753, GH-756, GH-759]
`VCenter.Refresh` [GH-714, GH-724, GH-747, GH-753, GH-756, GH-759, GH-760]
* Add NSX-T Manager management types `NsxtManagerOpenApi`, `types.NsxtManagerOpenApi` and methods
`VCDClient.CreateNsxtManagerOpenApi`, `VCDClient.GetAllNsxtManagersOpenApi`,
`VCDClient.GetNsxtManagerOpenApiById`, `VCDClient.GetNsxtManagerOpenApiByName`,
Expand Down
4 changes: 2 additions & 2 deletions govcd/vsphere_vcenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ const labelVirtualCenter = "vCenter Server"

// vCenter task is sometimes unreliable and trying to refresh it immediately after it becomes
// connected causes a "BUSY_ENTITY" error (which has a few different messages)
var maximumVcenterRetryTime = 120 * time.Second // The maximum time a single operation will be retried before giving up
var vCenterEntityBusyRegexp = regexp.MustCompile(`(is currently busy|400|BUSY_ENTITY)`) // Regexp to match entity busy error
var maximumVcenterRetryTime = 120 * time.Second // The maximum time a single operation will be retried before giving up
var vCenterEntityBusyRegexp = regexp.MustCompile(`(is currently busy|400|BUSY_ENTITY|another transaction)`) // Regexp to match entity busy error

type VCenter struct {
VSphereVCenter *types.VSphereVirtualCenter
Expand Down