Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Very Demiurge Very Mindful
Kolla Ansible
Commits
64ab5b06
Commit
64ab5b06
authored
9 years ago
by
Jeffrey Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Fix the Neutron reconfigure
Closes-Bug: #1566360 Change-Id: I8eaab1df0c85c6a0bd60a13851f8716cc5dcfa59
parent
5f6d4d10
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible/roles/neutron/tasks/do_reconfigure.yml
+50
-56
50 additions, 56 deletions
ansible/roles/neutron/tasks/do_reconfigure.yml
ansible/roles/neutron/tasks/reconfigure.yml
+2
-2
2 additions, 2 deletions
ansible/roles/neutron/tasks/reconfigure.yml
with
52 additions
and
58 deletions
ansible/roles/neutron/tasks/do_reconfigure.yml
+
50
−
56
View file @
64ab5b06
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
kolla_docker
:
kolla_docker
:
name
:
"
{{
item.name
}}"
name
:
"
{{
item.name
}}"
action
:
"
get_container_state"
action
:
"
get_container_state"
register
:
container_state
register
:
neutron_
container_state
s
failed_when
:
container_state.Running ==
false
failed_when
:
neutron_
container_state
s
.Running ==
false
when
:
inventory_hostname in groups[item.group]
when
:
inventory_hostname in groups[item.group]
with_items
:
with_items
:
-
{
name
:
neutron_server
,
group
:
neutron-server
}
-
{
name
:
neutron_server
,
group
:
neutron-server
}
...
@@ -16,9 +16,10 @@
...
@@ -16,9 +16,10 @@
kolla_docker
:
kolla_docker
:
name
:
neutron_openvswitch_agent
name
:
neutron_openvswitch_agent
action
:
"
get_container_state"
action
:
"
get_container_state"
register
:
container_state
register
:
openvswitch_agent_
container_state
s
failed_when
:
container_state.Running ==
false
failed_when
:
openvswitch_agent_
container_state
s
.Running ==
false
when
:
when
:
-
neutron_plugin_agent == "openvswitch"
-
(
-
(
( inventory_hostname in groups['compute']
( inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
...
@@ -33,21 +34,20 @@
...
@@ -33,21 +34,20 @@
and enable_nova_fake | bool
and enable_nova_fake | bool
)
)
)
)
-
neutron_plugin_agent == "openvswitch"
-
name
:
Ensuring the neutron_linuxbridge_agent container is up
-
name
:
Ensuring the neutron_linuxbridge_agent container is up
kolla_docker
:
kolla_docker
:
name
:
neutron_linuxbridge_agent
name
:
neutron_linuxbridge_agent
action
:
"
get_container_state"
action
:
"
get_container_state"
register
:
container_state
register
:
linuxbridge_agent_
container_state
s
failed_when
:
container_state.Running ==
false
failed_when
:
linuxbridge_agent_
container_state
s
.Running ==
false
when
:
when
:
-
neutron_plugin_agent == "linuxbridge"
-
(inventory_hostname in groups['compute']
-
(inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent'])
or inventory_hostname in groups['neutron-metadata-agent'])
-
neutron_plugin_agent == "linuxbridge"
-
include
:
config.yml
-
include
:
config.yml
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
command
:
docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
command
:
docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check
changed_when
:
false
changed_when
:
false
failed_when
:
false
failed_when
:
false
register
:
check_results
register
:
neutron_
check_results
when
:
inventory_hostname in groups[item.group]
when
:
inventory_hostname in groups[item.group]
with_items
:
with_items
:
-
{
name
:
neutron_server
,
group
:
neutron-server
}
-
{
name
:
neutron_server
,
group
:
neutron-server
}
...
@@ -67,7 +67,9 @@
...
@@ -67,7 +67,9 @@
command
:
docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check
command
:
docker exec neutron_openvswitch_agent /usr/local/bin/kolla_set_configs --check
changed_when
:
false
changed_when
:
false
failed_when
:
false
failed_when
:
false
register
:
openvswitch_agent_check_results
when
:
when
:
-
neutron_plugin_agent == "openvswitch"
-
(
-
(
( inventory_hostname in groups['compute']
( inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
...
@@ -82,19 +84,19 @@
...
@@ -82,19 +84,19 @@
and enable_nova_fake | bool
and enable_nova_fake | bool
)
)
)
)
-
neutron_plugin_agent == "openvswitch"
-
name
:
Check the configs in the neutron_linuxbridge_agent container
-
name
:
Check the configs in the neutron_linuxbridge_agent container
command
:
docker exec neutron_linuxbridge_agent /usr/local/bin/kolla_set_configs --check
command
:
docker exec neutron_linuxbridge_agent /usr/local/bin/kolla_set_configs --check
changed_when
:
false
changed_when
:
false
failed_when
:
false
failed_when
:
false
register
:
linuxbridge_agent_check_results
when
:
when
:
-
neutron_plugin_agent == "linuxbridge"
-
(inventory_hostname in groups['compute']
-
(inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent'])
or inventory_hostname in groups['neutron-metadata-agent'])
-
neutron_plugin_agent == "linuxbridge"
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
# NOTE(jeffrey4l): when config_strategy == 'COPY_ALWAYS'
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
# and container env['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE',
...
@@ -103,7 +105,7 @@
...
@@ -103,7 +105,7 @@
kolla_docker
:
kolla_docker
:
name
:
"
{{
item.name
}}"
name
:
"
{{
item.name
}}"
action
:
"
get_container_env"
action
:
"
get_container_env"
register
:
container_envs
register
:
neutron_
container_envs
when
:
inventory_hostname in groups[item.group]
when
:
inventory_hostname in groups[item.group]
with_items
:
with_items
:
-
{
name
:
neutron_server
,
group
:
neutron-server
}
-
{
name
:
neutron_server
,
group
:
neutron-server
}
...
@@ -115,99 +117,97 @@
...
@@ -115,99 +117,97 @@
kolla_docker
:
kolla_docker
:
name
:
"
neutron_openvswitch_agent"
name
:
"
neutron_openvswitch_agent"
action
:
"
get_container_env"
action
:
"
get_container_env"
register
:
openvswitch_agent_envs
when
:
when
:
-
neutron_plugin_agent == "openvswitch"
-
(
-
(
( inventory_hostname in groups['compute']
( not enable_nova_fake | bool
and inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent']
or inventory_hostname in groups['neutron-metadata-agent']
and not enable_nova_fake | bool
) or
) or
( inventory_hostname in groups['neutron-dhcp-agent']
( enable_nova_fake | bool
and inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent']
or inventory_hostname in groups['neutron-metadata-agent']
and enable_nova_fake | bool
)
)
)
)
-
neutron_plugin_agent == "openvswitch"
-
name
:
Container config strategy for the neutron_linuxbridge_agent container
-
name
:
Container config strategy for the neutron_linuxbridge_agent container
kolla_docker
:
kolla_docker
:
name
:
"
neutron_linuxbridge_agent"
name
:
"
neutron_linuxbridge_agent"
action
:
"
get_container_env"
action
:
"
get_container_env"
register
:
linuxbridge_agent_envs
when
:
when
:
-
neutron_plugin_agent == "linuxbridge"
-
(inventory_hostname in groups['compute']
-
(inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent'])
or inventory_hostname in groups['neutron-metadata-agent'])
-
neutron_plugin_agent == "linuxbridge"
-
name
:
Remove the containers running neutron-server and neutron agents
-
name
:
Remove the containers running neutron-server and neutron agents
kolla_docker
:
kolla_docker
:
name
:
"
{{
item[0]['name']
}}"
name
:
"
{{
item[0]['name']
}}"
action
:
"
remove_container"
action
:
"
remove_container"
register
:
remove_containers
register
:
neutron_
remove_containers
when
:
when
:
-
inventory_hostname in groups[item[0]['group']]
-
config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
item[2]['rc'] ==
1
-
item[2]['rc'] ==
1
-
inventory_hostname in groups[item[0]['group']]
with_together
:
with_together
:
-
[{
name
:
neutron_server
,
group
:
neutron-server
},
-
[{
name
:
neutron_server
,
group
:
neutron-server
},
{
name
:
neutron_dhcp_agent
,
group
:
neutron-dhcp-agent
},
{
name
:
neutron_dhcp_agent
,
group
:
neutron-dhcp-agent
},
{
name
:
neutron_l3_agent
,
group
:
neutron-l3-agent
},
{
name
:
neutron_l3_agent
,
group
:
neutron-l3-agent
},
{
name
:
neutron_metadata_agent
,
group
:
neutron-metadata-agent
}]
{
name
:
neutron_metadata_agent
,
group
:
neutron-metadata-agent
}]
-
container_envs.results
-
neutron_
container_envs.results
-
check_results.results
-
neutron_
check_results.results
-
name
:
Remove the neutron_openvswitch_agent container
-
name
:
Remove the neutron_openvswitch_agent container
kolla_docker
:
kolla_docker
:
name
:
"
neutron_openvswitch_agent"
name
:
"
neutron_openvswitch_agent"
action
:
"
remove_container"
action
:
"
remove_container"
register
:
remove_containers
register
:
openvswitch_agent_
remove_containers
when
:
when
:
-
config_strategy == "COPY_ONCE" or item[0]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
neutron_plugin_agent == "openvswitch"
-
item[1]['rc'] ==
1
-
(
-
(
( inventory_hostname in groups['compute']
( not enable_nova_fake | bool
and inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent']
or inventory_hostname in groups['neutron-metadata-agent']
and not enable_nova_fake | bool
) or
) or
( inventory_hostname in groups['neutron-dhcp-agent']
( enable_nova_fake | bool
and inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent']
or inventory_hostname in groups['neutron-metadata-agent']
and enable_nova_fake | bool
)
)
)
)
-
neutron_plugin_agent == "openvswitch"
-
config_strategy == "COPY_ONCE" or openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
with_together
:
-
openvswitch_agent_check_results['rc'] ==
1
-
container_envs.results
-
check_results.results
-
name
:
Remove the neutron_linuxbridge_agent container
-
name
:
Remove the neutron_linuxbridge_agent container
kolla_docker
:
kolla_docker
:
name
:
"
neutron_linuxbridge_agent"
name
:
"
neutron_linuxbridge_agent"
action
:
"
remove_container"
action
:
"
remove_container"
register
:
remove_containers
register
:
linuxbridge_agent_
remove_containers
when
:
when
:
-
config_strategy == "COPY_ONCE" or item[0]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
-
neutron_plugin_agent == "linuxbridge"
-
item[1]['rc'] ==
1
-
(inventory_hostname in groups['compute']
-
(inventory_hostname in groups['compute']
or inventory_hostname in groups['manila-share']
or inventory_hostname in groups['manila-share']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent'])
or inventory_hostname in groups['neutron-metadata-agent'])
-
neutron_plugin_agent == "linuxbridge"
-
config_strategy == "COPY_ONCE" or linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
with_together
:
-
linuxbridge_agent_check_results['rc'] ==
1
-
container_envs.results
-
check_results.results
-
include
:
start.yml
-
include
:
start.yml
when
:
remove_containers.changed
when
:
neutron_remove_containers.changed
or openvswitch_agent_remove_containers.changed
or linuxbridge_agent_remove_containers.changed
-
name
:
Restart containers running neutron-server and neutron agents
-
name
:
Restart containers running neutron-server and neutron agents
kolla_docker
:
kolla_docker
:
...
@@ -215,16 +215,16 @@
...
@@ -215,16 +215,16 @@
action
:
"
restart_container"
action
:
"
restart_container"
when
:
when
:
-
config_strategy == 'COPY_ALWAYS'
-
config_strategy == 'COPY_ALWAYS'
-
inventory_hostname in groups[item[0]['group']]
-
item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
item[1]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
item[2]['rc'] ==
1
-
item[2]['rc'] ==
1
-
inventory_hostname in groups[item[0]['group']]
with_together
:
with_together
:
-
[{
name
:
neutron_server
,
group
:
neutron-server
},
-
[{
name
:
neutron_server
,
group
:
neutron-server
},
{
name
:
neutron_dhcp_agent
,
group
:
neutron-dhcp-agent
},
{
name
:
neutron_dhcp_agent
,
group
:
neutron-dhcp-agent
},
{
name
:
neutron_l3_agent
,
group
:
neutron-l3-agent
},
{
name
:
neutron_l3_agent
,
group
:
neutron-l3-agent
},
{
name
:
neutron_metadata_agent
,
group
:
neutron-metadata-agent
}]
{
name
:
neutron_metadata_agent
,
group
:
neutron-metadata-agent
}]
-
container_envs.results
-
neutron_
container_envs.results
-
check_results.results
-
neutron_
check_results.results
-
name
:
Restart the neutron_openvswitch_agent container
-
name
:
Restart the neutron_openvswitch_agent container
kolla_docker
:
kolla_docker
:
...
@@ -232,8 +232,7 @@
...
@@ -232,8 +232,7 @@
action
:
"
restart_container"
action
:
"
restart_container"
when
:
when
:
-
config_strategy == 'COPY_ALWAYS'
-
config_strategy == 'COPY_ALWAYS'
-
item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
neutron_plugin_agent == "openvswitch"
-
item[1]['rc'] ==
1
-
(
-
(
( inventory_hostname in groups['compute']
( inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
...
@@ -248,10 +247,8 @@
...
@@ -248,10 +247,8 @@
and enable_nova_fake | bool
and enable_nova_fake | bool
)
)
)
)
-
neutron_plugin_agent == "openvswitch"
-
openvswitch_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
with_together
:
-
openvswitch_agent_check_results['rc'] ==
1
-
container_envs.results
-
check_results.results
-
name
:
Restart the neutron_linuxbridge_agent container
-
name
:
Restart the neutron_linuxbridge_agent container
kolla_docker
:
kolla_docker
:
...
@@ -259,14 +256,11 @@
...
@@ -259,14 +256,11 @@
action
:
"
restart_container"
action
:
"
restart_container"
when
:
when
:
-
config_strategy == 'COPY_ALWAYS'
-
config_strategy == 'COPY_ALWAYS'
-
item[0]['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
-
neutron_plugin_agent == "linuxbridge"
-
item[1]['rc'] ==
1
-
(inventory_hostname in groups['compute']
-
(inventory_hostname in groups['compute']
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or (enable_manila | bool and inventory_hostname in groups['manila-share'])
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent'])
or inventory_hostname in groups['neutron-metadata-agent'])
-
neutron_plugin_agent == "linuxbridge"
-
linuxbridge_agent_envs['KOLLA_CONFIG_STRATEGY'] != 'COPY_ONCE'
with_together
:
-
linuxbridge_agent_check_results[1]['rc'] ==
1
-
container_envs.results
-
check_results.results
This diff is collapsed.
Click to expand it.
ansible/roles/neutron/tasks/reconfigure.yml
+
2
−
2
View file @
64ab5b06
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
-
include
:
do_reconfigure.yml
-
include
:
do_reconfigure.yml
serial
:
"
30%"
serial
:
"
30%"
when
:
inventory_hostname in groups['neutron-server']
when
:
inventory_hostname in groups['neutron-server']
or inventory_hostname in groups['
neutron-openvswitch-agent
']
or
(enable_manila | bool and
inventory_hostname in groups['
manila-share
']
)
or inventory_hostname in groups['
neutron-linuxbridge-agent
']
or inventory_hostname in groups['
compute
']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-dhcp-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-l3-agent']
or inventory_hostname in groups['neutron-metadata-agent']
or inventory_hostname in groups['neutron-metadata-agent']
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment