Hydra migration error
init.stackspin.net is using the init-deployment
branch, which contains the latest hydra upgrade.
For reference, I fixed the hydra crashloop (stackspin#1036 (closed)),
and hydra+kratos were running fine, but after a while the hydra pod becomes unready again:
time=2021-11-17T13:26:57Z level=warning msg=Instance is not yet ready because migrations have not yet been fully applied. audience=application error=map\[message:migrations have not yet been fully applied: \[{State:Pending Version:20190100000001000000 Name:client} {State:Applied Version:20190100000002000000 Name:client} {State:Pending Version:20190100000003000000 Name:client} {State:Applied Version:20190100000004000000 Name:client} {State:Pending Version:20190100000005000000 Name:client} {State:Applied Version:20190100000006000000 Name:client} {State:Pending Version:20190100000007000000 Name:client} {State:Applied Version:20190100000008000000 Name:client} {State:Pending
...
A manual hydra migrate sql
doesn't help:
~ $ hydra migrate sql -e
INFO[2021-11-17T14:26:38Z] No tracer configured - skipping tracing setup audience=application service_name=ORY Hydra service_version=v1.10.5
INFO[2021-11-17T14:26:38Z] Hydra is running migrations on every startup as DSN is memory. audience=application service_name=ORY Hydra service_version=v1.10.5
INFO[2021-11-17T14:26:38Z] This means your data is lost when Hydra terminates. audience=application service_name=ORY Hydra service_version=v1.10.5
The following migration is planned:
Version Name Status
20190100000001000000 client Applied
20190100000002000000 client Applied
20190100000003000000 client Applied
20190100000004000000 client Applied
20190100000005000000 client Applied
20190100000006000000 client Applied
20190100000007000000 client Applied
20190100000008000000 client Applied
20190100000009000000 client Applied
20190100000010000000 client Applied
20190100000011000000 client Applied
20190100000012000000 client Applied
20190100000013000000 client Applied
20190100000014000000 client Applied
20190200000001000000 jwk Applied
20190200000002000000 jwk Applied
20190200000003000000 jwk Applied
20190200000004000000 jwk Applied
20190300000001000000 consent Applied
20190300000002000000 consent Applied
20190300000003000000 consent Applied
20190300000004000000 consent Applied
20190300000005000000 consent Applied
20190300000006000000 consent Applied
20190300000007000000 consent Applied
20190300000008000000 consent Applied
20190300000009000000 consent Applied
20190300000010000000 consent Applied
20190300000011000000 consent Applied
20190300000012000000 consent Applied
20190300000013000000 consent Applied
20190300000014000000 consent Applied
20190400000001000000 oauth2 Applied
20190400000002000000 oauth2 Applied
20190400000003000000 oauth2 Applied
20190400000004000000 oauth2 Applied
20190400000005000000 oauth2 Applied
20190400000006000000 oauth2 Applied
20190400000007000000 oauth2 Applied
20190400000008000000 oauth2 Applied
20190400000009000000 oauth2 Applied
20190400000010000000 oauth2 Applied
20190400000011000000 oauth2 Applied
20200521071434000000 consent Applied
20200527215731000000 client Applied
20200527215732000000 client Applied
20200819163013000000 add_client_id_subject_idx_to_access_and_refresh Applied
20200913192340000000 initial_sqlite Applied
20201110104000000000 drop_uq_oauth2 Applied
20201116133000000000 set_null_time Applied
To skip the next question use flag --yes (at your own risk).
Do you wish to execute this migration plan? [y/n]: y
Successfully applied migrations!