MCPcopy Create free account
hub / github.com/cloudbase/garm / ForceUpdateInstance

Method ForceUpdateInstance

database/common/store.go:107–107  ·  view source on GitHub ↗

ForceUpdateInstance functions identically to UpdateInstance with one important distinction. It does not validate the agent ID or instance status or runner status transitions. This function must only be used in recovery scenarios, where GARM crashed or was restarted while runners were going through a

(ctx context.Context, instanceName string, param params.UpdateInstanceParams)

Source from the content-addressed store, hash-verified

105 // If GARM is just starting up and we see one in "creating", it means that the process that was creating it
106 // was most likely interrupted before it finished and we must clean it up.
107 ForceUpdateInstance(ctx context.Context, instanceName string, param params.UpdateInstanceParams) (params.Instance, error)
108
109 // Probably a bad idea without some king of filter or at least pagination
110 //

Callers 5

setInstanceStatusMethod · 0.65
StartMethod · 0.65
SetInstanceStatusMethod · 0.65

Implementers 3

sqlDatabasedatabase/sql/sql.go
Storedatabase/common/mocks/Store.go
Store_Expecterdatabase/common/mocks/Store.go

Calls

no outgoing calls

Tested by

no test coverage detected