summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent S. Cojot <vcojot@redhat.com>2017-04-20 18:45:17 -0400
committerVincent S. Cojot <vcojot@redhat.com>2017-04-20 18:45:17 -0400
commit41443a0289f8576bceb8d876f9d388398d3900a2 (patch)
tree541cdfc0933e222a1d1d5064fd8a27a9e41f5ab8
parent619d0e81ff63ae508a5a6978a9e0c6e5dd76e62c (diff)
downloadopenstack-access-policy-41443a0289f8576bceb8d876f9d388398d3900a2.zip
openstack-access-policy-41443a0289f8576bceb8d876f9d388398d3900a2.tar.gz
openstack-access-policy-41443a0289f8576bceb8d876f9d388398d3900a2.tar.xz
Updates
-rwxr-xr-xfiles/logging.sh112
1 files changed, 2 insertions, 110 deletions
diff --git a/files/logging.sh b/files/logging.sh
index 04616c4..f7a51a1 100755
--- a/files/logging.sh
+++ b/files/logging.sh
@@ -6,96 +6,9 @@ if [ ! -e /home/stack/overcloudrc ]; then
exit
fi
-source /home/stack/overcloudrc
-
-echo "Configuring controllers for logging."
-echo ""
-echo "Configuring glance-api..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/glance/glance-api.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/glance/glance-api.conf DEFAULT syslog_log_facility LOG_LOCAL1 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "glance-api.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/glance/glance-api.conf DEFAULT use_syslog) ; echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "glance-api.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/glance/glance-api.conf DEFAULT syslog_log_facility) ; echo "$RESPONSE" ; done
-
-echo ""
-echo "Configuring glance-registry..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/glance/glance-registry.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/glance/glance-registry.conf DEFAULT syslog_log_facility LOG_LOCAL1 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "glance-registry.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/glance/glance-registry.conf DEFAULT use_syslog) echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: "; echo -n "glance-registry.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/glance/glance-registry.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-
-echo ""
-echo "Configuring ceilometer..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/ceilometer/ceilometer.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/ceilometer/ceilometer.conf DEFAULT syslog_log_facility LOG_LOCAL4 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "ceilometer.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/ceilometer/ceilometer.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "ceilometer.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/ceilometer/ceilometer.conf DEFAULT syslog_log_facility ); echo "$RESPONSE" ; done
-
-echo ""
-echo "Configuring cinder..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/cinder/cinder.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/cinder/cinder.conf DEFAULT syslog_log_facility LOG_LOCAL2 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "cinder.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/cinder/cinder.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "cinder.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/cinder/cinder.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-echo ""
-echo "Configuring heat..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/heat/heat.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/heat/heat.conf DEFAULT syslog_log_facility LOG_LOCAL5 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "heat.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/heat/heat.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "heat.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/heat/heat.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
+source stackrc
echo ""
-echo "Configuring keystone..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/keystone/keystone.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/keystone/keystone.conf DEFAULT syslog_log_facility LOG_LOCAL3 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "keystone.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/keystone/keystone.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "keystone.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/keystone/keystone.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-echo ""
-echo "Configuring neutron..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/neutron/neutron.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/neutron/neutron.conf DEFAULT syslog_log_facility LOG_LOCAL4 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "neutron.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/neutron/neutron.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "neutron.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/neutron/neutron.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-echo ""
-echo "Configuring nova..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do ssh $i sudo crudini --set /etc/nova/nova.conf DEFAULT use_syslog True; ssh $i sudo crudini --set /etc/nova/nova.conf DEFAULT syslog_log_facility LOG_LOCAL0 ; done
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "nova.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/nova/nova.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "${i}: " ; echo -n "nova.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/nova/nova.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-echo ""
-echo "Setting up /etc/rsyslog.d/client.conf on controllers..."
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo $i ; cat client.conf | ssh heat-admin@$i "sudo sh -c 'cat > /etc/rsyslog.d/client.conf'" ; ssh heat-admin@$i 'sudo sed -i s/PORTNUM/50005/g /etc/rsyslog.d/client.conf'; done
-
-echo ""
-echo "Configuring compute nodes for logging"
-echo ""
-echo "Configuring nova..."
-
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do ssh $i sudo crudini --set /etc/nova/nova.conf DEFAULT use_syslog True ; ssh $i sudo crudini --set /etc/nova/nova.conf DEFAULT syslog_log_facility LOG_LOCAL0 ; done
-
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo -n "${i}: " ; echo -n "nova.conf use_syslog - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/nova/nova.conf DEFAULT use_syslog); echo "$RESPONSE"; done
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo -n "${i}: " ; echo -n "nova.conf syslog_log_facility - " ; RESPONSE=$(ssh $i sudo crudini --get /etc/nova/nova.conf DEFAULT syslog_log_facility); echo "$RESPONSE" ; done
-
-echo "Setting up /etc/rsyslog.d/client.conf on compute nodes..."
-
-
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo $i ; cat client.conf | ssh heat-admin@$i "sudo sh -c 'cat > /etc/rsyslog.d/client.conf'" ; ssh heat-admin@$i 'sudo sed -i s/PORTNUM/50004/g /etc/rsyslog.d/client.conf'; done
-
-echo ""
-echo "Configuring local node of logging..."
+echo "Configuring local node for logging..."
echo ""
echo "Configuring glance-api..."
@@ -172,24 +85,3 @@ sudo systemctl | awk '/openstack/ {print $1}' | xargs -n1 sudo systemctl status
sleep 1
sudo systemctl status rsyslog
-
-echo "Restarting services on compute nodes..."
-
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo "restarting openstack-nova-compute on $i" ; ssh $i sudo systemctl restart openstack-nova-compute ; done
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo "restarting rsyslog on $i" ; ssh $i sudo systemctl restart rsyslog ; done
-
-echo "Checking that services on compute nodes are active:"
-
-for i in $( nova hypervisor-list | awk '/localdomain/ {print $4}' | sed s/.localdomain// | sort -V) ; do echo -n "$i : " ; ssh $i sudo systemctl status rsyslog | grep Active: ; done
-
-echo "Restarting services on controllers..."
- ssh $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | head -n 1) sudo pcs resource restart haproxy-clone
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}') ; do ssh $i sudo systemctl restart rsyslog ; done
-
-echo "Checking that services on control nodes are active:"
-
-ssh heat-admin@$(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | head -n 1) sudo pcs status | egrep -i 'stop|start'
-
-for i in $(nova host-list | awk '/consoleauth/ {split($2,a,"."); print a[1]}' | sort -V) ; do echo -n "$i : " ; ssh $i sudo systemctl status rsyslog | grep Active: ; done
-
-