Add devstack-version script
This will help in collecting information about the devstack version being used. Change-Id: I23a8ca023bda6d097051cd57ae45401806451ad5
This commit is contained in:
parent
87362e5722
commit
2c0faca038
15
functions
15
functions
@ -751,6 +751,21 @@ function get_random_port {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function write_devstack_version {
|
||||||
|
pushd $TOP_DIR
|
||||||
|
local git_version=""
|
||||||
|
git_version=$(git log --format="%H %s %ci" -1)
|
||||||
|
cat - > /tmp/devstack-version <<EOF
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "DevStack Version: ${DEVSTACK_SERIES} - ${git_version}"
|
||||||
|
echo "OS Version: ${os_VENDOR} ${os_RELEASE} ${os_CODENAME}"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
sudo install -m 755 /tmp/devstack-version /usr/local/bin/devstack-version
|
||||||
|
rm /tmp/devstack-version
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$_XTRACE_FUNCTIONS
|
$_XTRACE_FUNCTIONS
|
||||||
|
|
||||||
|
14
stack.sh
14
stack.sh
@ -216,6 +216,9 @@ if [[ ! -r $TOP_DIR/stackrc ]]; then
|
|||||||
fi
|
fi
|
||||||
source $TOP_DIR/stackrc
|
source $TOP_DIR/stackrc
|
||||||
|
|
||||||
|
# this installs a devstack-version script to make it easy to report the version back
|
||||||
|
write_devstack_version
|
||||||
|
|
||||||
# Warn users who aren't on an explicitly supported distro, but allow them to
|
# Warn users who aren't on an explicitly supported distro, but allow them to
|
||||||
# override check and attempt installation with ``FORCE=yes ./stack``
|
# override check and attempt installation with ``FORCE=yes ./stack``
|
||||||
if [[ ! ${DISTRO} =~ (xenial|yakkety|zesty|stretch|jessie|f24|f25|opensuse-42.2|rhel7|kvmibm1) ]]; then
|
if [[ ! ${DISTRO} =~ (xenial|yakkety|zesty|stretch|jessie|f24|f25|opensuse-42.2|rhel7|kvmibm1) ]]; then
|
||||||
@ -1521,19 +1524,28 @@ fi
|
|||||||
|
|
||||||
# Warn that a deprecated feature was used
|
# Warn that a deprecated feature was used
|
||||||
if [[ -n "$DEPRECATED_TEXT" ]]; then
|
if [[ -n "$DEPRECATED_TEXT" ]]; then
|
||||||
echo_summary "WARNING: $DEPRECATED_TEXT"
|
echo
|
||||||
|
echo -e "WARNING: $DEPRECATED_TEXT"
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If USE_SYSTEMD is enabled, tell the user about using it.
|
# If USE_SYSTEMD is enabled, tell the user about using it.
|
||||||
if [[ "$USE_SYSTEMD" == "True" ]]; then
|
if [[ "$USE_SYSTEMD" == "True" ]]; then
|
||||||
|
echo
|
||||||
echo "Services are running under systemd unit files."
|
echo "Services are running under systemd unit files."
|
||||||
echo "For more information see: "
|
echo "For more information see: "
|
||||||
echo "https://docs.openstack.org/developer/devstack/systemd.html"
|
echo "https://docs.openstack.org/developer/devstack/systemd.html"
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# devstack version
|
||||||
|
devstack-version
|
||||||
|
echo
|
||||||
|
|
||||||
# Indicate how long this took to run (bash maintained variable ``SECONDS``)
|
# Indicate how long this took to run (bash maintained variable ``SECONDS``)
|
||||||
echo_summary "stack.sh completed in $SECONDS seconds."
|
echo_summary "stack.sh completed in $SECONDS seconds."
|
||||||
|
|
||||||
|
|
||||||
# Restore/close logging file descriptors
|
# Restore/close logging file descriptors
|
||||||
exec 1>&3
|
exec 1>&3
|
||||||
exec 2>&3
|
exec 2>&3
|
||||||
|
Loading…
Reference in New Issue
Block a user