for i in `seq 1 5`;do ssh node-$i openstack-service restart;done
for i in `seq 1 3`;do ssh node-$i 'systemctl restart neutron-qos-agent.service';done
for i in `seq 1 3`; do ssh node-$i 'cp /usr/lib/python2.7/site-packages/neutron/services/qos/agents/qos_agent.py{,.bak.2016-10-12}';done
for i in `seq 1 3`; do ssh node-$i 'cp /usr/lib/python2.7/site-packages/neutron/services/qos/agents/qos_agent.py{,.bak.2016-10-12}';done
for i in `nova list --deleted --status soft_deleted --all-tenants|awk -F '|' '{print $2}'|grep -v 'ID'`;do nova force-delete $i;done
neutron subnet-list --all-tenants|grep -v 自管测试|grep -v 彭大可|grep -v 测试1|grep -v 测试|awk -F '|' '{print $2}'|grep -v id|grep -v "^$"
for i in `neutron port-list --all-tenants|grep d5da|awk -F '|' '{print $2}'`;do neutron port-delete $i;done
for i in `neutron port-list --all-tenants|grep 'f17d8205-df8f-4529-a8af-fdfc1ce94658'|awk -F '|' '{print $2}'`;do neutron port-delete $i;done
for i in `nova flavor-list|grep temp|grep -v 'tempIPF2M3V0'|grep -v 'tempIPF2M3V0'|grep -v 'tempINZFE5PD'|grep -v 'tempINZFE5QE'|awk '{print $2}'`;do nova flavor-delete $i;done
for i in `neutron portmapping-list|grep bfa68b9d-d9db-4ac8-ba7c-1fad16309755|awk '{print $2}'`;do neutron portmapping-delete $i;done
for i in `openstack endpoint list|grep 8774|awk -F '|' '{print $2}'`; do openstack endpoint delete $i;done
for i in `ip netns|grep qrouter`;do ip netns exec $i ip a;done
for i in `seq 1 2`;do ssh tracker-$i ps -ef|grep 'tracker'|grep -v 'grep';done
for i in `seq 1 2`;do ssh storage-$i ps -ef|grep 'storage'|grep -v 'grep';done
for i in 'arbiter' 'master' 'slave';do ssh mongodb-$i ps -ef|grep mongodb|grep -v 'grep';done
for i in `seq 1 3`;do ssh redis-$i ps -ef|grep redis|grep -v 'grep';done
for i in `seq 1 3`;do ssh zookeeper-$i ps -ef|grep zookeeper|grep -v 'grep';done
for i in `seq 1 3`;do ssh zookeeper-$i /root/zookeeper-3.4.6/bin/zkServer.sh status;done
for i in `seq 1 2`;do ssh mysql-$i ps -ef|grep mysqld|grep -v 'grep';done
for i in `seq 1 2`;do ssh mail-sms-$i ps -ef|grep java|grep -v 'grep'|grep -v 'obm'|grep -v 'logstash';done
for i in `seq 1 7`;do ssh node-$i grep -r -i delete /var/log/neutron | grep 03-06| grep subnet;done
for i in `cinder list --all-t|grep -v 'in-use'|grep -v 'available'|awk -F '|' '{print $2}'|grep -v 'ID'|grep -v '^$'`;do eayunstack manage volume -d --id $i;done
for i in `ip netns |grep qrouter |cut -b 9-44`;do neutron l3-agent-list-hosting-router $i ;done
for i in `neutron router-list|grep -v name|awk -F '|' '{print $2}'|grep -v '^$'`;do neutron router-delete $i;done删除路由器
for i in `neutron subnet-list|grep -v id|awk -F '|' '{print $2}'|grep -v '^$'`;do neutron subnet-delete $i;done删除子网
glance image-list |awk -F '|' '{print $6}'|grep -v 'Size'|grep -v 'raw'|grep -v '^$'|awk '{a+=$1}END{print a}'计算glance镜像所占用的磁盘空间(单位为Byte)
cinder list --all-t|awk -F '|' '{print $6}'|grep -v 'Size'|grep -v '^$'|awk '{a+=$1}END{print a}'计算cinder云硬盘所占的磁盘空间(单位为Byte)
for i in `docker ps -a|grep -v 'kolla_toolbox'|awk -F ' ' '{print $1}'|grep -v 'CONTAINER'`;do docker stop $i;done