Browse Source
This changes the nova-multi-cell job to essentially force cross-cell resize and cold migration. By "force" I mean there is only one compute in each cell and resize to the same host is disabled, so the scheduler has no option but to move the server to the other cell. This adds a new role to write the nova policy.yaml file to enable cross-cell resize and a pre-run playbook so that the policy file setup before tempest runs. Part of blueprint cross-cell-resize Change-Id: Ia4f3671c40e69674afc7a96b5d9b198dabaa4224changes/56/656656/52
5 changed files with 52 additions and 11 deletions
@ -0,0 +1,7 @@
|
||||
- hosts: controller |
||||
roles: |
||||
# /etc/nova/policy.yaml is going to be owned by the stack user so we need |
||||
# to make sure that user exists on the controller host first. |
||||
- setup-stack-user |
||||
# Write rules to the /etc/nova/policy.yaml file. |
||||
- setup-multi-cell-policy |
@ -0,0 +1,10 @@
|
||||
Setup multi-cell policy on the controller host. This should not require |
||||
a restart of the n-api service (the policy changes should be read |
||||
dynamically). The stack user must exist on the controller host first. |
||||
|
||||
**Role Variables** |
||||
|
||||
.. zuul:rolevar:: nova_config_dir |
||||
:default: /etc/nova |
||||
|
||||
The nova configuration directory. |
@ -0,0 +1 @@
|
||||
nova_config_dir: /etc/nova |
@ -0,0 +1,18 @@
|
||||
# Ensure the nova configuration directory exists before writing the policy |
||||
# file to it. |
||||
- name: Create nova conf dir |
||||
file: |
||||
path: '{{ nova_config_dir }}' |
||||
state: directory |
||||
owner: stack |
||||
become: yes |
||||
|
||||
# Write the policy file rule for multi-cell resize. |
||||
- name: Setup multi-cell policy |
||||
copy: |
||||
content: | |
||||
# Enable cross-cell resize. |
||||
"compute:servers:resize:cross_cell": "rule:admin_or_owner" |
||||
dest: '{{ nova_config_dir }}/policy.yaml' |
||||
owner: stack |
||||
become: yes |
Loading…
Reference in new issue