Merge "Do not use those commands when they are not exist."

This commit is contained in:
Jenkins 2017-05-15 16:29:34 +00:00 committed by Gerrit Code Review
commit dc41577a05

View File

@ -196,15 +196,21 @@ function get_instance_info {
"/openstack/log/instance-info/host_tracepath_info_${TS}.log" || true "/openstack/log/instance-info/host_tracepath_info_${TS}.log" || true
tracepath6 "2001:4860:4860::8888" -m 5 >> \ tracepath6 "2001:4860:4860::8888" -m 5 >> \
"/openstack/log/instance-info/host_tracepath_info_${TS}.log" || true "/openstack/log/instance-info/host_tracepath_info_${TS}.log" || true
lxc-ls --fancy > \ if [ "$(which lxc-ls)" ]; then
"/openstack/log/instance-info/host_lxc_container_info_${TS}.log" || true lxc-ls --fancy > \
lxc-checkconfig > \ "/openstack/log/instance-info/host_lxc_container_info_${TS}.log" || true
"/openstack/log/instance-info/host_lxc_config_info_${TS}.log" || true fi
if [ "$(which lxc-checkconfig)" ]; then
lxc-checkconfig > \
"/openstack/log/instance-info/host_lxc_config_info_${TS}.log" || true
fi
(iptables -vnL && iptables -t nat -vnL && iptables -t mangle -vnL) > \ (iptables -vnL && iptables -t nat -vnL && iptables -t mangle -vnL) > \
"/openstack/log/instance-info/host_firewall_info_${TS}.log" || true "/openstack/log/instance-info/host_firewall_info_${TS}.log" || true
ANSIBLE_HOST_KEY_CHECKING=False \ if [ "$(which ansible)" ]; then
ansible -i "localhost," localhost -m setup > \ ANSIBLE_HOST_KEY_CHECKING=False \
"/openstack/log/instance-info/host_system_info_${TS}.log" || true ansible -i "localhost," localhost -m setup > \
"/openstack/log/instance-info/host_system_info_${TS}.log" || true
fi
get_repos_info > \ get_repos_info > \
"/openstack/log/instance-info/host_repo_info_${TS}.log" || true "/openstack/log/instance-info/host_repo_info_${TS}.log" || true