Commit Graph

408 Commits

Author SHA1 Message Date
Matt Riedemann 45da777d25 Change to messagingv2 for oslo_messaging_notifications.driver
The oslo.messaging docs on the notification messaging driver
says that "messaging" (1.0) is a legacy format and you should
use messagingv2 unless otherwise required for that old format.

By default we should be testing with messagingv2.

Change-Id: I3031afe7551a0c8dde46e1ccfacff445fb68e122
2017-03-05 13:09:39 -05:00
Jenkins 8ddbf6f89d Merge "Create cell1 cell before n-api starts" 2017-03-03 16:20:47 +00:00
Jenkins 073c225257 Merge "Skips enabling kernel bridge firewall in container" 2017-03-03 16:20:20 +00:00
Matt Riedemann f15224c740 Create cell1 cell before n-api starts
Change ac5fdb4c40 introduced
a problem for gnocchi CI because the deployments steps
are now:

1. create cell0
2. start nova-api (with multiple workers)
3. install ceilometer via extras
4. ceilometer calls nova-api to list servers; at this point
   nova-api getes the list of cells and caches them, which
   will just be cell0
5. create cell1 via simple_cell_setup which also discovers
   the n-cpu node so we can schedule instances
6. gnocchi tests create and list instances and at this point it hits
   an n-api worker that only has cell0 cached so it does not
   find some test servers it created and fails.

The cell0 and cell1 cells should be created in the nova_api db
before starting n-api so that when we first list instances, we
store both cells in the cache that's in n-api. This deployment
order is also how the nova docs describe rolling out cells v2
but the way we were doing this devstack wasn't following that,
or accounting for when devstack plugins are loaded via extras.

This change creates the main cell1 cell earlier in the setup
before n-api is started, and then changes to just run
discover_hosts at the end after n-cpu is running (which is what
simple_cell_setup and map_cell_and_hosts would do implicitly).

Change-Id: I38eab6707340253a10159a169ae61d34784c2d28
Related-Bug: #1669473
2017-03-02 15:33:08 -05:00
Jenkins 24b58a9a1a Merge "nova: call map_cell0 much earlier in the setup" 2017-03-01 18:08:11 +00:00
Eli Qiao e624e48ddf nova: Fix comments for _config_nova_apache_wsgi
Comments cleanup.

Change-Id: I02748b906f7bb75240bc4e5259005cd72ef49f6b
2017-02-28 15:18:20 +08:00
Denis Buliga 0bf75a471e Skips enabling kernel bridge firewall in container
Calling enable_kernel_bridge_firewall inside a
container, devstack will crash because it tries to
load a kernel module by calling 'sudo modprobe' on
net.bridge.

Change-Id: Id4718c065d5a8c507d49f38e19c2796a64221aa4
Closes-Bug: #1662194
2017-02-27 10:31:58 +02:00
Dan Smith 6f0205b036 Refactor rpc backend vhost creation
The creation of the cellsv1 rpc vhost was buried in the restart function,
which makes it hard to extend. This breaks it out into a helper method
and moves the conditional logic into the nova module itself.

Change-Id: Ib0e377aabe45c27bb6ce59ca275ce73085e8b9d2
2017-02-23 08:16:48 -08:00
Jenkins 354e7d0997 Merge "Setup service user configuration in nova.conf" 2017-02-22 22:17:46 +00:00
Sean Dague 11eb2017ef simplify endpoints used in devstack
The proliferation of internal/admin endpoints is mostly legacy and
based on some specific deployment patterns. These are not used by
everyone, and for the devstack case aren't really that useful. We
should simplify our service catalog down to the minimum we need for
development.

Change-Id: Ided7a65c81b3a0b56f0184847fc82e17c29a771e
2017-02-13 16:16:59 -05:00
Matt Riedemann ac5fdb4c40 nova: call map_cell0 much earlier in the setup
The map_cell0 command creates a cell mapping record in the
nova_api database, and the nova-manage db sync command
will migrate the db schema for the nova_cell0 database. This
patch takes advantage of that by moving the map_cell0 call
much earlier in the setup process so we get the nova_cell0
db schema migrated at the same time as the main nova db.

This also removes the || true condition around map_cell0
since it's idempotent now due to fix:

aa7b6ebbb254f00fcb548832941ca9dbd3996d9f

Change-Id: Ice4fbb1771270c618b2acbc933d4fbfb6805df81
2017-01-31 15:20:18 -05:00
Jenkins bd14f7f23e Merge "unify logging setup on all services" 2017-01-31 06:26:17 +00:00
Jenkins adcf0c50cd Merge "remove obsolete s3 conf from nova.conf" 2017-01-23 23:37:02 +00:00
Jenkins 7a1e6f042f Merge "simplify colorized logging setup" 2017-01-23 23:35:19 +00:00
Sean Dague fb1c7b51b5 remove obsolete s3 conf from nova.conf
Change-Id: If0b42c647382b739ee4f1d98ea0394ec7b171ebf
2017-01-20 19:01:14 +00:00
Sean Dague 9751be66fa unify logging setup on all services
This provides a single setup_logging function which builds consistent
colorization if the config supports it, otherwise builds the identity
strings that we need to actually keep track of requests.

Change-Id: Iffe30326a5b974ad141aed6288f61e0d6fd18ca9
2017-01-20 10:48:29 -05:00
Sean Dague b6753cea8c simplify colorized logging setup
This makes setup_colorized_logging be a thing which takes a single
parameter and doesn't let projects do things differently. It also
changes the order of values from user / project to project / user to
represent the hierachy more clearly.

Change-Id: I8c0ba7da54be588e3e068734feb4f78ed7c5a14a
2017-01-20 10:48:20 -05:00
Sean Dague 1b457c9acf remove db setting when no nova service need it
We shouldn't have the db connection laying around if services don't
need it.

Change-Id: I9290e80c499c0c4644094e3c0666fd0ab002a23c
2017-01-18 07:53:33 -05:00
Jenkins 1afe532a3e Merge "Fix cellsv2 cell0 database name" 2017-01-16 21:38:44 +00:00
Dan Smith 29bb53fd3e Fix cellsv2 cell0 database name
For some reason we were defaulting the name of the cell0 database
to nova_api_cell0 instead of nova_cell0. Devstack inherited that to
make things work, but we don't really want that. This patch makes us
use the proper name and create the cell0 mapping accordingly. As a
side effect, it also starts the process of unifying the cellsv1 and
cellsv2 paths by creating the cell0 mapping the same for both.

Change-Id: I4e7f6c5eaa068c98e5c4ef3feaee50d8e4f5d484
2017-01-15 09:50:40 -08:00
Jenkins 39a80aeed8 Merge "Don't skip cellsv2 setup for cellsv1" 2017-01-13 22:52:16 +00:00
Jenkins f62a3fb9c6 Merge "lib/nova: create api db first" 2017-01-13 17:17:10 +00:00
Dan Smith e194330f27 Don't skip cellsv2 setup for cellsv1
Since cellsv2 setup is no longer optional, we can't even exclude
cellsv1 from this step. Since cellsv1 users can't use the simple
command, this does the individual steps as needed.

Depends-On: Icfbb17cce8ce8b03dc8b7b4ffb202db01e5218a6
Change-Id: I3c9101a34b2bb0804fc4deda62dbb8637e7b8f94
2017-01-12 08:24:45 -08:00
Pushkar Umaranikar 14e16e42f9 Setup service user configuration in nova.conf
In Nova, service token will be passed along with user token to communicate
with services when dealing with long running tasks like live migration.

This change addresses adding service user configuration for nova in
devstack.

Part of Nova blueprint use-service-tokens

Depends-On: I51eb0a8937fa39a2e5dafb1ad915e7113ea61f72

Co-Authored-By: Sarafraj Singh <sarafraj.singh@intel.com>

Change-Id: I2d7348c4a72af96c0ed2ef6c0ab75d16e9aec8fc
2017-01-11 12:03:53 -05:00
Hongbin Lu 53a49d104a Add virt driver 'zun' to devstack
According to the feedback in the TC meeting [1], we renamed the Nova
virt driver from "docker" to "zun" [2] to avoid name collision
to nova-docker. This rename also help to clarify the difference
between these two drivers.

[1] http://eavesdrop.openstack.org/meetings/tc/2016/
    tc.2016-11-29-20.01.log.html
[2] https://review.openstack.org/#/c/414651/

Change-Id: I747080953ae4d1d35ed334831100413b6e4466c4
2017-01-04 15:56:06 -06:00
Matt Riedemann 2a7e909b3f Explicitly set use_neutron=False in nova.conf when running nova-net
nova-network has been deprecated since Netwon and Nova change
I8388c29ad310cd8800084b4d5c026013158bfbed is switching the default
value of use_neutron to True, so we need devstack to explicitly
set use_neutron=False when running and configuring nova-network.

Part of blueprint use-neutron-by-default

Change-Id: I82721b5d10711401b9b0ebc2b0ed07cc8287bbf7
2017-01-03 21:11:55 -05:00
Roman Podoliaka f575aefdfa lib/nova: create api db first
Since I21ae13a6c029e8ac89484faa212434911160fd51 nova-manage db sync
may try to make a request to api db in order to get cell mapping and
will fail, as the db is not created yet. While this is non fatal, we
could avoid the error anyway.

Change-Id: I19483e9420071d484f029779bcc8c6d623c210ce
Related-Bug: #1631033
2016-12-12 10:37:54 +00:00
Jenkins 3d5a909018 Merge "Always setup cells v2" 2016-12-02 18:14:39 +00:00
Jenkins ab797201e8 Merge "Allow running nova compute with docker group" 2016-11-20 10:39:25 +00:00
Matt Riedemann f166081d0e Always setup cells v2
Nova is going to land a database migration in Ocata
under change I72fb724dc13e1a5f4e97c58915b538ba761c582d
which enforces that at least the simple cells v2 setup
is performed, which creates the cell mappings, cell0 and
host mappings. Before we can land that change in Nova
we have to make cells v2 setup a default in the integrated
gate jobs.

Depends-On: Ie44e615384df464516aa30b9044b5e54b7d995bb

Change-Id: If1af9c478e8ea2420f2523a9bb8b70fafddc86b7
2016-11-03 15:52:52 -04:00
Jenkins 093d815d9f Merge "Enable bridge firewalling if iptables are used" 2016-10-18 11:23:54 +00:00
Hongbin Lu bc5cfc0584 Allow running nova compute with docker group
A use case is from Zun project that needs to start n-cpu with
"docker" group.

Change-Id: Ib8f193ea1edf1f148e9ba505205495170ebf6d67
2016-10-17 01:51:46 +00:00
Ihar Hrachyshka b3a210f643 Enable bridge firewalling if iptables are used
With the plan [1] to stop enabling it by Neutron iptables firewall
driver itself, deployment tools should catch up and enable the firewall
themselves.

This is needed for distributions that decided to disable the kernel
firewall by default (upstream kernel has it enabled). This is also
needed for distributions that ship newer kernels but don't load the
br_netfilter module before starting nova-network or Neutron iptables
firewall driver. In the latter case, firewall may not work, depending on
the order of operations executed by the driver.

To isolate devstack setups from the difference in distribution
kernel configuration and version, the following steps are done:

- we load bridge kernel module, and br_netfilter if present, to get
  access to sysctl knobs controlling the firewall;
- once knobs are available, we unconditionally set them to 1, to make
  sure the firewall is in effect.

More details at:
http://wiki.libvirt.org/page/Net.bridge.bridge-nf-call_and_sysctl.conf

[1] I9137ea017624ac92a05f73863b77f9ee4681bbe7

Change-Id: Id6bfd9595f0772a63d1096ef83ebbb6cd630fafd
Related-Bug: #1622914
2016-09-29 04:26:56 +00:00
Andrew Laski 0009869cae Don't install Nova policy.json
Nova ships with an empty policy.json file which it does not need.
oslo.policy previously required the empty file to be there but as of
version 1.14.0 it is possible to run with no policy file at all. Since
there are no policies defined in the sample file let's no install it.

Change-Id: I85a251376dfe38caa4b100861bf764014a98bc37
Depends-On: I09fa842ffbe75bed269cef6edc9c82d18bfe9297
2016-09-28 15:07:14 -04:00
Jenkins fdd6dfa519 Merge "Remove the same configurations as the default" 2016-09-26 16:53:43 +00:00
Jenkins de0b611032 Merge "Run n-cpu using LXD_GROUP when LXD virt driver" 2016-09-26 15:01:26 +00:00
Jenkins a2d1848419 Merge "Use apache for tls-proxy ssl termination" 2016-09-21 18:19:40 +00:00
Gregory Haynes 4b49e409f8 Use apache for tls-proxy ssl termination
Stud is now abandonware (see https://github.com/bumptech/stud) and is
not packaged in xenial. Lets use Apache for SSL termination since its
there already.

Change-Id: Ifcba410f5969521e8b3d30f02795541c1661f83a
2016-09-20 08:14:11 -07:00
Ken'ichi Ohmichi 085f2fb0e2 Remove the same configurations as the default
The default value of force_dhcp_release is True on Nova side:
https://github.com/openstack/nova/blob/master/nova/conf/network.py#L306
The default value of vnc.enabled is True on Nova side:
https://github.com/openstack/nova/blob/master/nova/conf/vnc.py#L27
The default value of spice.enabled is False on Nova side:
https://github.com/openstack/nova/blob/master/nova/conf/spice.py#L30

So it is not necessary to set them on Devstack.

Change-Id: I67cc103269d2d612ad443c72f2a77d7ae2ca09e3
2016-09-02 14:19:52 -07:00
Dan Smith 71119b47a0 Setup cellsv2 for Nova
This patch setup cellsv2 for Nova after plugin initialization phase.
Since this requires compute hosts to be started, we need to do it
after we have initialized all other plugins. Things like ironic
aren't setup when we were running this as part of nova setup, and
thus this command can fail.

When cellsv1 is used (n-cell is enabled) skip calling
cells_v2 simple_cell_setup, which will never have hosts
at the top level and which will always fail.

Change-Id: Ic7d0115da51d6ea17ee49071af259a7789c62ab9
Depends-On: I9bbaa4c92503222c9fd015fe075926b50f3dcc8c
2016-09-01 15:36:50 +00:00
Andrew Laski eb6ef2f80e Create the nova_api_cell0 database
As part of Nova cellsv2 there is now a third database that must be setup
for use by Nova. This database is an exact copy of the 'nova' database.
Only do this if NOVA_CONFIGURE_CELLSV2 is overridden.

Change-Id: I8775b8066ba85fbdbcdfb42c28cb567fc7759fe5
2016-08-31 12:01:19 -07:00
Sean Dague 7682ea88a6 Change default for FORCE_CONFIG_DRIVE
We really should be using the metadata server more in our normal
testing, this changes the default to use it.

Change-Id: I8ef14e6110da1160163c0106e32032d27226f929
2016-08-18 16:19:36 -04:00
Jenkins ecfc8a77c2 Merge "Set oslo_messaging_notifications driver" 2016-08-18 12:50:14 +00:00
Jim Rollenhagen 9301e8875b Revert "Setup cellsv2 for Nova"
This reverts commit b1a4f34bfc, which
breaks Ironic's jobs. For example:
http://logs.openstack.org/90/355390/1/check/gate-tempest-dsvm-ironic-ipa-wholedisk-agent_ssh-tinyipa/b9e264a/logs/devstacklog.txt.gz#_2016-08-15_17_31_13_358

Change-Id: Iafc579f73fe4a97056944872e2f2c8cd1a62c21c
2016-08-15 14:58:43 -04:00
Jenkins 8cf4a81bfc Merge "Setup cellsv2 for Nova" 2016-08-15 16:40:59 +00:00
Andrew Laski b1a4f34bfc Setup cellsv2 for Nova
Run "nova-manage cell_v2 simple_cell_setup --transport_url ..." after
Nova is started. This will add all compute hosts into a new cell, and
setup a db for cell0.

Change-Id: I50a955b97d0e18426406c15397bdfbc9e807d908
Depends-On: I559f9c87e89926414b368cac9442dec4eadcb89b
2016-08-12 06:48:45 -07:00
Gregory Haynes 14d86e841c Set oslo_messaging_notifications driver
This config option is requied in order for nova notificaions to
function, and enabling it doesn't cause any harm (there is another
option for turning notifications on).

Change-Id: I309af6cc43af485f795c368d304ebe71fceb1a03
2016-08-10 22:03:19 +00:00
Lubosz "diltram" Kosnik 0ffdfbdbd7 Run n-cpu using LXD_GROUP when LXD virt driver
Enabling nova-lxd require to run n-cpu using lxd group

Change-Id: I0553dafcc797fcc1342501a558c7455261cf3daf
2016-08-09 10:32:41 -05:00
Sean Dague 6a008fa74b Change to neutron by default.
nova-net is deprecated, and it's long time to switch to neutron by
default. This patch does that, and has an auto configuration mode that
mostly just works for the basic case.

It does this by assuming that unless the user specifies an interface
for it to manage, that it will not automatically have access to a
physical interface. The floating range is put on br-ex (per normal),
fixed ranges stay on their OVS interfaces.

Because there is no dedicated interface managed by neutron, we add an
iptables rule which allows guests to route out. While somewhat
synthetic, it does provide a working out of the box developer
experience, and is not hugely more synthetic then all the other
interface / route setup we have to do for the system.

You should be able to run this with a local.conf of just

[[local|localrc]]
ADMIN_PASSWORD=pass
DATABASE_PASSWORD=pass
RABBIT_PASSWORD=pass
SERVICE_PASSWORD=pass

And get a working neutron on a single interface box

Documentation will come in subsequent patches, however getting the
code out there and getting feedback is going to help shape this
direction.

Change-Id: I185325a684372e8a2ff25eae974a9a2a2d6277e0
2016-08-04 14:13:30 -04:00
Sean Dague e56318f9bc Remove manual setting of privsep helper
The privsep helper should have a sane default for all libraries,
pushing this into devstack means we cheat past a part of the upgrade
that we really shouldn't be.

Change-Id: I52259e2023e277e8fd62be5df4fd7f799e9b36d7
2016-08-01 10:29:03 -04:00