Skip to content

Conversation

@arm4b
Copy link
Member

@arm4b arm4b commented Feb 5, 2019

Closes #36

Implements https://docs.stackstorm.com/authentication.html#api-key-migration mechanism to import previously exported list of ST2 API keys that's needed for reproducible deployments.

@arm4b
Copy link
Member Author

arm4b commented Feb 5, 2019

The feature in K8s/HA is ready, however it's blocked by ST2 regression when st2 apikey load doesn't work in an idempotent way and can't import API keys if they already exist:

ERROR: 409 Client Error: Conflict
MESSAGE: Tried to save duplicate unique keys (E11000 duplicate key error collection: st2.api_key_d_b index: key_hash_1 dup key: { : "56928c2d9637ce44338e9564d4b939df8b258 ...." }) for url: http://127.0.0.1:9101/v1/apikeys

Similar bug was fixed before, but it reappeared for some new reason.
I'm working on fixing it in ST2 core next.

Copy link
Contributor

@warrenvw warrenvw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but left a comment.

There's also a #TODO on L31 templates/jobs.yaml. You going to address that in this PR, or later?

volumeMounts:
- name: st2client-config-vol
mountPath: /root/.st2/
# `st2 login` doesn't exit on failure correctly, use old methods instead. See bug: https://github.com/StackStorm/st2/issues/4338
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently st2 login now exits properly on failure. StackStorm/st2#4338 was closed by StackStorm/st2#4390.

@arm4b
Copy link
Member Author

arm4b commented Feb 14, 2019

Can now confirm the fixed behavior and working Helm values functionality after getting new Docker images based on latest st2 with StackStorm/st2#4542

@arm4b arm4b removed the WIP label Feb 14, 2019
@arm4b arm4b merged commit aa7fa4c into master Feb 14, 2019
@arm4b arm4b deleted the feature/st2apikey-load branch February 14, 2019 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants