Prevent IP conflicts on lxcbr0

We assign IPs to the containers from the dhcp range handled by lxc. This
could cause random failures due to IP conflicts on this range.

Adjusting the dhcp range for lxc and adjusting the assigned IPs for
containers to fall outside of that range resolves this.

Change-Id: I88af22c73543e4d96d2dbe5fc440e5d11738d927
This commit is contained in:
Andy McCrae 2016-03-11 15:26:17 +00:00
parent a43365b22d
commit 404b9e2a8b

View File

@ -50,7 +50,7 @@
roles:
- role: "lxc_hosts"
lxc_net_address: 10.100.100.1
lxc_net_dhcp_range: 10.100.100.2,10.100.100.253
lxc_net_dhcp_range: 10.100.100.8,10.100.100.253
lxc_net_bridge: lxcbr0
lxc_kernel_options:
- { key: 'fs.inotify.max_user_instances', value: 1024 }
@ -95,8 +95,8 @@
physical_host: localhost
container_name: "{{ item.name }}"
with_items:
- { name: "infra1", service: "infra1", address: "10.100.100.101", groups: "all,all_containers,rabbitmq_all,galera_all,service_all" }
- { name: "openstack1", service: "openstack1", address: "10.100.100.102", groups: "all,all_containers,keystone_all,glance_all" }
- { name: "infra1", service: "infra1", address: "10.100.100.2", groups: "all,all_containers,rabbitmq_all,galera_all,service_all" }
- { name: "openstack1", service: "openstack1", address: "10.100.100.3", groups: "all,all_containers,keystone_all,glance_all" }
- name: Playbook for creating containers
hosts: all_containers
@ -144,7 +144,7 @@
rabbitmq_vhost:
name: "{{ keystone_rabbitmq_vhost }}"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['keystone_all'][0]
tags:
- aodh-rabbitmq
@ -158,7 +158,7 @@
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['keystone_all'][0]
tags:
- aodh-rabbitmq
@ -170,7 +170,7 @@
login_host: "localhost"
name: "{{ keystone_galera_database }}"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['keystone_all'][0]
tags:
- mysql-db-setup
@ -187,16 +187,16 @@
with_items:
- "localhost"
- "%"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['keystone_all'][0]
tags:
- mysql-db-setup
roles:
- role: os_keystone
vars:
external_lb_vip_address: 10.100.100.102
internal_lb_vip_address: 10.100.100.102
keystone_galera_address: 10.100.100.101
external_lb_vip_address: 10.100.100.3
internal_lb_vip_address: 10.100.100.3
keystone_galera_address: 10.100.100.2
keystone_galera_database: keystone
keystone_venv_tag: "testing"
keystone_developer_mode: true
@ -209,7 +209,7 @@
keystone_rabbitmq_port: 5671
keystone_rabbitmq_userid: keystone
keystone_rabbitmq_vhost: /keystone
keystone_rabbitmq_servers: 10.100.100.101
keystone_rabbitmq_servers: 10.100.100.2
keystone_rabbitmq_use_ssl: true
galera_client_drop_config_file: false
@ -222,7 +222,7 @@
rabbitmq_vhost:
name: "{{ glance_rabbitmq_vhost }}"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['glance_all'][0]
tags:
- aodh-rabbitmq
@ -236,7 +236,7 @@
read_priv: ".*"
write_priv: ".*"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['glance_all'][0]
tags:
- aodh-rabbitmq
@ -248,7 +248,7 @@
login_host: "localhost"
name: "{{ glance_galera_database }}"
state: "present"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['glance_all'][0]
tags:
- mysql-db-setup
@ -265,16 +265,16 @@
with_items:
- "localhost"
- "%"
delegate_to: "10.100.100.101"
delegate_to: "10.100.100.2"
when: inventory_hostname == groups['glance_all'][0]
tags:
- mysql-db-setup
roles:
- role: "{{ rolename | basename }}"
vars:
external_lb_vip_address: 10.100.100.102
internal_lb_vip_address: 10.100.100.102
glance_galera_address: 10.100.100.101
external_lb_vip_address: 10.100.100.3
internal_lb_vip_address: 10.100.100.3
glance_galera_address: 10.100.100.2
glance_galera_database: glance
glance_container_mysql_password: "SuperSecrete"
galera_client_drop_config_file: false
@ -282,7 +282,7 @@
glance_rabbitmq_password: "secrete"
glance_rabbitmq_userid: glance
glance_rabbitmq_vhost: /glance
rabbitmq_servers: 10.100.100.101
rabbitmq_servers: 10.100.100.2
rabbitmq_use_ssl: true
rabbitmq_port: 5671
keystone_auth_admin_token: "SuperSecreteTestToken"