bcgov / DITP

Digital Identity and Trust Program Repository
Apache License 2.0
0 stars 2 forks source link

[Bug] No active revocation registry for existing credential definition #62

Closed esune closed 9 months ago

esune commented 9 months ago

Existing credential definitions seem to end-up in a state where no active revocation registry is available, which causes issuance of new credentials to fail:

"error_msg": 
"Cred def id 6hChBFAutS7HvAqSHkENTL:3:CL:70263:test has no active revocation registry."

This is likely an issue in ACA-Py, but logging here for now to triage - we have observed it also in single-instance ACA-Py agents. We need to figure out how/why the agent is getting into this state. c.c.: @WadeBarnes @usingtechnology

See this comment: https://github.com/bcgov/traction/pull/790#pullrequestreview-1628189123

loneil commented 9 months ago

That case above was a new cred def actually though. And I can still do it fine on other 0.10.1 branches.

Is it intermittent? Maybe can try stuff again after 0.10.2?

WadeBarnes commented 9 months ago

This could be related to issues being fixed in 0.10.2.

esune commented 9 months ago

This could be related to issues being fixed in 0.10.2.

Wade beat me to it. @loneil I would track the issue here and assume it will be fixed with 0.10.2 - we could test using the rc/nightly image if we wanted a head start before publishing, but I think it is unrelated to @shaangill025's changes

loneil commented 9 months ago

Yeah I don't know either I'm getting really (un)lucky, or it's specific to something in the 681 (PR 790) environment because I can't repro in any other 0.10.1 environment yet.

This is happening each time I try and create a def on 790 so far https://github.com/bcgov/traction/pull/790#issuecomment-1721544641

usingtechnology commented 9 months ago

are you using the same tenant? if so, try a new tenant that has not been connected to the endorser.

loneil commented 9 months ago

are you using the same tenant? if so, try a new tenant that has not been connected to the endorser.

New tenant, steps to reproduce are

1 Create a new tenant 2 Make issuer (connect/register) for bcovrin-test, endorser Ket75eV5UQvVkW2XBjgDH7 3 Create schema 4 Create revocable cred def 5 Issue it to BC Wallet and accept

On https://pr-790-traction-tenant-ui-dev.apps.silver.devops.gov.bc.ca/ (which is 0.10.1) this errors on step 3 and step 5 (see linked above)

On a different PR also 0.10.1 these steps succeed

And on dev (also 0.10.1), with an existing Tenant it also works.

So I'm doubtful this is specific to 0.10.1 rather than a specific set of changes there, unless I'm missing something? Or did the changes in PR 790 make us susceptible to this ACA-Py bug in a way we are not anywhere else?

usingtechnology commented 9 months ago

see if you can find anything in the logs related to didexchange resolution... that's one of the bugs.

see pr 2476 / issue 2475

loneil commented 9 months ago

The error is when it's trying to upload Tails

2023-09-15 16:19:44,745 aries_cloudagent.core.event_bus ERROR Error occurred while processing event
Traceback (most recent call last):
File "/home/aries/.venv/lib/python3.9/site-packages/aries_cloudagent/core/event_bus.py", line 121, in notify
await processor()
File "/home/aries/.venv/lib/python3.9/site-packages/aries_cloudagent/revocation/routes.py", line 1581, in on_revocation_registry_endorsed_event
await registry_record.upload_tails_file(profile)
File "/home/aries/.venv/lib/python3.9/site-packages/aries_cloudagent/revocation/models/issuer_rev_reg_record.py", line 446, in upload_tails_file
(upload_success, result) = await tails_server.upload_tails_file(
File "/home/aries/.venv/lib/python3.9/site-packages/aries_cloudagent/tails/indy_tails_server.py", line 50, in upload_tails_file
pool = write_ledger[1].pool
TypeError: 'IndyVdrLedger' object is not subscriptable

does that use DID Exchange?

usingtechnology commented 9 months ago

there is a bug @shaangill025 fixed... that write_ledger[1] is the issue... it's just write_ledger.pool.

pr 2482

loneil commented 9 months ago

Ah ok, so then yeah we have to wait on 0.10.2 for the multi-ledger PR 790. Thanks.

esune commented 9 months ago

We experienced this issue again today with the BC Wallet Showcase production instance. As it turns out, part of the problem was also the fact that the tails directory was not being persisted and therefore calls executed by different pods were failing due to missing tails file in the filesystem.

esune commented 9 months ago

Moving to blocked, pending upgrades in the Traction chart and new ACA-Py image

esune commented 9 months ago

@WadeBarnes do you think we can close this, given what we discovered and fixed (bug in aca-py, missing tails persistence)?

WadeBarnes commented 9 months ago

Yes