Repository navigation
fix(orchestrator): renew OpenCHAMI tokens before use - #5498
balajikumaran-c-s wants to merge 1 commit into
Conversation
22aa133 to
324ba4d
Compare
2031e95 to
34943ea
Compare
|
The health validation and recovery handling look useful, but I have concerns about using service uptime and service restart as the mechanism for TokenSmith credential renewal. TokenSmith's service-authentication model supports refresh-token based renewal and automatic token refresh. Can we first confirm whether the current Fabrica metadata-service/boot-service implementations support or are expected to support this lifecycle? If refresh is missing in those services, this looks like an upstream OpenCHAMI/Fabrica gap, and the restart mechanism should preferably be treated as a bounded Omnia workaround rather than the long-term token renewal design. We should also avoid coupling service uptime directly to token validity where possible. |
|
Since we are using the Fabrica-based metadata-service and boot-service, can we confirm why these services require a restart to renew their TokenSmith credentials? TokenSmith's bootstrap-first service flow returns both an access token and refresh token and is designed to maintain refresh state. |
|
@VenkateswaraVatam Thank you for the feedback. I investigated the TokenSmith configuration and found that it DOES support configurable refresh token lifetimes via the --refresh-ttl flag (min 1h, max 30d, default 24h). The issue is that the OpenCHAMI RPM's tokensmith_bootstrap_token script does NOT pass --refresh-ttl , so it uses the default 24h. The services do have auto-refresh code and are actively using it, but the refresh token family itself expires after 24 hours. The proper fix is to update the OpenCHAMI RPM to pass --refresh-ttl 7d or --refresh-ttl 30d when creating bootstrap tokens. This is an upstream OpenCHAMI/Fabrica change. The timer-based restart in this PR is a temporary workaround until the upstream RPM is updated. Once the upstream fix is available, we can remove the timer from Omnia. |
34943ea to
38c1c78
Compare
|
Based on this clarification, I support merging PR #5498 as a temporary mitigation. Please document the 24-hour TokenSmith refresh-family lifetime as the root cause and link an upstream OpenCHAMI RPM issue to explicitly configure --refresh-ttl. The current behavior should be described as service re-bootstrap through restart, not token refresh. Please also define when the 18-hour timer can be removed and validate the workaround against actual refresh-family expiry. Since even a 30d TTL eventually expires, we should separately track automatic refresh-family renewal or re-bootstrap as the long-term solution. Based on the clarification, I am fine with merging PR #5498 as a temporary mitigation, with the following follow-up actions:
|
metadata-service and boot-service exchange a single-use TokenSmith bootstrap token at start for a refresh token whose family expires after 24 hours. Restart both services during OpenCHAMI deployment and once in the provision preamble so deploy-only and provision-only runs receive fresh credentials, then restart HAProxy to resolve their new container addresses. This is a bounded Omnia recovery workaround until the upstream OpenCHAMI packaging provides a durable credential lifecycle. Signed-off-by: balajikumaran-c-s <balajikumaran.cs@dell.com>
38c1c78 to
5f6a075
Compare
PR Title
fix(orchestrator): renew OpenCHAMI tokens before use
Description of the Solution
metadata-service and boot-service exchange a single-use TokenSmith bootstrap token at startup for a refresh-token family that expires after 24 hours. The services refresh access tokens at runtime, but refresh-token rotation does not extend the family's fixed expiry. This change restarts the two services whenever
deploy_openchamiruns and once in the provision preamble, so deploy-only and provision-only runs receive new bootstrap credentials. HAProxy restarts afterward to resolve their new container addresses.This is a bounded Omnia recovery workaround. It does not use service uptime as a proxy for token validity and does not introduce a permanent timer. The long-term credential lifecycle remains an upstream OpenCHAMI packaging/service concern.
Related Issue
Root Cause
ExpiresAt.ExecStartPrehelper and obtains fresh credentials.Changes
renew_service_tokens.ymlto restartmetadata-service.serviceandboot-service.service, followed byhaproxy.service.deploy_openchamirun.provision_preamble.yml, before OpenCHAMI authentication, so--tags provisionand--tags executeare covered.Files Changed
src/orchestrator/roles/deploy_openchami/tasks/renew_service_tokens.ymlsrc/orchestrator/roles/deploy_openchami/tasks/main.ymlsrc/orchestrator/playbooks/provision/provision_preamble.ymlsrc/orchestrator/roles/deploy_openchami/README.mdTesting
ansible-lint: passed with 0 failures and 0 warnings at the production profile.ansible-playbook --list-tasks --tags provisionconfirms the renewal play and include carry bothprovisionandexecutetags./metadata-service/healthand/boot-service/healthreturn HTTP 200 through HAProxy.deploy_openchami.ymlplaybook was not run.Backward Compatibility
Suggested Reviewers
@abhishek-sa1@VenkateswaraVatamdeploy_openchamibehavior and bounded workaround@sujit-jadhav