30 Commits

Author SHA1 Message Date
Doug Szumski
78a828ef42 Support multiple nova cells
This patch adds initial support for deploying multiple Nova cells.

Splitting a nova-cell role out from the Nova role allows a more granular
approach to deploying and configuring Nova services.

A new enable_cells flag has been added that enables the support of
multiple cells via the introduction of a super conductor in addition to
cell-specific conductors. When this flag is not set (the default), nova
is configured in the same manner as before - with a single conductor.

The nova role now deploys the global services:

* nova-api
* nova-scheduler
* nova-super-conductor (if enable_cells is true)

The nova-cell role handles services specific to a cell:

* nova-compute
* nova-compute-ironic
* nova-conductor
* nova-libvirt
* nova-novncproxy
* nova-serialproxy
* nova-spicehtml5proxy
* nova-ssh

This patch does not support using a single cell controller for managing
more than one cell. Support for sharing a cell controller will be added
in a future patch.

This patch should be backwards compatible and is tested by existing CI
jobs. A new CI job has been added that tests a multi-cell environment.

ceph-mon has been removed from the play hosts list as it is not
necessary - delegate_to does not require the host to be in the play.

Documentation will be added in a separate patch.

Partially Implements: blueprint support-nova-cells
Co-Authored-By: Mark Goddard <mark@stackhpc.com>
Change-Id: I810aad7d49db3f5a7fd9a2f0f746fd912fe03917
2019-10-16 17:42:36 +00:00
Doug Szumski
bcdd0dd257 Remove invalid reference to Placement API
The Placement API has moved out of the Nova role and is no
longer defined in `nova_services`.

Change-Id: I7b9601334c7e4c6b075a233557669ad414556e09
2019-08-23 14:27:34 +01:00
Mark Goddard
de00bf491d Simplify handler conditionals
Currently, we have a lot of logic for checking if a handler should run,
depending on whether config files have changed and whether the
container configuration has changed. As rm_work pointed out during
the recent haproxy refactor, these conditionals are typically
unnecessary - we can rely on Ansible's handler notification system
to only trigger handlers when they need to run. This removes a lot
of error prone code.

This patch removes conditional handler logic for all services. It is
important to ensure that we no longer trigger handlers when unnecessary,
because without these checks in place it will trigger a restart of the
containers.

Implements: blueprint simplify-handlers

Change-Id: I4f1aa03e9a9faaf8aecd556dfeafdb834042e4cd
2019-06-27 15:57:19 +00:00
Zuul
651b983bdb Merge "Restart all nova services after upgrade" 2019-06-27 13:39:12 +00:00
Mark Goddard
e6d2b92200 Restart all nova services after upgrade
During an upgrade, nova pins the version of RPC calls to the minimum
seen across all services. This ensures that old services do not receive
data they cannot handle. After the upgrade is complete, all nova
services are supposed to be reloaded via SIGHUP to cause them to check
again the RPC versions of services and use the new latest version which
should now be supported by all running services.

Due to a bug [1] in oslo.service, sending services SIGHUP is currently
broken. We replaced the HUP with a restart for the nova_compute
container for bug 1821362, but not other nova services. It seems we need
to restart all nova services to allow the RPC version pin to be removed.

Testing in a Queens to Rocky upgrade, we find the following in the logs:

Automatically selected compute RPC version 5.0 from minimum service
version 30

However, the service version in Rocky is 35.

There is a second issue in that it takes some time for the upgraded
services to update the nova services database table with their new
version. We need to wait until all nova-compute services have done this
before the restart is performed, otherwise the RPC version cap will
remain in place. There is currently no interface in nova available for
checking these versions [2], so as a workaround we use a configurable
delay with a default duration of 30 seconds. Testing showed it takes
about 10 seconds for the version to be updated, so this gives us some
headroom.

This change restarts all nova services after an upgrade, after a 30
second delay.

[1] https://bugs.launchpad.net/oslo.service/+bug/1715374
[2] https://bugs.launchpad.net/nova/+bug/1833542

Change-Id: Ia6fc9011ee6f5461f40a1307b72709d769814a79
Closes-Bug: #1833069
Related-Bug: #1833542
2019-06-27 09:36:20 +00:00
Jeffrey Zhang
4e032923c0 Remove nova-consoleauth
The nova-consoleauth service was deprecated during the Rocky release [1]
and has not been necessary since unless you're using cells v1. As Kolla
has never supported cells v1, which is finally being removed during
Train [2], we can get ahead of the curve and stop deploying
nova-consoleauth immediately.

[1] https://specs.openstack.org/openstack/nova-specs/specs/rocky/implemented/convert-consoles-to-objects.html
[2] https://blueprints.launchpad.net/nova/+spec/remove-cells-v1/

Change-Id: I099080979f5497537e390f531005a517ab12aa7a
2019-06-16 16:39:07 +08:00
Zuul
4a5d8b0d05 Merge "Add mising handlers for external Ceph." 2019-03-26 06:17:09 +00:00
Scott Solkhon
c70d806666 Add mising handlers for external Ceph.
When Nova, Glance, or Cinder are deployed alongside an external Ceph deployment
handlers will fail to trigger if keyring files are updated, which results in the
containers not being restarted.

This change adds the missing 'when' conditions for nova-libvirt, nova-compute,
cinder-volume, cinder-backup, and glance-api containers.

Change-Id: I8e183aac9a72e7a7210f7edc7cdcbaedd4fbcaa9
2019-03-22 11:20:34 +00:00
Eduardo Gonzalez
2fc6d4cfc5 Split placement from nova
Depends-On: https://review.openstack.org/#/c/642958
Depends-On: https://review.openstack.org/642984
Change-Id: If795a9eb3ec92f75867ce3f755d6b832eba31af9
2019-03-15 15:19:54 +00:00
wu.chunyang
7d9cb44d1f Restart containers when ceph.conf changed
When ceph.conf changed, we need restart some containers.

Change-Id: Iddeaf9dd4f288165fcef288e5384d79b61a0910b
Closes-Bug: #1810010
2019-03-02 16:22:24 +08:00
Paul Bourke
a16d78711f Allow operators to customise Nova vendor info
Nova allows customisation of various metadata passed through to VMs via
a 'release' file[0]. Allow operators to make use of this.

[0] https://github.com/openstack/nova/blob/master/etc/nova/release.sample

Change-Id: I71569314c8e64320f8ffad79b9273f4d6d903bb6
2018-11-30 09:48:28 +00:00
Duong Ha-Quang
c79c5d1f36 Apply Nova rolling upgrade logic
This patchset apply Nova rolling upgrade logic [1]

[1] https://docs.openstack.org/nova/latest/user/upgrade.html

Implements: blueprint apply-service-upgrade-procedure

Co-Authored-By: Ha Manh Dong <donghm@vn.fujitsu.com>
Depends-On: https://review.openstack.org/#/c/558765/
Change-Id: I20531a25dc7f5b05dc70ba771cf4c4222ade33e3
2018-09-19 16:25:51 +07:00
caoyuan
0b0b2b39d7 Provide support for nova dev mode in kolla
Add a possibility to mount sources as volumes to containers,
in "more than documentation" way. That will let us to use kolla
as a replacement for devstack.

Partially implements: blueprint mount-sources
Co-Authored-By: zhulingjie <easyzlj@gmail.com>

Change-Id: I10677e5ad22f2107a0657feeeaf32287ab9f8e28
2018-08-24 10:50:45 +05:30
caoyuan
471985dc2c Update usage of "|" to "is"
With the more recent versions of ansible, we should now use
"is" instead of the "|"

This should update it.

Change-Id: I6fba56fca182349972e8b0ee5452b37aa4090e0c
2018-08-13 12:40:10 +05:30
Lakshmi Prasanna Goutham Pratapa
297eb5e88f Add resource Constraints to Nova containers.
This commit will constrain the dimensions of service `Nova`
and sub-containers deployed along with it.

A user can give the dimension values in `/etc/kolla/globals.yml`
the data-types just like stated in this commit.

Reference-Docs:
https://docs.docker.com/config/containers/resource_constraints/

Added Test-cases for the same.

Partially-Implements: blueprint resource-constraints
Change-Id: I6458d8fb7b26a6e7c3a9fd0d674d9cf129b0bf5d
2018-07-12 23:24:05 +05:30
Ha Manh Dong
30be04ea91 Specify 'become' for all tasks that use kolla_docker module
Add become to all tasks that use the module "kolla_docker"

Change-Id: I4309c4011687b88ec31d739fd8f834fe2326ff10
Partial-Implements: blueprint ansible-specific-task-become
2018-06-08 12:39:24 +00:00
Jeffrey Zhang
c567055176 Fix ansible warning
- rename action and serial to kolla_ansible and kolla_serial
- use become instead of "sudo <command>" in shell
- Remove quota for failed_when and changed_when in rabbitmq tasks

Change-Id: I78cb60168aaa40bb6439198283546b7faf33917c
Implements: blueprint migrate-to-ansible-2-2-0
2018-05-11 02:54:02 +00:00
Zuul
9275ba878f Merge "FIX inject password error" 2018-03-12 14:27:32 +00:00
Dai Dang Van
d77930373e Support policy.yaml file [part 2]
- Keystone
- Glance
- Nova
- Cinder

This will copy only yaml or json policy file if they exist.

Change-Id: I4a9415d82322aed68c9b7650bdf346f58fa49e2a
Implements: blueprint support-custom-policy-yaml
Co-authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
2018-01-29 13:35:59 +00:00
Zhaokun Fu
93fcfe7134 FIX inject password error
The envirenment variable LIBGUESTFS_BACKEND = direct
is not enabled by default in docker container.
Without it, GuestFS() init failed.

Closes-Bug: #1742029

Change-Id: I24330502df7abc8e8f952ebb41bd9ae5e4ba1168
2018-01-12 07:54:59 +00:00
Jenkins
9e44fd2a53 Merge "Add ipc_mode=host for nova-compute conainer" 2017-09-25 08:52:58 +00:00
Jeffrey Zhang
0163162b65 Revert "Remove priviledged mode for nova-api"
This reverts commit c18615efd54d57f89d1a81729099285ea1fca3a7.

This patch fixs nova-api failure on ubuntu binary.

Change-Id: Ie411399eccb0ef7ee004f77a9b1adceca3aa0cc5
Related-Bug: #1715404
2017-09-06 22:33:26 +08:00
Jeffrey Zhang
5937724503 Add ipc_mode=host for nova-compute conainer
ipc_mode=host is required after enabled multipath in nova.

Closes-Bug: #1713639
Depends-On: I0a1d85597999415cab11feb71a7fdfd7af3f7148
Change-Id: Ib0b8961a47b686b6c35456768bbbccc741cb7adf
2017-08-29 15:27:34 +08:00
guochao
c9eaf9158b Add vSphere support to nova_compute
Implements compute part of the blueprint.
Make virt_type of nova_compute configerable.

Change-Id: I0f37e49e09c4f14a64797506007bb55a6f534f0f
Partially-implements: blueprint kolla-ansible-support-vsphere
Co-Authored-By: shaofeng cheng <chengsf@winhong.com>
2017-08-04 17:15:57 +08:00
Sam Yaple
c18615efd5 Remove priviledged mode for nova-api
This only existed to add an iptables rule for nova-net related things.

Change-Id: I4e6c50d0908edde3b3cc68382f4466a828f377a5
Related-Bug: #1687187
2017-07-28 12:43:34 -04:00
Jeffrey Zhang
242c559a04 Add until in restart nova libvirt task
retries only works with until.

Change-Id: I350ee69b0eca7a1763bb7eab34f874d7e22c1340
Closes-bug: #1668023
2017-02-26 17:36:47 +08:00
Jeffrey Zhang
7e9e5fd75a Start nova-conductor earlier
nova-compute will try to connect nova-conductor when upgrade.level is
auto. So nova-conductor need run more earlier. Otherwise, nova-compute
will failed to connect nova-conductor through message queue.

Closes-Bug: #1665836
Change-Id: If6296a84305bc283fb071b9650e629c6b1b71e61
2017-02-22 10:45:09 +08:00
Jeffrey Zhang
374774c254 Fix typo in nova-serialproxy handler
Change-Id: Ied1af4c8ab3012fc5893905795590b53227fb26e
Closes-Bug: #1666123
2017-02-20 07:26:43 +00:00
Jeffrey Zhang
facfabf3bb Implement nova placement service
Closes-Bug: #1660987
Depends-On: I30efc20e6d918e08860584c017455e6d5fa91a35
Change-Id: If0a79b6013f28871dc9f13c510c919078f3304d5
2017-02-02 05:18:13 +00:00
Jeffrey Zhang
35f9335572 Optimize reconfigure action for nova
Change-Id: Ida7c955d9ddf7b7dc3289001958326c38c62d0c9
Partially-implements: blueprint better-reconfigure
2017-01-25 13:20:06 +08:00