Skip to content

Commit

Permalink
Fixing token updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Soufiane Jounaid committed Dec 21, 2023
1 parent 59e1f54 commit 9efe323
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doni/driver/worker/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ def process(
LOG.info(f"Missing Token for device '{hardware.name}'. Issuing token.")
new_token = generate_k8s_bootstrap_token()

hardware.properties["k8s_bootstrap_token"] = new_token
hardware.properties.update({'k8s_bootstrap_token': new_token})
LOG.info(f"New hardware properties before save'{hardware.properties}'.")
hardware.save()

LOG.info(f"New hardware properties '{hardware.properties}'.")
LOG.info(f"New hardware properties after save'{hardware.properties}'.")

payload["issued new token"] = new_token

Expand Down

0 comments on commit 9efe323

Please sign in to comment.