Skip to content

Instantly share code, notes, and snippets.

@hughsaunders
Created December 20, 2017 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hughsaunders/6d51df16187233f93e17f5504fe561db to your computer and use it in GitHub Desktop.
Save hughsaunders/6d51df16187233f93e17f5504fe561db to your computer and use it in GitHub Desktop.
# Record the active interface configs
for interface in $(ip -o link | awk -F':' '{print $2}'); do
if which ethtool &> /dev/null; then
ethtool -k ${interface} > "${WORKING_DIR}/logs/ethtool-${interface}-cfg.txt" || true
else
echo "No ethtool available" | tee -a "${WORKING_DIR}/logs/ethtool-${interface}-cfg.txt"
fi
done
ip -o link | awk -F':' '{print $2}'
# Compress the files gathered so that they do not take up too much space.
# We use 'command' to ensure that we're not executing with some sort of alias.
command gzip --force --best --recursive "${WORKING_DIR}/logs/"
gzip: /var/lib/jenkins/workspace/RPC-IRR_rpc-maas-master-trusty-newton/rcbops/rpc-maas/logs//etc/openstack/aio1_repo_container-5a56d895/network/if-post-down.d/avahi-daemon: No such file or directory
ERROR: InvocationError: '/bin/bash -c /var/lib/jenkins/workspace/RPC-IRR_rpc-maas-master-trusty-newton/rcbops/rpc-maas/tests/test-ansible-functional.sh'
___________________________________ summary ____________________________________
ERROR: functional: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment