Advertisement
olivierbourdon38

OSA stable/queens on CentOS7

Sep 13th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. Commands run on one of the 3 infra VMs running CentOS7
  2.  
  3. # Freeze all containers
  4. lxc-ls | xargs -n1 lxc-freeze -n
  5. # Watch for any changes in interfaces
  6. watch -d "ip a | egrep '^[1-9][0-9]*: ' | sed -e 's/^[1-9][0-9]*: //' -e 's/\(...\).*/\1/' | sort | uniq -c"
  7.  
  8. # ... nothing changes so that's good
  9. # Now unfreezing every container one by one for 5 mn to see impact
  10. # for all containers returned by lxc-ls, compute the number of tap interfaces already present while container is frozen,
  11. # unfreeze the container, wait 5 mn, freeze container again and compute the difference between the new number of tap interfaces
  12. # and the former one, this diff is printed as the last number on the line side to the container name
  13.  
  14. 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
  15. infra1_cinder_api_container-367a0d5e 2
  16. infra1_galera_container-d3e430c7 1
  17. infra1_glance_container-7b83d42f 0
  18. infra1_heat_api_container-5dfd6221 2
  19. infra1_horizon_container-a5af2b5b 3
  20. infra1_keystone_container-22bbcc76 6
  21. infra1_memcached_container-789b94bb 2
  22. infra1_neutron_server_container-deb5063b 4
  23. infra1_nova_api_container-3eb8edcf 2
  24. infra1_rabbit_mq_container-6d78da42 29
  25. infra1_repo_container-e071cebc 3
  26. infra1_rsyslog_container-217cf5bf 0
  27. infra1_utility_container-3ad4d799 0
  28.  
  29. # => tap interfaces are growing wildly
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement