fsm: restore the legacy commands

and emit a helpful error message.
This commit is contained in:
Daniel Nephin 2021-09-21 18:02:37 -04:00
parent 0180dd67ff
commit ab91d254a3
1 changed files with 3 additions and 0 deletions

View File

@ -267,6 +267,9 @@ func (c *FSM) applyACLOperation(buf []byte, index uint64) interface{} {
return req.ACL.ID
case structs.ACLDelete:
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:
c.logger.Warn("Invalid ACL operation", "operation", req.Op)
return fmt.Errorf("Invalid ACL operation '%s'", req.Op)