Skip to content

Commit

Permalink
fix: systemd clean + increase timeout when waiting for cert generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuthor committed Jan 28, 2025
1 parent 11dd781 commit 70c6b71
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ on:
name: Pull request

jobs:
cleanup: # we remove the Github cache to avoid any conflict
name: Clean Github cache
uses: Cosmian/reusable_workflows/.github/workflows/cleanup_cache.yml@main
secrets: inherit

build-cosmian-vm-binaries:
needs: cleanup
name: Build binaries
uses: ./.github/workflows/build_all.yml

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Cosmian AI Runner
Requires=multi-user.target
After=multi-user.target mount_luks.service cosmian_vm_agent.service
Requires=multi-user.target cosmian_vm_agent.service
After=multi-user.target cosmian_vm_agent.service

[Service]
Type=simple
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/check_app/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
ansible.builtin.wait_for:
path: /var/lib/cosmian_vm/data/cert.pem
state: present
timeout: 600 # default is 300

- name: Check if port 5555 is listening
ansible.builtin.wait_for:
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/check_cosmian_vm/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
ansible.builtin.wait_for:
path: /var/lib/cosmian_vm/data/cert.pem
state: present
timeout: 600 # default is 300

- name: Display Cosmian VM Agent version
ansible.builtin.debug:
Expand Down Expand Up @@ -203,6 +204,7 @@
ansible.builtin.wait_for:
path: /var/lib/cosmian_vm/data/cert.pem
state: present
timeout: 600 # default is 300

- name: Check if port 5555 is listening
ansible.builtin.wait_for:
Expand Down
2 changes: 1 addition & 1 deletion pkg/cosmian_vm_agent.service
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Unit]
Description=Cosmian VM Agent
Requires=multi-user.target
After=multi-user.target mount_luks.service dev-tpm0.device
After=multi-user.target mount_luks.service

[Service]
Type=simple
Expand Down
2 changes: 1 addition & 1 deletion pkg/mount_luks.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Requires=multi-user.target
After=multi-user.target

[Service]
Type=oneshot
Type=exec
ExecStart=/bin/bash /root/mount_luks.sh
Restart=on-failure
RestartSec=10s
Expand Down

0 comments on commit 70c6b71

Please sign in to comment.