Skip to content

Commit

Permalink
additional approved states for agent auto-reactivate upon verifier re…
Browse files Browse the repository at this point in the history
…start

Signed-off-by: Apoorve Mohan <[email protected]>
  • Loading branch information
Apoorve Mohan authored and mpeters committed Feb 1, 2021
1 parent 2b217e9 commit 4442806
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion keylime/cloud_verifier_tornado.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def main():
try:
query_all = session.query(VerfierMain).all()
for row in query_all:
if row.operational_state == states.GET_QUOTE:
if row.operational_state in states.APPROVED_REACTIVATE_STATES:
row.operational_state = states.START
session.commit()
except SQLAlchemyError as e:
Expand Down
1 change: 1 addition & 0 deletions keylime/common/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
PROVIDE_V, PROVIDE_V_RETRY, FAILED, TERMINATED, INVALID_QUOTE,
TENANT_FAILED)

APPROVED_REACTIVATE_STATES = [START, GET_QUOTE, GET_QUOTE_RETRY, PROVIDE_V, PROVIDE_V_RETRY]

STATE_REPRESENTATIONS = {
REGISTERED: "Registered",
Expand Down

0 comments on commit 4442806

Please sign in to comment.