[FOLIO-2907] Okapi service doesn't start on boot in Vagrant VMs Created: 10/Dec/20  Updated: 11/Dec/20  Resolved: 11/Dec/20

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

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

Issue links:
Blocks
is blocked by OKAPI-966 Okapi systemd service fails to start ... Closed
Sprint: DevOps: Sprint 103
Development Team: FOLIO DevOps

 Description   

Yauheni Kuzmianok reports:

Hi guys looks like last testing-backend vagrant box doesn’t work

Andrei Makaranka adds:

Run vagrant box "5.0.0-20201209.5451" and see only 4 containers



 Comments   
Comment by Wayne Schneider [ 10/Dec/20 ]

Okapi service doesn't start on boot, for some reason.

Comment by Wayne Schneider [ 10/Dec/20 ]

From the syslog:

Dec 10 16:20:26 vagrant systemd[1]: docker.service: Found ordering cycle on okapi.service/stop
Dec 10 16:20:26 vagrant systemd[1]: docker.service: Job okapi.service/stop deleted to break ordering cycle starting with docker.service/stop
Dec 10 16:26:38 vagrant kernel: [   35.548047] systemd[1]: multi-user.target: Found ordering cycle on okapi.service/start
Dec 10 16:26:38 vagrant kernel: [   35.548055] systemd[1]: multi-user.target: Job okapi.service/start deleted to break ordering cycle starting with multi-user.target/start
Comment by Wayne Schneider [ 10/Dec/20 ]

The issue seems to be that the okapi.service wants to start before multi-user.target and after docker.service, but docker.service specifies:

After=network-online.target firewalld.service containerd.service multi-user.target

This appears to be a change in the docker-ce Debian package between v19 and v20.

It seems that adding multi-user.target to the After key of okapi.service resolves the issue. Opened OKAPI-966 Closed for that update.

Comment by Wayne Schneider [ 10/Dec/20 ]

Until OKAPI-966 Closed is resolved and a new Okapi package is released, the workaround for Vagrant VM users is to log into the VM and issue the command sudo systemctl start okapi. This will start up Okapi without a problem (because multi-user.target is obviously complete after the system is booted).

Comment by Wayne Schneider [ 11/Dec/20 ]

With release of Okapi v4.5.1, this is resolved. A test build of snapshot-backend core was successful. Future builds will include this update.

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