Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Commands run on one of the 3 infra VMs running CentOS7
- # Freeze all containers
- lxc-ls | xargs -n1 lxc-freeze -n
- # Watch for any changes in interfaces
- watch -d "ip a | egrep '^[1-9][0-9]*: ' | sed -e 's/^[1-9][0-9]*: //' -e 's/\(...\).*/\1/' | sort | uniq -c"
- # ... nothing changes so that's good
- # Now unfreezing every container one by one for 5 mn to see impact
- # for all containers returned by lxc-ls, compute the number of tap interfaces already present while container is frozen,
- # unfreeze the container, wait 5 mn, freeze container again and compute the difference between the new number of tap interfaces
- # and the former one, this diff is printed as the last number on the line side to the container name
- lxc-ls | xargs -n1 | while read i; do echo -n "$i "; v1=$(ip a | egrep '^[1-9][0-9]*: ' | sed -e 's/^[1-9][0-9]*: //' -e 's/\(...\).*/\1/' | sort | uniq -c | grep tap | awk '{print $1}'); lxc-unfreeze -n $i; sleep 300; lxc-freeze -n $i; v2=$(ip a | egrep '^[1-9][0-9]*: ' | sed -e 's/^[1-9][0-9]*: //' -e 's/\(...\).*/\1/' | sort | uniq -c | grep tap | awk '{print $1}'); echo $(expr $v2 - $v1); done
- infra1_cinder_api_container-367a0d5e 2
- infra1_galera_container-d3e430c7 1
- infra1_glance_container-7b83d42f 0
- infra1_heat_api_container-5dfd6221 2
- infra1_horizon_container-a5af2b5b 3
- infra1_keystone_container-22bbcc76 6
- infra1_memcached_container-789b94bb 2
- infra1_neutron_server_container-deb5063b 4
- infra1_nova_api_container-3eb8edcf 2
- infra1_rabbit_mq_container-6d78da42 29
- infra1_repo_container-e071cebc 3
- infra1_rsyslog_container-217cf5bf 0
- infra1_utility_container-3ad4d799 0
- # => tap interfaces are growing wildly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement