metropolis: renamed DISOWNED to DECOMMISSIONED
This seems like a better name, and the old one was never actually used
anywhere.
Change-Id: I66b17a9145225828bb978c999bbecd5118188389
Reviewed-on: https://review.monogon.dev/c/monogon/+/2269
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/node/core/curator/impl_leader_curator.go b/metropolis/node/core/curator/impl_leader_curator.go
index 0124ab0..d4e9e29 100644
--- a/metropolis/node/core/curator/impl_leader_curator.go
+++ b/metropolis/node/core/curator/impl_leader_curator.go
@@ -429,10 +429,10 @@
switch node.state {
case cpb.NodeState_NODE_STATE_NEW:
return nil, status.Error(codes.PermissionDenied, "node is NEW, wait for attestation/approval")
- case cpb.NodeState_NODE_STATE_DISOWNED:
- // This node has been since disowned by the cluster for some reason, the
+ case cpb.NodeState_NODE_STATE_DECOMMISSIONED:
+ // This node has been since decommissioned by the cluster for some reason, the
// register flow should be aborted.
- return nil, status.Error(codes.FailedPrecondition, "node is DISOWNED, abort register flow")
+ return nil, status.Error(codes.FailedPrecondition, "node is DECOMMISSIONED, abort register flow")
case cpb.NodeState_NODE_STATE_UP:
// This can happen due to a network failure when we already handled a
// CommitNode, but we weren't able to respond to the user. CommitNode is
diff --git a/metropolis/proto/common/common.proto b/metropolis/proto/common/common.proto
index 28becd3..d2b307e 100644
--- a/metropolis/proto/common/common.proto
+++ b/metropolis/proto/common/common.proto
@@ -85,9 +85,11 @@
// The node is now ready to serve, and its certificate can be used to
// authenticate its identity cryptographically.
NODE_STATE_UP = 3;
- // DISOWNED: the node has been rejected or decommissioned by the cluster.
- // Any further contact from the node to the cluster will be rejected.
- NODE_STATE_DISOWNED = 4;
+ // DECOMMISSIONED: The node has successfully been decommissioned and can be
+ // deleted.
+ //
+ // TODO(q3k): add missing -ING states.
+ NODE_STATE_DECOMMISSIONED = 4;
};
// ClusterState is the state of the cluster from the point of view of a node.