You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
Pushkar Mulay
committed
fix(resmgr): a host being deauthorised has not gone away
resmgr answers the per-host endpoints with 404 for minutes after a host's last
role is removed, while GET /resmgr/v2/hosts keeps reporting the host, its roles
and its hostconfig_id throughout. Three reads believed that 404 and removed
resources that still existed:
pcd_host_config_assignment -> next apply: 409 HostToHostconfigConflict
pcd_host_cluster_role -> next apply: 403 HostInAuthState
pcd_host_role -> same
Worse than the failed apply, the assignment leaving state is what let a host
config be deleted as unused, which strands the host for good — the case the
delete guard now refuses outright.
So a 404 is no longer taken at face value: hostRecord falls back to the host
list, which is the only view that stays truthful through the window, and a list
that cannot be read is an error rather than an absence. Nothing leaves state on
an unverified 404. The extra request happens on the 404 path alone, so an
ordinary read still costs one call.
Waiting the window out belongs in the writes that must not race it, not in a
Read: a refresh must not block for minutes.
Also bumps the indirect google.golang.org/grpc to 1.82.1 (xDS RBAC and HTTP/2
advisories). The provider's gRPC server only serves the local Terraform CLI over
a private channel and does not use xDS, so exposure was minimal.
0 commit comments