[FOLIO-2282] testing/snapshot-core builds fail Created: 25/Sep/19  Updated: 03/Jun/20  Resolved: 01/Oct/19

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

Type: Task Priority: P2
Reporter: Ian Hardy Assignee: Ian Hardy
Resolution: Done Votes: 0
Labels: ci, devops, platform-backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Sprint: CP: sprint 73
Story Points: 3
Development Team: Core: Platform

 Description   

Both snapshot-core/snapshot-test builds are failing. Apprears to have something to do with email modules/config.

snapshot-core fails on tenant init for mod-sender:

TASK [folio-ansible/roles/okapi-tenant-deploy : Post install list for deployment and enabling] ***
fatal: [10.36.1.154]: FAILED! => {"changed": false, "connection": "close", "content": "POST request for mod-sender-1.2.0-SNAPSHOT.11 /_/tenant failed with Connection refused: /10.36.1.154:9147", "content_length": "105", "content_type": "text/plain", "msg": "Status code was 500 and not [200]: HTTP Error 500: Internal Server Error", "redirected": false, "status": 500, "url": "http://10.36.1.154:9130/_/proxy/tenants/diku/install?deploy=true&tenantParameters=loadReference%3Dtrue%2CloadSample%3Dtrue"}
	to retry, use: --limit @/home/jenkins/workspace/Automation/folio-snapshot-core/folio-infrastructure/CI/ansible/folio-snapshot.retry

and testing-core fails to post email configs to mod-configuration:

TASK [folio-ansible/roles/post-config-entries : Set Okapi token] ***************
ok: [10.36.1.182]

TASK [folio-ansible/roles/post-config-entries : post mod-email configuration] ***
failed: [10.36.1.182] (item=email_from.json.j2) => {"changed": false, "connection": "close", "content": "Access requires permission: configuration.entries.item.post", "content_type": "text/plain", "item": "email_from.json.j2", "msg": "Status code was 403 and not [201, 422]: HTTP Error 403: Forbidden", "redirected": false, "status": 403, "transfer_encoding": "chunked", "url": "http://localhost:9130/configurations/entries", "x_okapi_module_tokens": "{\"_\":\"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6ImRkZGZkZDdiLTcyM2YtNWNmNy1iYWRhLTRiMDJmYmQ2MWQ1OCIsImlhdCI6MTU2OTM3NTg1MCwidGVuYW50IjoiZGlrdSJ9.FuOvRzbDDE5nBRTTgSkmYR5Gnpu_l2DxOHXdQ67jn0Y\"}", "x_okapi_trace": "POST mod-authtoken-2.3.0-SNAPSHOT.56 http://10.36.1.182:9132/configurations/entries : 403 4594us"}


 Comments   
Comment by Ian Hardy [ 25/Sep/19 ]

mod-sender on snapshot-core is OOMkilled.

Comment by Ian Hardy [ 27/Sep/19 ]

Gave mod-sender more headroom, still getting failures on testing-core-backend and release core. Shelling in, I'm able to get the diku_admin token and post the config entries where this is failing. Since things were working after the build had failed tried adding a 10 second timeout. This didn't resolve things either. Needs further investigation.

Comment by Ian Hardy [ 27/Sep/19 ]

I think we can eliminate any issues w/mod-email or sender. Can post configurations and even random arbitrary config entries whether or not those modules exist.

Comment by John Malconian [ 01/Oct/19 ]

Setting the header, 'Authtoken-Refresh-Cache: true', when posting to the configurations/entries endpoint resolves this issue. The reason why it was not needed in the non-core builds is that it is set in a role (ebsco-rmapi-config) prior to when post-config-entries is invoked and that role is skipped on core builds. And the reason it wasn't needed on the folio-snapshot-core build is because there is a legacy role that is invoked there before post-config-entries where it is also set. I removed that legacy role as well - which was to manually load sample data for the mod-finance-storage module.

Comment by Ian Hardy [ 01/Oct/19 ]

Thanks John! So takeaway for me then is when the token is issued before permission are granted the Cache must be refreshed.

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