Skip to content

Commit 526ee41

Browse files
committed
ISSUE 476: Adds STARTUP_TIME variable for the logs-delayed Makefile target.
1 parent f394cd4 commit 526ee41

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Summary of release changes for Version 2 - CentOS-7
1010
- Replaces deprecated Dockerfile `MAINTAINER` with a `LABEL`.
1111
- Adds a `src` directory for the image root files.
1212
- Adds wrapper functions to functional test cases.
13+
- Adds `STARTUP_TIME` variable for the `logs-delayed` Makefile target.
1314

1415
### 2.2.1 - 2017-02-21
1516

Makefile

+6-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Targets:
2626
DOCKER_IMAGE_TAG variable.
2727
logs Display log output from the running container.
2828
logs-delayed Display log output from the running container after
29-
backing off shortly. This can be necessary when
30-
chaining make targets together.
29+
backing off for STARTUP_TIME seconds. This can be
30+
necessary when chaining make targets together.
3131
pause Pause the running container.
3232
pull Pull the release image from the registry. Requires
3333
the DOCKER_IMAGE_TAG variable.
@@ -61,6 +61,9 @@ Variables:
6161
artifacts are placed.
6262
- NO_CACHE When true, no cache will be used while running the
6363
build target.
64+
- STARTUP_TIME Defines the number of seconds expected to complete
65+
the startup process, including the bootstrap where
66+
applicable.
6467

6568
endef
6669

@@ -357,7 +360,7 @@ logs: _prerequisites
357360
@ $(docker) logs $(DOCKER_NAME)
358361

359362
logs-delayed: _prerequisites
360-
@ sleep 2
363+
@ sleep $(STARTUP_TIME)
361364
@ $(MAKE) logs
362365

363366
load: _prerequisites _require-docker-release-tag _require-package-path

environment.mk

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ NO_CACHE ?= false
2626
# Directory path for release packages
2727
DIST_PATH ?= ./dist
2828

29+
# Number of seconds expected to complete container startup including bootstrap.
30+
STARTUP_TIME ?= 2
31+
2932
# ------------------------------------------------------------------------------
3033
# Application container configuration
3134
# ------------------------------------------------------------------------------

src/opt/scmi/environment.sh

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ REGISTER_ETCD_PARAMETERS="${REGISTER_ETCD_PARAMETERS:-}"
3030
REGISTER_TTL="${REGISTER_TTL:-60}"
3131
REGISTER_UPDATE_INTERVAL="${REGISTER_UPDATE_INTERVAL:-55}"
3232

33+
# Number of seconds expected to complete container startup including bootstrap.
34+
STARTUP_TIME="${STARTUP_TIME:-2}"
35+
3336
# Application container configuration
3437
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:-}"
3538
SSH_AUTOSTART_SSHD="${SSH_AUTOSTART_SSHD:-true}"

0 commit comments

Comments
 (0)