-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instance-manager: ensure 'ldconfig' run on pebble service startup (#14)
Signed-off-by: Nashwan Azhari <[email protected]>
- Loading branch information
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Required to prevent Pebble from considering the service to have | ||
# exited too quickly to be worth restarting or respecting the | ||
# "on-failure: shutdown" directive and thus hanging indefinitely: | ||
# https://github.com/canonical/pebble/issues/240#issuecomment-1599722443 | ||
sleep 1.1 | ||
|
||
# NOTE(aznashwan): the longhorn-instance-manager image includes a number of | ||
# dynamically-linked binaries which the instance-manager exec's. | ||
# These binaries require some external libraries which must be indexed: | ||
ldconfig | ||
|
||
TINI_ARGS="$@" | ||
if [ $# -eq 0 ]; then | ||
# https://github.com/longhorn/longhorn-instance-manager/blob/v1.7.0/package/Dockerfile#L177 | ||
# https://github.com/longhorn/longhorn-instance-manager/pull/664 | ||
TINI_ARGS="longhorn-instance-manager" | ||
fi | ||
|
||
# https://github.com/longhorn/longhorn-instance-manager/blob/v1.7.0/package/Dockerfile#L175 | ||
exec tini -- $TINI_ARGS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters