[FOLIO-2884] Change deployment order for mod-circulation-storage Created: 19/Nov/20  Updated: 19/Nov/20  Resolved: 19/Nov/20

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

Type: Task Priority: P2
Reporter: Siarhei Charniak Assignee: Wayne Schneider
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original estimate: Not Specified

Issue links:
Relates
relates to CIRCSTORE-247 Request log actions: Pickup expired, ... Closed
Sprint: DevOps: Sprint 102
Development Team: FOLIO DevOps

 Description   

Overview:

CIRCSTORE-247 Closed introduced a dependency on mod-pubsub for mod-circulation-storage module and should be deployed after it.

This caused the folio-testing-backend build to fail this morning, with the following error

failed: [10.36.1.24] (item=[46, {'id': 'mod-audit-1.1.0-SNAPSHOT.73', 'name': 'Audit Module', 'requires': [{'id': 'pubsub-event-types', 'version': '0.1'}, {'id': 'pubsub-publishers', 'version': '0.1'}, {'id': 'pubsub-subscribers', 'version': '0.1'}, {'id': 'pubsub-publish', 'version': '0.1'}, {'id': 'users', 'version': '15.2'}, {'id': 'template-engine', 'version': '2.2'}, {'id': 'inventory', 'version': '10.7'}, {'id': 'holdings-storage', 'version': '4.4'}, {'id': 'cancellation-reason-storage', 'version': '1.1'}], 'provides': [{'id': 'audit', 'version': '1.1', 'handlers': [{'methods': ['GET'], 'pathPattern': '/audit-data', 'permissionsRequired': ['audit.collection.get']}, {'methods': ['POST'], 'pathPattern': '/audit-data', 'permissionsRequired': ['audit.item.post']}, {'methods': ['GET'], 'pathPattern': '/audit-data/{id}', 'permissionsRequired': ['audit.item.get']}, {'methods': ['PUT'], 'pathPattern': '/audit-data/{id}', 'permissionsRequired': ['audit.item.put']}, {'methods': ['DELETE'], 'pathPattern': '/audit-data/{id}', 'permissionsRequired': ['audit.item.delete']}]}, {'id': 'circulation-logs', 'version': '1.1', 'handlers': [{'methods': ['GET'], 'pathPattern': '/audit-data/circulation/logs', 'permissionsRequired': ['circulation-logs.collection.get']}]}, {'id': 'audit-data-event-handlers', 'version': '1.1', 'handlers': [{'methods': ['POST'], 'pathPattern': '/audit/handlers/log-record', 'permissionsRequired': ['audit-data.events.post'], 'modulePermissions': ['users.item.get', 'users.collection.get', 'templates.item.get', 'inventory.items.item.get', 'inventory-storage.holdings.item.get', 'circulation-storage.cancellation-reasons.collection.get']}]}, {'id': '_tenant', 'version': '1.2', 'interfaceType': 'system', 'handlers': [{'methods': ['POST'], 'pathPattern': '/_/tenant', 'modulePermissions': ['pubsub.event-types.post', 'pubsub.publishers.post', 'pubsub.subscribers.post']}, {'methods': ['DELETE'], 'pathPattern': '/_/tenant'}]}], 'permissionSets': [{'permissionName': 'audit.collection.get', 'displayName': 'Audit - get audit records', 'description': 'Get audit records'}, {'permissionName': 'audit.item.get', 'displayName': 'Audit - get specific audit record', 'description': 'Get specific audit record'}, {'permissionName': 'audit.item.post', 'displayName': 'Audit - create a new audit record', 'description': 'Create a new audit record'}, {'permissionName': 'audit.item.put', 'displayName': 'Audit - update specific audit record', 'description': 'Update specific audit record'}, {'permissionName': 'audit.item.delete', 'displayName': 'Audit - delete specific audit record', 'description': 'Delete specific audit record'}, {'permissionName': 'circulation-logs.collection.get', 'displayName': 'Circulation audit logs - get circulation log records', 'description': 'Get circulation audit logs records'}, {'permissionName': 'audit.all', 'displayName': 'Audit - all permissions', 'description': 'Audit - all permissions', 'subPermissions': ['audit.collection.get', 'audit.item.get', 'audit.item.post', 'audit.item.put', 'audit.item.delete', 'circulation-logs.collection.get']}], 'launchDescriptor': {'dockerImage': 'folioci/mod-audit:1.1.0-SNAPSHOT.73', 'dockerPull': True, 'env': [{'name': 'JAVA_OPTIONS', 'value': '-XX:MaxRAMPercentage=66.0'}, {'name': 'DB_HOST', 'value': 'postgres'}, {'name': 'DB_PORT', 'value': '5432'}, {'name': 'DB_USERNAME', 'value': 'folio_admin'}, {'name': 'DB_PASSWORD', 'value': 'folio_admin'}, {'name': 'DB_DATABASE', 'value': 'okapi_modules'}, {'name': 'DB_QUERYTIMEOUT', 'value': '60000'}, {'name': 'DB_CHARSET', 'value': 'UTF-8'}, {'name': 'DB_MAXPOOLSIZE', 'value': '5'}], 'dockerArgs': {'HostConfig': {'Memory': 715827883, 'PortBindings': {'8081/tcp': [{'HostPort': '%p'}]}}}}}]) => {"ansible_loop_var": "item", "changed": false, "connection": "close", "content": "Missing dependency: mod-audit-1.1.0-SNAPSHOT.73 requires template-engine: 2.2. Missing dependency: mod-audit-1.1.0-SNAPSHOT.73 requires inventory: 10.7. Missing dependency: mod-audit-1.1.0-SNAPSHOT.73 requires cancellation-reason-storage: 1.1", "content_length": "242", "content_type": "text/plain", "elapsed": 0, "item": [46, {"id": "mod-audit-1.1.0-SNAPSHOT.73", "launchDescriptor": {"dockerArgs": {"HostConfig": {"Memory": 715827883, "PortBindings": {"8081/tcp": [{"HostPort": "%p"}]}}}, "dockerImage": "folioci/mod-audit:1.1.0-SNAPSHOT.73", "dockerPull": true, "env": [{"name": "JAVA_OPTIONS", "value": "-XX:MaxRAMPercentage=66.0"}, {"name": "DB_HOST", "value": "postgres"}, {"name": "DB_PORT", "value": "5432"}, {"name": "DB_USERNAME", "value": "folio_admin"}, {"name": "DB_PASSWORD", "value": "folio_admin"}, {"name": "DB_DATABASE", "value": "okapi_modules"}, {"name": "DB_QUERYTIMEOUT", "value": "60000"}, {"name": "DB_CHARSET", "value": "UTF-8"}, {"name": "DB_MAXPOOLSIZE", "value": "5"}]}, "name": "Audit Module", "permissionSets": [{"description": "Get audit records", "displayName": "Audit - get audit records", "permissionName": "audit.collection.get"}, {"description": "Get specific audit record", "displayName": "Audit - get specific audit record", "permissionName": "audit.item.get"}, {"description": "Create a new audit record", "displayName": "Audit - create a new audit record", "permissionName": "audit.item.post"}, {"description": "Update specific audit record", "displayName": "Audit - update specific audit record", "permissionName": "audit.item.put"}, {"description": "Delete specific audit record", "displayName": "Audit - delete specific audit record", "permissionName": "audit.item.delete"}, {"description": "Get circulation audit logs records", "displayName": "Circulation audit logs - get circulation log records", "permissionName": "circulation-logs.collection.get"}, {"description": "Audit - all permissions", "displayName": "Audit - all permissions", "permissionName": "audit.all", "subPermissions": ["audit.collection.get", "audit.item.get", "audit.item.post", "audit.item.put", "audit.item.delete", "circulation-logs.collection.get"]}], "provides": [{"handlers": [{"methods": ["GET"], "pathPattern": "/audit-data", "permissionsRequired": ["audit.collection.get"]}, {"methods": ["POST"], "pathPattern": "/audit-data", "permissionsRequired": ["audit.item.post"]}, {"methods": ["GET"], "pathPattern": "/audit-data/{id}", "permissionsRequired": ["audit.item.get"]}, {"methods": ["PUT"], "pathPattern": "/audit-data/{id}", "permissionsRequired": ["audit.item.put"]}, {"methods": ["DELETE"], "pathPattern": "/audit-data/{id}", "permissionsRequired": ["audit.item.delete"]}], "id": "audit", "version": "1.1"}, {"handlers": [{"methods": ["GET"], "pathPattern": "/audit-data/circulation/logs", "permissionsRequired": ["circulation-logs.collection.get"]}], "id": "circulation-logs", "version": "1.1"}, {"handlers": [{"methods": ["POST"], "modulePermissions": ["users.item.get", "users.collection.get", "templates.item.get", "inventory.items.item.get", "inventory-storage.holdings.item.get", "circulation-storage.cancellation-reasons.collection.get"], "pathPattern": "/audit/handlers/log-record", "permissionsRequired": ["audit-data.events.post"]}], "id": "audit-data-event-handlers", "version": "1.1"}, {"handlers": [{"methods": ["POST"], "modulePermissions": ["pubsub.event-types.post", "pubsub.publishers.post", "pubsub.subscribers.post"], "pathPattern": "/_/tenant"}, {"methods": ["DELETE"], "pathPattern": "/_/tenant"}], "id": "_tenant", "interfaceType": "system", "version": "1.2"}], "requires": [{"id": "pubsub-event-types", "version": "0.1"}, {"id": "pubsub-publishers", "version": "0.1"}, {"id": "pubsub-subscribers", "version": "0.1"}, {"id": "pubsub-publish", "version": "0.1"}, {"id": "users", "version": "15.2"}, {"id": "template-engine", "version": "2.2"}, {"id": "inventory", "version": "10.7"}, {"id": "holdings-storage", "version": "4.4"}, {"id": "cancellation-reason-storage", "version": "1.1"}]}], "msg": "Status code was 400 and not [201]: HTTP Error 400: Bad Request", "redirected": false, "status": 400, "url": "http://10.36.1.24:9130/_/proxy/modules", "vary": "origin"}


 Comments   
Comment by Marc Johnson [ 19/Nov/20 ]

The failure reported appears to be during module registration rather than when it is enabled for a tenant, which is when I expect dependency issues to arise.

Why does module registration fail? Is it because the descriptor for mod-pubsub has not been registered before mod-circulation-storage and dependencies cannot be registered for interfaces that Okapi is unaware of?

Comment by Marc Johnson [ 19/Nov/20 ]

David Crossley Wayne Schneider

Given CIRCSTORE-247 Closed is being back-ported to the 2020 Q3 release, do the single server deployment instructions also need to change?

Comment by David Crossley [ 19/Nov/20 ]

Marc Johnson The folio-install procedure uses Okapi to deploy and enable modules, so should be okay.

Comment by Wayne Schneider [ 19/Nov/20 ]

We needed to adjust both mod-pubsub and mod-login to get the order correct.

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