[FOLIO-1169] mod-permissions causes lockup in Ansible build Created: 29/Mar/18  Updated: 12/Nov/18  Resolved: 24/Apr/18

Status: Closed
Project: FOLIO
Components: None
Affects versions: None
Fix versions: None

Type: Bug Priority: P3
Reporter: Wayne Schneider Assignee: Kurt Nordstrom
Resolution: Duplicate Votes: 0
Labels: ci, core, sprint35, sprint36, sprint37
Remaining Estimate: Not Specified
Time Spent: 2 days, 3 hours, 30 minutes
Original estimate: Not Specified

Issue links:
Duplicate
duplicates MODPERMS-40 stackoverflow when logging in (folio/... Closed
Relates
relates to FOLIO-1170 Packer builds fail due to resource co... Closed
Sprint:

 Description   

The MODS import for mod-inventory generates lots of requests to mod-permissions in a short time, and mod-permissions seems to be thrashing to the point of being non-responsive and timing out requests.

To replicate:

  1. Get the latest folio/testing-backend vagrant box, bring it up, vagrant ssh into it
  2. Login as `diku_admin`:
    curl -w '\n' -D - -X POST -H "Content-type: application/json" -H "Accept: application/json, text/plain" -H "X-Okapi-Tenant: diku" -d '{"username":"diku_admin","password":"admin"}' http://localhost:9130/authn/login
    
  3. Post a largish MODS file to mod-inventory:
    curl -w '\n' -D - -X POST -H 'Content-type: multipart/form-data' -H 'X-Okapi-Tenant: diku' -H 'X-Okapi-Token: <token>' -F upload=@/etc/.mod-metadata-mods-large_ansible.xml http://localhost:9130/inventory/ingest/mods
    

    mod-permissions begins to chew up about 80% of CPU, with occasional lockups, and lots and lots of CQL permissions queries are logged in /var/log/folio/okapi/okapi.log.



 Comments   
Comment by Wayne Schneider [ 29/Mar/18 ]

Sample largish MODS file: https://raw.githubusercontent.com/folio-org/folio-ansible/master/roles/mod-metadata-data/files/many_mods.xml

Comment by Wayne Schneider [ 06/Apr/18 ]

This is much improved with mod-permissions-5.2.3-SNAPSHOT.20 – testing-backend and testing builds now succeed. The snapshot build is still a problem.

Comment by Wayne Schneider [ 06/Apr/18 ]

Added handler to mod-metadata-data role to wait for MODS update to complete – this works around the issues with mod-permissions and will hopefully allow the snapshot Vagrant build to complete.

Generated at Thu Feb 08 23:11:20 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.