fsm: restore the legacy commands

and emit a helpful error message.
pull/10986/head
Daniel Nephin 3 years ago
parent fa4b33ab8f
commit eb991c18c2

@ -267,6 +267,9 @@ func (c *FSM) applyACLOperation(buf []byte, index uint64) interface{} {
return req.ACL.ID return req.ACL.ID
case structs.ACLDelete: case structs.ACLDelete:
return c.state.ACLTokenDeleteBySecret(index, req.ACL.ID, nil) return c.state.ACLTokenDeleteBySecret(index, req.ACL.ID, nil)
// Legacy commands that have been removed
case "bootstrap-now", "force-set":
return fmt.Errorf("command %v has been removed with the legacy ACL system", req.Op)
default: default:
c.logger.Warn("Invalid ACL operation", "operation", req.Op) c.logger.Warn("Invalid ACL operation", "operation", req.Op)
return fmt.Errorf("Invalid ACL operation '%s'", req.Op) return fmt.Errorf("Invalid ACL operation '%s'", req.Op)

Loading…
Cancel
Save