Check container state after start

ExecStartPre steps:
  1) Create container if not exists.
  2) Start it.
  3) Make necessary checks with dockerctl.

ExecStart - attach to container for sure that
container isn't go to failed state.

Change-Id: I8fc495513c7d7c8e07c0d0eff4a671b924a9cb50
Related-Bug: #1526787
This commit is contained in:
Ivan Suzdal 2016-01-28 18:15:42 +03:00
parent 2e2ce2f328
commit 7e887be354
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,9 @@ RestartSec=10
StartLimitBurst=5
StartLimitInterval=60
ExecStartPre=/usr/bin/dockerctl create <%= @title %>
ExecStart=/usr/bin/docker start -a fuel-core-<%= @release %>-<%= @title %>
ExecStartPre=/usr/bin/docker start fuel-core-<%= @release %>-<%= @title %>
ExecStartPre=/usr/bin/dockerctl check <%= @title %>
ExecStart=/usr/bin/docker attach --no-stdin=true fuel-core-<%= @release %>-<%= @title %>
ExecStop=/usr/bin/docker stop -t <%= @timeout %> fuel-core-<%= @release %>-<%= @title %>
[Install]