8286 Commits

Author SHA1 Message Date
Ihar Hrachyshka
e65ab4a1c5 lib/neutron: configure root_helper for agents
Before the patch, we were only configuring root_helper_daemon to point
to oslo.rootwrap, but not root_helper. (The former is used for long
running commands only, while the latter is used for short lived
commands.) This made neutron agents to directly call to sudo when a
privileged process was to be executed. This failed because /etc/sudoers
was not configured to allow anything except the rootwrap call itself.

This patch simplifies rootwrap handling in the code; it also sets
root_helper to point to rootwrap; as well as configure daemon in
sudoers. While at it, we also set l2 agent to use rootwrap too.
Hopefully, it will be enough for agents to actually configure backend as
needed.

Change-Id: Ib05a6e0e024f534d7f616d41d70fb67ecf6daeaf
2017-03-05 23:05:33 +00:00
Jenkins
8fe48af162 Merge "lib/neutron: untangle metering configuration from legacy" 2017-03-07 00:14:19 +00:00
Jenkins
713f17c1d2 Merge "lib/neutron: stop loading all config files into all processes" 2017-03-06 14:37:57 +00:00
Jenkins
17c2f028cf Merge "Change to messagingv2 for oslo_messaging_notifications.driver" 2017-03-06 14:25:08 +00:00
Jenkins
6def6020fc Merge "Fix install_libvirt for other RHEL-based distros" 2017-03-06 06:22:28 +00:00
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
Jenkins
4fd32ec99f Merge "Use lib/keystone to configure [nova] section in neutron.conf" 2017-03-03 16:14:24 +00:00
Jenkins
b9ed1ffc7d Merge "Added printing exit code of component process if it failed to start" 2017-03-03 02:53:05 +00:00
Jenkins
06d6fcf861 Merge "Add allow_global_implied_dsr_disabled feature flag" 2017-03-03 02:52:08 +00:00
Matt Riedemann
f15224c740 Create cell1 cell before n-api starts
Change ac5fdb4c4090efd682cc5c55aa30ec433da29fc7 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
Ihar Hrachyshka
0ce4ba915b Use lib/keystone to configure [nova] section in neutron.conf
This simplifies neutron library code and makes it less prone to breakage
in the future. So far there are no specific known issues with existing
code per se, it works, still.

Change-Id: I28f1997d226baae902dae5ca8ee6cd4fd89efe31
2017-03-02 19:43:05 +00:00
Evgeny Antyshev
008aa3e095 Fix install_libvirt for other RHEL-based distros
Since https://review.openstack.org/#/c/438325 landed
it only works for Centos 7, but not for other
RHEL-based distributions: Virtuozzo and, probably, RHEV.

Both of above have own version for qemu-kvm package: qemu-kvm-vz and qemu-kvm-rhev,
accordingly. These packages provide "qemu-kvm", like qemu-kvm-ev,
and, when you call "yum install qemu-kvm", they replace the default OS package.

Change-Id: I46da627c0da8925064862fdc283db81591979285
2017-03-02 11:14:25 +00:00
Jenkins
23d03b697f Merge "install OSC with py3 by default" 2017-03-02 05:39:08 +00:00
Jenkins
93715a93df Merge "clean up virt drivers that we do image logic for" 2017-03-02 05:39:00 +00:00
Rodrigo Duarte Sousa
94c400cc54 Add allow_global_implied_dsr_disabled feature flag
This patch enabled the "allow_global_implied_dsr_disabled" feature
flag. This is a feature flag toggle for bug 1590578 which is fixed
in Newton and Ocata. This option can be removed after Mitaka is
end of life.

Change-Id: I70e3ce79ee6d9b00cc48bb178bd423d0196f6588
Related-Bug: #1590578
2017-03-01 19:54:38 -03:00
Dan Smith
b1d8519b40 Move rpc backend start/configure to earlier
Because things like nova may need to create vhosts in the rpc backend,
we need to have started and created credentials before we configure
the service.

Change-Id: I01c9c5288e197fc50a8a4a032e3a32cd166eb180
2017-03-01 10:10:52 -08:00
Jenkins
24b58a9a1a Merge "nova: call map_cell0 much earlier in the setup" 2017-03-01 18:08:11 +00:00
Sean Dague
f119121d21
clean up virt drivers that we do image logic for
openvz is not in the nova tree, and is referencing a crazy old image,
we're going to assume that if anyone is using this they can build a
devstack plugin.

drop doing anything by default because this actually requires that we
special case things like ironic in tree to *not* do anything by
default.

Change-Id: I9d33b98263c3d52a95b9983e90eb0b341fa1d363
2017-03-01 11:23:49 -05:00
Jenkins
8a82a9da2c Merge "nova: Fix comments for _config_nova_apache_wsgi" 2017-03-01 09:29:55 +00:00
Jenkins
7d6e77baff Merge "lib/neutron: Fix an extra comma in service_plugins" 2017-03-01 09:29:48 +00:00
Jenkins
2977d9aef5 Merge "lib/neutron: Fix conf handling" 2017-03-01 09:29:41 +00:00
Doug Hellmann
0b1ea080a2 install OSC with py3 by default
Add python-openstackclient to the list of packages installed under
Python 3 by default, so that jobs running with Python 3 exercise the
client that way.

Change-Id: I9778a6810bb3e4850132cfc19e583d50fed23ef5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-02-28 16:39:48 -05:00
Jenkins
192046e4ab Merge "Use qemu-kvm-ev package on centos" 2017-02-28 21:28:52 +00:00
Ihar Hrachyshka
19f4b3faae lib/neutron: stop loading all config files into all processes
DHCP agent should not load core plugin config file; L3 agent has no
interest in metadata agent configuration file; etc. It's a mistake to
form a single global list of configuration files and pass it into all
processes. Every process should have its own list, that may or may not
have some files in common with other processes.

The only file that is common to all neutron processes is neutron.conf,
and we could in theory keep it into the common list. But I decided at
this point it's better to be explicit about what's loaded into services.
Also the order of arguments is important, and neutron.conf should always
be the first CLI argument, which is hard to achieve by keeping
neutron.conf file in the global list.

Plugins may be interested in loading additional files into neutron
processes. For example, dragonflow needs to load /etc/neutron/dragonflow.ini
into neutron-server. But we should not necessarily load all those files
into all processes, so such extendable lists should be per process.
Besides, neutron_server_config_add_new is already available to use to
append additional configuration files for neutron-server. That's why the
patch completely kills the NEUTRON_CONFIG_ARG variable.

Depends-On: I4bd54a41a45486a5601373f9a9cce74d7686d1aa
Change-Id: Ia3c3862399bba335db5edf9ea70f850fb2638d09
2017-02-28 21:07:52 +00:00
Jenkins
0e1e78117e Merge "install LIBS_FROM_GIT using python 2 and 3 where appropriate" 2017-02-28 16:37:49 +00:00
Jenkins
259c5e19a7 Merge "allow config to manage python3 use explicitly" 2017-02-28 16:37:20 +00:00
Jenkins
d81e422722 Merge "Added support for fake drivers as Cinder backend" 2017-02-28 13:53:27 +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
Ian Wienand
52bb64105f Use qemu-kvm-ev package on centos
For the latest qemu-kvm, you have to use the qemu-kvm-ev package,
which is based off the qemu-kvm-rhev package, which is explained in
[1] but you probably can't read it.  The gist is, that qemu-kvm-rhev
is a later build of kvm that is incompatible with the base version
provided.  qemu-kvm-rhev is only provided with the RHV (ovirt) and
RHOS (openstack) products.  CentOS rebuilds this package as
qemu-kvm-ev as part of it's virtualisation SIG.

I9a972e3fde2e4e552f6fc98350820c07873c3de3 has bumped up the minimum
qemu version to 2.1.0.  It seems there is a an issue (bug #1668164)
where having the qemu-system package installed gets picked up if
installed, and reports the incorrect version to nova, causing failure.

This removes the installs from files/rpms/nova as it is all being done
in function-libvirt.  We only install the qemu-kvm-ev package on
centos and remove the old work-around.

[1] https://access.redhat.com/solutions/629513
[2] https://wiki.centos.org/SpecialInterestGroup/Virtualization

Change-Id: Ide91b261f35fb19d8bd7155ca016fa3b76a45ea1
2017-02-27 18:59:49 +11:00
Ian Wienand
1e7f738f28 Ensure we install setuptools from requirements
Use pip_install_gr so we get the version pinned by requirements.  The
depends-on is an example of where we're trying to pin to workaround
issues.

Depends-On: I9c57c08a150571c5bb62235d502839394d53a4c1
Change-Id: I780cca681b12a3e9d228dbf2fd9fa6e8ab1a82e1
2017-02-27 11:35:43 +11:00
Jenkins
6f23555c95 Merge "Fix error in 'ip netns' parsing" 2017-02-26 21:43:54 +00:00
Jenkins
f697274eee Merge "Fix file permissions for lib/neutron_plugins/linuxbridge_agent" 2017-02-26 06:26:01 +00:00
Jenkins
9a21fe65a7 Merge "Xen: support Ubuntu Xenial for xen DevStack" 2017-02-26 03:41:50 +00:00
Jenkins
47e3e1d88e Merge "XenAPI: enable root_helper_daemon for XenServer" 2017-02-25 19:15:31 +00:00
Jenkins
0e9ee86bde Merge "Using sudo in the Quick start section" 2017-02-25 16:02:57 +00:00
Jenkins
71640bfe39 Merge "Remove distro support based on new libvirt minimum" 2017-02-25 16:02:50 +00:00
Jenkins
0072abbf11 Merge "Refactor rpc backend vhost creation" 2017-02-24 22:51:38 +00:00
Jenkins
50aa32014c Merge "Enable placement section on controller in multinode setup" 2017-02-24 16:55:54 +00:00
Gary Kotton
79b55f51e4 Fix file permissions for lib/neutron_plugins/linuxbridge_agent
The permissions changed with commit
40aae6adbfce1bd896d5f7b0e281e798b56d1ca8

TrivialFix

Change-Id: I100cb9589309f9289b4581265a5e4206464ddc0e
2017-02-24 13:40:19 +00:00
Jenkins
10e1e387ce Merge "Don't set external_network_bridge by default" 2017-02-24 12:00:44 +00:00
Jenkins
cffe4fea06 Merge "worlddump: Use __future__ print_function" 2017-02-24 12:00:27 +00:00
Jenkins
947af3ac61 Merge "Removed neutron_plugin_configure_debug_command functions" 2017-02-24 10:21:59 +00:00
Jenkins
a97d32fac2 Merge "Do not run cinder API V1 tests anymore by default" 2017-02-24 10:14:12 +00:00
Jenkins
5c332b09ab Merge "Corrected router gateway set command" 2017-02-24 06:32:13 +00:00
Ihar Hrachyshka
bf697f5065 lib/neutron: untangle metering configuration from legacy
The old code assumed _neutron_service_plugin_class_add presence, as well
as used a configuration file path that is not standard (under
/etc/neutron/services/ instead of /etc/neutron/metering_agent.ini).

The patch untangles metering configuration in the new library from that
old and bad code, and reimplements it inline.

This should help the effort to switch gate from lib/neutron-legacy to
lib/neutron.

Change-Id: I0d235498af4b6a70bd5dae6ea178d5aa8ba41e80
2017-02-24 05:24:42 +00:00
Jenkins
cdf79c9620 Merge "mysql: set default sql_mode to TRADITIONAL" 2017-02-24 00:59:06 +00: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