50 Commits

Author SHA1 Message Date
Sergey Kolekonov
5379de00d0 Move Neutron to $::os_service_default - part 2
This change updates the values in main classes that are currently set to
the same values as in default configuration files to $::os_service_default fact

Change-Id: I5279cfd72192534a5ffcfdaf71b257b082a8b42c
Related-bug: #1515273
2015-12-11 17:48:16 +03:00
Sergey Kolekonov
eaf2f39b90 Add parameters for Neutron QoS support
Quality of Service advanced service is a feature introduced in Liberty.
This patch adds options required for this service deployment:
- ml2-ovs extensions (to use qos extension)
- ml2-sriov extensions (to use qos extension)
- ml2 plugin extension_drivers (to use qos extension driver)
- qos notification drivers

Change-Id: Iefc289a6eee13b9c66f8131c258af982f232df4b
2015-12-01 13:38:04 +03:00
Sergey Kolekonov
69e809bcca Move Neutron to $::os_service_default - part 1
This change updates the values that are currently undefined to use
$::os_service_default fact.

Change-Id: Id0b1a696d4f151a776cd27acefb825f63fb0e162
2015-11-26 17:39:06 +03:00
Sergey Kolekonov
0efb751408 Fix unit tests against Puppet 4.3.0
Change-Id: Ib79cd22ff71d05c20bc5103e21bda37a84723406
Related-bug: #1517805
2015-11-24 18:52:12 +03:00
Clayton O'Neill
fdf49deed8 dbsync should only notify services that use the db
When db-sync is run, only services that that talk to the database need
to be restarted.  This introduces a new tag for that type of services
(neturon-db-sync-service).  Currently only neutron-server talks to mysql
directly, so it is the only service with this tag applied.

Change-Id: I0ac15865b408fe9acb643e800836da8b3eeb7827
2015-10-05 21:10:14 +00:00
Yanis Guenane
7b54f896aa Introduce neutron::db class
Current modules[1][2][3] implements a
<component>::db class that is not implemented in neutron.
This commit aims to apply here the same logic.

[1] https://github.com/openstack/puppet-nova/blob/master/manifests/db.pp
[2]
https://github.com/openstack/puppet-designate/blob/master/manifests/db.pp
[3]
https://github.com/openstack/puppet-ceilometer/blob/master/manifests/db.pp

Change-Id: I4169145d9a75bcbf607ace426dca671e0eec0261
2015-09-15 13:26:26 +02:00
Yanis Guenane
a63da90375 Add tag to package and service resources
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'neutron-package' and 'neutron-service'
tag for each package and service of this module.

At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.

Use case :

If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'neutron-package' |> -> X

Change-Id: I63ac9b1d806565eb1847ed0e36d393c6c7ea98ad
2015-07-27 11:41:07 +02:00
Jenkins
3b958af376 Merge "Creation of neutron::db::sync" 2015-07-13 14:55:52 +00:00
Yanis Guenane
6d4ff50c5b Creation of neutron::db::sync
In order to standardize the way dbsync are run across our modules,
we create a new class neutron::db::sync.
This class will be included if sync_db is enabled.

By making this transition the neutron::db::sync class
can be returned by the ENC.

A use case would be in an highly available environment with 3 galera
nodes, include neutron::server on every node with sync_db set to false
and have the ENC return ceilometer::db::sync just for one node.

Change-Id: I81e824e3e9e8f901b2a0084c7a5ec42c53781864
2015-07-10 17:46:56 +02:00
Alex Schultz
d9d6f2ae38 Add ability to specify auth_region
This change adds the ability to specify auth_region in neutron.conf.

Change-Id: I475ba151a1fe841b3f84e301a9e68fdf05f5afa4
Closes-Bug: 1471018
2015-07-02 16:13:49 -05:00
Cody Herriges
ccac02b917 Make tests pass on Puppet 4.x
This commit makes the following changes, mostly to specs to get them
  passing on Puppet 4.x: removes redefinition of $name because it is now
  a reserved word and redundant in Puppet 3.x, cleans up the use of
  Puppet's old behavior of implicitly converting String to Integers
  since Puppet 4.x is pretty strictly typed, sets facts required for
  doing flow control and comparison, fixes implicit use of empty string
  that is assumed to be the same as false by updating tests that inject
  empty string into params to represent a value not being provide by a
  user to false instead.

Closes-bug: #1447620
Change-Id: Ibb651f26f33549dbe564dc88167b8f578a03fd77
2015-06-16 09:57:29 -07:00
Sergey Vasilenko
2f71aa483e Tag all neutron packages
Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' to allow mass resource attributes
override using resource collectors.

Change-Id: I7ea5ae48f1bd2ab218b44cb68b20787b5d16e58d
Related-bug: #1391209
2015-03-31 14:31:06 +02:00
Sean Lynn
f3fd385bf4 Allow l3_ha to be disabled
By default l3_ha is turned off.  Allow l3_ha to be turned back off
after it has been enabled.

Change-Id: I65022e62736fa955c9b898331ccc70b5b2d8b7f6
Closes-Bug: 1431635
2015-03-25 21:45:24 +01:00
Gael Chamoulaud
ac06cb7c96 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the
rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
order to be prepared for rspec 3.x move.

In details:

 * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
 * Use shared_examples "a Puppet::Error" for puppet::error tests *
 * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x) *
 * Fix spec tests for rspec-puppet 2.0.0
 * Clean Gemfile (remove over-specificication of runtime deps of
   puppetlabs_spec_helper)

Change-Id: Ida94605916fe26dd4c5fb328f79c4e787d29dcf5
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-03-19 16:57:59 +01:00
Bo Quan
d377737678 Set allow_automatic_l3agent_failover in neutron.conf instead of l3_agent.ini
OpenStack manual has it wrong, and the launchpad url to track the
documentation issue is:
https://bugs.launchpad.net/openstack-manuals/+bug/1424873

Change-Id: I9e80026a72609186044115cbb0b25898d3294f9f
2015-02-24 16:16:34 -07:00
Dan Prince
0f5a97bc5d Fix identity_uri variable conditional
This fixes a conditional added in
a9f06231830d9a042cb100010bcab0d8479cd759 that was meant to
skip configuration of the deprecated auth parameters only
if both auth_uri and identity_uri have been set.

Previously the identity_uri was missing its $ meaning
the conditional would fail to configure the legacy auth
settings in some cases.

Includes updates to the test cases to catch this condition.

Change-Id: I8ec9b1e064c160d103c5ae847cf79e20c8bca370
2015-01-27 20:59:14 -05:00
Dan Prince
a9f0623183 Add support for identity_uri.
Kilo Neutron now sets a default value for identity_uri in
in the default config file. Packages may or may not remove
this default value... and it trumps all of the auth_host,
auth_port, auth_host, auth_admin_prefix settings we currently use
for our puppet-neutron defaults.

This patch adds the ability to set a new identity_uri parameter.
It also deprecates the old auth_host, auth_port, auth_protocol,
and auth_admin_prefix parameters. Logic is in place so that
users of the deprecated settings should have a smooth upgrade
process and get deprecation warnings until they adopt the
new settings.

Change-Id: Ideefb4d824cbd5b4b83f9eb773a75e536e3458fb
2015-01-26 13:10:33 -05:00
Michael Chapman
12991b2375 Subscribe neutron db sync to db connection setting
Currently, neutron db sync is requires the db connection to
be set, but is only triggered by changes in the neutron package.
Since the neutron package, containing the neutron-server binary
is a dependency of other neutron services, this means that if
any other neutron service is installed before neutron-server, the
db will not be synced.

This patch modifies the exec resource to subscribe to the db connection
string, handling both the above case and also the case where the
db connection string is changed to point to a new database for
whatever reason and must be re-synced.

Change-Id: I6ce3e31f048dfc47cd39bbbbea9de0934f015ba4
2015-01-10 15:14:54 +11:00
Mike Dorman
7b6b4515bf Move state_path and lock_path to base neutron class
Add state_path and lock_path parameters to the base neutron class, and
deprecate those same parameters from neutron::server.  This is because
all Neutron services need those configured in neutron.conf, not only
neutron-server.

I am not sure if it makes sense to override the neutron_config values
from the neutron base class in the way I did (in order to preserve
the current behavior.)  It may be better to just depreciate those
parameters outright, instead.

Change-Id: I19819051e4d7bf8ed9caf81adc07a817646e3d21
Closes-bug: 1404017
2014-12-30 09:01:06 -07:00
Mike Dorman
acce57da8b Add service_name parameter to neuron::server class
Allow for customizing the name of the neutron-server service.
The use case here is for organizations that build their own
OpenStack packages, and the service names may differ slightly
from the upstream distro defaults.

Change-Id: If539c51279a8a675e40e356fb4445b6324b75936
2014-12-26 16:01:57 -07:00
Jenkins
109abb2364 Merge "Fix l3_ha enablement" 2014-12-10 16:09:38 +00:00
Javier Pena
05eb42aae9 Fix l3_ha enablement
The L3 HA feature needs to be enabled using "l3_ha=True" instead of
"ha_enabled=true".

Change-Id: I415001419474dd8d242fe238bbf88b5c45c9f3e9
2014-12-10 16:08:42 +01:00
Jenkins
3be56c82aa Merge "Add 'state_path' and 'lock_path' for Neutron::Server" 2014-12-10 14:54:19 +00:00
Bogdan Dobrelya
094d71fc72 Add 'state_path' and 'lock_path' for Neutron::Server
Closes-bug: #1384123

Change-Id: I8a0e703231c312b80c1749174f666242d1399ab5
Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2014-11-26 09:41:39 +01:00
Mathieu Gagné
42936a6370 Remove deprecated parameters
* neutron::plugins::ovs::sql_connection (deprecated since 3.0.0)
* neutron::plugins::ovs::sql_max_retries (deprecated since 3.0.0)
* neutron::plugins::ovs::sql_idle_timeout (deprecated since 3.0.0)
* neutron::plugins::ovs::reconnect_interval (deprecated since 3.0.0)
* neutron::server::sql_connection (deprecated since 4.0.0)
* neutron::server::connection (deprecated since 4.0.0)
* neutron::server::sql_max_retries (deprecated since 4.0.0)
* neutron::server::max_retries (deprecated since 4.0.0)
* neutron::server::sql_idle_timeout (deprecated since 4.0.0)
* neutron::server::idle_timeout (deprecated since 4.0.0)
* neutron::server::sql_reconnect_interval (deprecated since 4.0.0)
* neutron::server::retry_interval (deprecated since 4.0.0)
* neutron::server::log_dir (deprecated since 4.0.0)
* neutron::server::log_file (deprecated since 4.0.0)
* neutron::server::report_interval (deprecated since 4.0.0)

Change-Id: I027865f1c65e088b71ff4fa84dbed3abedd1dae9
2014-11-25 14:33:19 -05:00
Yanis Guenane
54ffe9af55 Policies: Fix potential ordering issues
Ensure the class neutron::policy is applied after the package has
been installed.

Change-Id: I0028073803add15c7a9967b646fd580599e4b3fb
2014-10-22 11:31:47 -04:00
Emilien Macchi
c4aafdd3b3 Enable DVR + HA support
Juno brings two new big features:
- distributed routers
- router high availability

This patchs aims to allow the users to configure DVR and/or HA routers.
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>

Change-Id: Iaab5ab7e63f2627381ca1d5bb1cfd836433d734e
2014-09-30 16:25:37 -04:00
Tri Hoang Vo
aaf25675ec Add tuning db configs
add min_pool_size, max_pool_size, max_overflow

use the same default values as neutron project

Change-Id: I9cc7744b10be03253e1dfe1efa58278d3c8539e8
2014-09-25 12:47:25 +02:00
Jakub Libosvar
3445712b18 Set Neutron workers according CPU count
In order to improve scalability of neutron-server and
neutron-metadata-agent we need to spawn multiple processes. This patch
changes default of api, rpc and metadata workers according to processors
count on physical machine.

Change-Id: I0480f1652b181e50a8c10230c293d6dfdec3a670
2014-09-12 17:04:00 +02:00
Jenkins
8467f8e6a1 Merge "Migrate mysql backend to use openstacklib::db::mysql" 2014-09-03 03:30:43 +00:00
Andrew Woodward
e7984d04ea Add rpc_workers for neutron-server
Number of separate RPC worker processes to spawn.
 The default, 0, runs the worker thread in the current process.
 Greater than 0 launches that number of child processes as workers.
 The parent process manages them.

Closes-bug: #1340316

Change-Id: I7218390a90b4ad082471900cbf2e9f32a88abe28
2014-09-02 17:47:12 -04:00
Colleen Murphy
513602100d Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I181ffa8ead34d37c4a5dacf2aecb3dd0506a5173
2014-08-19 08:35:27 -07:00
Sebastien Badia
c7f8696a3a Hide secrets from puppet logs
Currently secrets like rabbit_password, admin_password or database connection
are laked in puppet logs when changed. This commit changes neutron_*_config and 
neutron_*_ini types adding a new parameter that triggers obfuscation the values
in puppet logs.

Change-Id: I7dc59ce9580bfb1d4afdfbced668d0cb2979458a
Closes-Bug: #1328448
2014-07-22 13:08:00 +00:00
Tri Hoang Vo
b89fd34472 fix wrong location of report_interval
report_interval is a config in section agent, not section DEFAULT.
It is used by the agents to scheduly report state, and not used by
neutron-server. Missing this config on agent side, leads to flapping
alive status of neutron agents. Therefore report_interval is moved
from class neutron::server to class neutron

Change-Id: I4fa84dabcba8465b297f6dc0eefa1d02a98eafca
2014-04-09 16:47:49 +02:00
Doug Schaapveld
c87308b4a9 Adding manage_service parameter to all services
When set to false, enables puppet to configure a service without
starting/stopping it on each run.  This may be necessary when
using an external clustering system (Corosync/Pacemaker, for
example).  Defaults to true.

Change-Id: Ia5b36d9e03bfc4905394bba4fb9873750664b118
2014-03-31 23:47:29 -05:00
Emilien Macchi
f53fcc8462 Change report_interval from 4 to 30, agent_down_time from 9 to 75
Defaults values changed in neutron upstream to improve performances at
large scale.
Patch in Neutron: http://git.io/U1oCmA

Change-Id: Ie79668858eaa34de3872733af06b27e926593973
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-03-23 14:56:56 +01:00
Michael Chapman
2b310c2210 Add support for puppetlabs-mysql 2.2
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
neutron mysql and init classes allowing users to
use the new version. Previous behavior will continue
as normal when using the old version (0.9)

Change-Id: Id4ca8f25cffc4c76b90ab2b7d7adf2a80b2c2c4b
2014-03-18 15:53:53 +11:00
Mark T. Voelker
0229d358ae Don't sync database by default
https://review.openstack.org/#/c/76358 introduced a new sync_db
parameter and set it to true by default.  Unfortunately there
seem to be many cases where this causes problems.  One is when
using the OVS plugin with the [database] section stored in
neutron.conf rather than in the ovs_neutron_plugin.ini file.
In such cases the migration will error out with due to being
unable to connect.  This is particularly problematic for users
in that no changes to the composition layer are necessary to
hit the error since sync_db is set to true by default: to avoid
the problem they need to make composition layer change to explicitly
set it to false.  This patch resolves the problem by setting the
parameter to false by default rather than true.  This enables
users who want the migration to run to do so without impacting
users who haven't been expecting the new behavior.

Change-Id: Id8c116212132b6d75ae14019fc6a65447f226c6d
Closes-Bug: #1288975
2014-03-06 15:44:52 -05:00
Sebastien Badia
c751443f4f Migrate log_{file,dir} params to neutron class
The log_{dir,file} params was configured in the neutron class::server,
these parameters was not available classes neutron::agent::*
This patch fixes this.

(This patch must be backported to havana (for #1282296))

Closes-bug: #1282296
Change-Id: I205b0ed5db08199000ec11b2212afedf67bf2ed7
2014-02-26 00:27:20 +01:00
Emilien Macchi
fea38195c6 Ensure Neutron DB is populated
- Create symbolic link to have /etc/neutron/plugin.ini
- This file is used to synchronize the database

In that way, the command to populate database is generic to all plugins.

Fixes-Bug #1275688

Change-Id: If320b4fa5682245ac2cc9b4a9f05cf02dadc84c0
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-02-24 16:57:02 +01:00
Sebastien Badia
2efcff08d3 Allow log_dir to be set to false in order to disable file logging
This commit allows a user to disable logging to a directory (for
example if syslog is enabled) in order not to login twice.

Change-Id: I0d201b8892cdaea86714b39f7716e763a40a2adc
Closes-bug: #1282296
2014-02-20 00:04:49 +01:00
Mathieu Gagné
a6232366a2 Prefix database parameters with database
Be consistent with other puppet modules for OpenStack by prefixing
database related parameters with database.

Properly deprecate sql_* parameters and other database parameters.

Closes-bug: #1273771
Change-Id: I6c5fa5426162e2dd358a360324abb040c7462f16
2014-01-28 13:51:49 -05:00
Emilien Macchi
a57669a9dc L3 schedulers support
Icehouse brings new schedulers for virtual routing.
This patch aims to:
- add router_scheduler_driver flag support
- document which schedulers we could use

Change-Id: I9ed4464201e1b888ae7474221babe8e5aad38642
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-01-03 09:39:40 +01:00
Emilien Macchi
30885efc1f Tune up report and downtime intervals for l2 agent
If the neutron server erroneously thinks than the l2 agent is down
it will fail to bind a port, which can lead to VM's spawn errors.

This patch aims to add support for agent checks flags.

Change-Id: If047c5d52d10a8ca9b1b765400bdd99a29550b1e
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2013-12-25 11:35:52 +01:00
Doug Schaapveld
691e8d7552 Using contain_class instead of include_class
Per rspec-puppet-1.0.1 warning:

DEPRECATION: include_class is deprecated. Use contain_class instead.
Called from .../vendor/gems/rspec-puppet-1.0.1/lib/rspec-puppet/
matchers/include_class.rb:7

Change-Id: I6bc63343597f1b574f9da5beaae187dcc2b3485d
2013-12-16 11:43:23 -06:00
Doug Schaapveld
af1fd0b604 Fixing neutron::server connection parameter
Previously, neutron::server's (deprecated) sql_connection parameter
had a default value, preventing the new/preferred connection
parameter from ever being used.

This change removes that default, permitting the connection
parameter to work properly, and extends unit tests to confirm.

bug introduced at commit 82552e79316a4ffc1c879dd3aaa1f4735a4a35a0,
change I300fc12092bca1abdd105e0c0c272f7fd49258ac

Change-Id: I116b482c620b5c44b88c1b801438a100343f6f9f
2013-12-10 15:35:27 -06:00
Emilien Macchi
64c452b4fb Add multi-worker support
Since https://review.openstack.org/#/c/37131/ got merged, Neutron
supports now multiple worker processes for API server.

Change-Id: Ib01240c39de21306892f4f92e0ba3ecb56837a7c
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2013-12-01 02:54:53 +01:00
danehans
82552e7931 Adds Database Configuration Support for Havana
Previously, database configuration information was stored in the
plugin .ini file.  As of Havana, a [database] section has been
created in neutron.conf to manage the database configuation for
all Neutron plugins:

https://github.com/openstack/neutron/blob/stable/havana/etc/neutron.conf#L315

Additionaly, several database flags have changed from Grizzly to
Havana.  For backwards compatibility, the previously supported
database flags are contained in neutron::server with a default
of false.

Change-Id: I300fc12092bca1abdd105e0c0c272f7fd49258ac
2013-10-31 21:22:26 +00:00
Dan Prince
42058289bc Add default auth_uri setting for auth token.
The latest keystoneclient code now gives a Warning if auth_uri
isn't explicitly specified.

Change-Id: I0feb52f7a9140ea750254f80b6a3e6855b25f1d3
2013-08-29 09:52:51 -04:00
Dan Prince
c5005c221f Rename quantum to neutron.
Global replacement of all Quantum references with Neutron.

Change-Id: I74ad15e382589ced6f47d0783e3e952627fcd0f7
2013-08-08 10:49:19 -04:00