Merge "Add AIO diagnostics and better gate scripts consistency"
This commit is contained in:
commit
08aab736cb
@ -51,12 +51,14 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $
|
||||
mkdir -p /openstack/log
|
||||
|
||||
# Implement the log directory link for openstack-infra log publishing
|
||||
ln -s /openstack/log $SYMLINK_DIR
|
||||
ln -sf /openstack/log $SYMLINK_DIR
|
||||
|
||||
# Create ansible logging directory and add in a log file entry into ansible.cfg
|
||||
if [ -f "playbooks/ansible.cfg" ];then
|
||||
mkdir -p /openstack/log/ansible-logging
|
||||
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg
|
||||
if [ ! "$(grep -e '^log_path\ =\ /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg)" ];then
|
||||
sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check that the link creation was successful
|
||||
@ -80,7 +82,9 @@ fi
|
||||
info_block "Running AIO Setup"
|
||||
|
||||
# Set base DNS to google, ensuring consistent DNS in different environments
|
||||
echo -e 'nameserver 8.8.8.8\nnameserver 8.8.4.4' | tee /etc/resolv.conf
|
||||
if [ ! "$(grep -e '^nameserver 8.8.8.8' -e '^nameserver 8.8.4.4' /etc/resolv.conf)" ];then
|
||||
echo -e '\n# Adding google name servers\nnameserver 8.8.8.8\nnameserver 8.8.4.4' | tee -a /etc/resolv.conf
|
||||
fi
|
||||
|
||||
# Update the package cache and install required packages
|
||||
apt-get update
|
||||
|
@ -217,6 +217,8 @@ function log_instance_info() {
|
||||
# Get instance info
|
||||
function get_instance_info() {
|
||||
set +x
|
||||
info_block 'Current User'
|
||||
whoami
|
||||
info_block 'Available Memory'
|
||||
free -mt || true
|
||||
info_block 'Available Disk Space'
|
||||
@ -224,7 +226,7 @@ function get_instance_info() {
|
||||
info_block 'Mounted Devices'
|
||||
mount || true
|
||||
info_block 'Block Devices'
|
||||
lsblk || true
|
||||
lsblk -i || true
|
||||
info_block 'Block Devices Information'
|
||||
blkid || true
|
||||
info_block 'Block Device Partitions'
|
||||
@ -253,6 +255,8 @@ function get_instance_info() {
|
||||
ip a || true
|
||||
info_block 'Network Routes'
|
||||
ip r || true
|
||||
info_block 'DNS Configuration'
|
||||
cat /etc/resolv.conf
|
||||
info_block 'Trace Path from google'
|
||||
tracepath 8.8.8.8 -m 5 || true
|
||||
info_block 'XEN Server Information'
|
||||
|
Loading…
x
Reference in New Issue
Block a user