Skip to content

Commit

Permalink
FMO-44: Fix systemd dependency for 'fmo-dci.service' (#68)
Browse files Browse the repository at this point in the history
Signed-off-by: Joonas Onatsu <[email protected]>
  • Loading branch information
JoonasOnatsu authored Oct 22, 2024
1 parent fa91a7c commit 6acc20a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions modules/fmo-services/dci-service/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ lib, pkgs, config, ... }:
with lib;
let
{
lib,
pkgs,
config,
...
}:
with lib; let
cfg = config.services.fmo-dci;
preload_path = ./images;
in {
Expand Down Expand Up @@ -49,7 +53,7 @@ in {
virtualisation.docker.enable = true;

systemd.services.fmo-dci = {
script = ''
script = ''
USR=$(${pkgs.gawk}/bin/gawk '{print $1}' ${cfg.pat-path} || echo "")
PAT=$(${pkgs.gawk}/bin/gawk '{print $2}' ${cfg.pat-path} || echo "")
DCPATH=$(echo ${cfg.compose-path})
Expand Down Expand Up @@ -114,11 +118,9 @@ in {
after = [
"docker.service"
"docker.socket"
# WAR: warning: fmo-dci.service is ordered after 'network-online.target'
# but doesn't depend on it
# JIRA: FMO-44 for monitoring this issue.
"network-online.target"
];
requires = ["network-online.target"];

# TODO: restart always
serviceConfig = {
Expand Down

0 comments on commit 6acc20a

Please sign in to comment.