Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
ISSUE 476: Adds STARTUP_TIME variable for the logs-delayed Makefile t…
Browse files Browse the repository at this point in the history
…arget.
  • Loading branch information
jdeathe committed May 23, 2017
1 parent f394cd4 commit 526ee41
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Summary of release changes for Version 2 - CentOS-7
- Replaces deprecated Dockerfile `MAINTAINER` with a `LABEL`.
- Adds a `src` directory for the image root files.
- Adds wrapper functions to functional test cases.
- Adds `STARTUP_TIME` variable for the `logs-delayed` Makefile target.

### 2.2.1 - 2017-02-21

Expand Down
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Targets:
DOCKER_IMAGE_TAG variable.
logs Display log output from the running container.
logs-delayed Display log output from the running container after
backing off shortly. This can be necessary when
chaining make targets together.
backing off for STARTUP_TIME seconds. This can be
necessary when chaining make targets together.
pause Pause the running container.
pull Pull the release image from the registry. Requires
the DOCKER_IMAGE_TAG variable.
Expand Down Expand Up @@ -61,6 +61,9 @@ Variables:
artifacts are placed.
- NO_CACHE When true, no cache will be used while running the
build target.
- STARTUP_TIME Defines the number of seconds expected to complete
the startup process, including the bootstrap where
applicable.

endef

Expand Down Expand Up @@ -357,7 +360,7 @@ logs: _prerequisites
@ $(docker) logs $(DOCKER_NAME)

logs-delayed: _prerequisites
@ sleep 2
@ sleep $(STARTUP_TIME)
@ $(MAKE) logs

load: _prerequisites _require-docker-release-tag _require-package-path
Expand Down
3 changes: 3 additions & 0 deletions environment.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ NO_CACHE ?= false
# Directory path for release packages
DIST_PATH ?= ./dist

# Number of seconds expected to complete container startup including bootstrap.
STARTUP_TIME ?= 2

# ------------------------------------------------------------------------------
# Application container configuration
# ------------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions src/opt/scmi/environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ REGISTER_ETCD_PARAMETERS="${REGISTER_ETCD_PARAMETERS:-}"
REGISTER_TTL="${REGISTER_TTL:-60}"
REGISTER_UPDATE_INTERVAL="${REGISTER_UPDATE_INTERVAL:-55}"

# Number of seconds expected to complete container startup including bootstrap.
STARTUP_TIME="${STARTUP_TIME:-2}"

# Application container configuration
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:-}"
SSH_AUTOSTART_SSHD="${SSH_AUTOSTART_SSHD:-true}"
Expand Down

0 comments on commit 526ee41

Please sign in to comment.