Kaynağa Gözat

Fix loopback service status

Currently when Salt starts setup-loopback-device service
systemd executes losetup command and even if it worked
successfully, systemd marks service as inactive(dead).
And Salt considers service as dead. In order to fix
this behavior, we need to add RemainAfterExit=true to
loopback systemd unit template.

Other changes:
.gitreview added

Related Prod: https://mirantis.jira.com/browse/PROD-11760

Change-Id: I6d0c3baf1c22d0a626ff1fd6aaab802c08fb029e
pull/110/head
Mykyta Karpin 7 yıl önce
ebeveyn
işleme
40edd5837f
2 değiştirilmiş dosya ile 7 ekleme ve 0 silme
  1. +5
    -0
      .gitreview
  2. +2
    -0
      linux/files/setup-loopback-device.systemd

+ 5
- 0
.gitreview Dosyayı Görüntüle

@@ -0,0 +1,5 @@
[gerrit]
host=gerrit.mcp.mirantis.net
port=29418
project=salt-formulas/linux


+ 2
- 0
linux/files/setup-loopback-device.systemd Dosyayı Görüntüle

@@ -8,6 +8,8 @@ Wants=systemd-udev-settle.service
[Service]
{# The command is prefixed with '-' to consider it a success if the loopback device is already setup #}
ExecStart=-/sbin/losetup {{ device_name }} {{ file }}
{# In order to Salt can recognize oneshot service as running, we need it to remain active after it exited #}
RemainAfterExit=true
Type=oneshot

[Install]

Yükleniyor…
İptal
Kaydet