This patch adds class for modifying LBaaS configuration in neutron_lbaas.conf
Depends-On: I619de3038cd2690bebe47cd601c085692506ac3d
Change-Id: I95cf32c3211bc4498eaa68e6e748a27dfd9af0fa
If prefetch of neutron_network, neutron_subnet, or neutron_router
resources fails (because of Neutron API timeouts or failures, for
example) then the provider will believe the resources don't exist
and will attempt to create them. This can cause duplicate
resources in Neutron.
This patch records when the prefetch fails, and if so, shunts
any of the resource management methods to fail().
Change-Id: I612847bfd23ac735583ab228d8a9396f52f0ef14
Closes-bug: 1532284
The admin_state_up(value) method conflicts with the accessor method
for the admin_state_up resource parameter. This patch renames
it to set_admin_state_up(value) to avoid this conflict.
Change-Id: I5a1e23c1541d7ed815ea37f1972abc345e2ba984
Closes-bug: 1532282
The neutron network provider is parsing the wrong json format leading
to an error when you're unlucky. Affected providers:
- neutron_port
- neutron_subnet
- neutron_router
- neutron_network
The neutron provider parses the json of the cliff-tablib's output while
the official one is the cliff' output[1].
As discussed in the ML[2] this patch implements a simple revert of the
json change.
Revert "Use json output instead plain-text"
This reverts commit 79f0e636c07b80b2c6699d934b42641bfef4352b[3]
and part of commit 791a0f146b28544ec3d70c0ab2a950c4d5ca9f98[4]
[1]: https://bugs.launchpad.net/python-neutronclient/+bug/1529914
[2]: http://lists.openstack.org/pipermail/openstack-dev/2015-December/083172.html
[3]: https://review.openstack.org/#/c/238156/
[4]: https://review.openstack.org/#/c/261418/
Change-Id: I93263256eb9d83544910ca4055bb3e9a463645e3
Closes-bug: 1530163
The json output of neutron router-interface-list may contain an
an empty 'fixed_ips' field for a port, but JSON.parse does not
work with empty strings. A check is added to ensure that empty
'fixed_ips' fields are directly removed.
Change-Id: Ie130e1c0b9b8fbbfc679ce0c8b5320226249617f
'ha' parameter allows user to set the router's type to HA or not.
If this parameter is not specified, neutron will use default value, which
depends on whether L3 HA is enabled or not.
Change-Id: I74a5e8482b5e0019e101f78ee9eafb964cf57810
'distributed' parameter allows user to set this router distributed or not.
If this parameter not specified, neutron will use default value, which
depends on DVR enabled or not.
Change-Id: I62bf006d51d7607f4b64a5ba05fe600c3573480a
The change (https://review.openstack.org/#/c/226919/) to the naming
convention for keystone tenants has introduced an issue with some
neutron providers as they are no longer able to find the v2 named
tenants since the name returned from the keystone provider now
also includes the domain. This change adds a check to see if the name
matches the Default domain applied by default until support for a
resource without the domain set is removed.
Change-Id: I4c5b6b2b663a1d08005369fa755ac03b0603102b
Closes-Bug: #1515787
This commit swaps out the usage of Facter['operatingsystem'].value
with Facter.value(:operatingsystem) in all neutron providers that
use the array method on a ruby module style syntax.
This commit doesn't actually fix anything that is broken just
implements a specific syntax to keep consistency across Puppet
OpenStack modules.
https://review.openstack.org/#/c/243849https://review.openstack.org/#/c/243854
Change-Id: I623f92a5071c4e61a614319ece08b9495d83ff59
Openstack CLI utilities can return warning messages while
run to stderr. It's a normal behavior for Openstack CLI.
But Puppet mixs stderr and stdout for commands.
For preventing parsing warning messages,
I propose got response from Neutron CLI as JSON if it required
and parse it by ruby JSON parser.
JSON is a more usable format for interprocess communication,
than plain-text or CSV.
Change-Id: Iba1105bc119272715fa211ac129a366fe50cbf47
Closes-bug: #1508511
* manifests/plugins/nuage.pp
** Nuage Neutron plugin is a monolithic Neutron plugin (core_plugin in
neutron.conf can be set to nuage).
** The plugin.ini file for the Nuage Neutron plugin needs to be created
with correct properties for the Neutron service to come up
(configured in manifests/plugins/nuage.pp).
** To add the configuration parameters to the plugin.ini file a custom
resource type has been created (neutron_plugins_nuage).
* init.pp
** Just comment addition that core_plugin=nuage is now supported
by puppet-neutron
* params.pp
** Parameterizing names of Nuage Neutron Plugin
(pattern based on existing midonet code)
* config.pp
** Call to create_resource similar to other plugins
* Spec tests
** spec tests for the plugin/nuage.pp
The associated spec tests and custom types and providers
have also been added. This follows the same pattern as other plugins
such as midonet and opencontrail.
Change-Id: I0f092bf437739cac0b328822022e932fe5d1c6f2
Neutron now has two options nova_admin_tenant_id and nova_admin_tenant_name.
One can just simply specify name of the nova admin tenant instead of probing
the api to get tenant id.
Change-Id: I21dc10396e92906eab4651c318aa2ee62a8e03c7
The order of name/value pairs in the json string for allocation pools
and host routes is not guaranteed, and when it comes in a different
order from what the regular expression expects, it doesn't match and
causes the method to throw an unhandled exception when attempting to
extract values from matchdata.
Change-Id: I80dec4019a51943f0e04fcbb3be193b4a8d77745
On Liberty the configuration files for SR-IOV split into agent and
driver, also they are now stored on a specific directory.
Change-Id: I8d4e2fda6beb1d7dac77fa1fbb9bbbbe3432a3ef
If the user specifies an array of more than one allocation pool for the
neutron_subnet allocation_pool parameter, the order of the pools is not
guaranteed. On sequential puppet runs, puppet may error with "Property
allocation_pools does not support being updated" because the array is
read in a different order. To avoid this, define the insync? method to
compare the values as though they were unordered sets rather than
ordered lists.
Change-Id: I9c146b5abe563c7e6ebfed169e770ffe8e5cf94b
With the creation of the new openstack_config provider, some processing
that was done in neutron_config has been centralized in
openstack_config.
The same logic applies for all the neutron resources that edit a
ini-like configuration file.
Impacted methods are :
* section
* setting
* separator
Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.
The use case is the following :
neutron_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual
neutron_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent
That means that all the current :
if $myvar {
neutron_config { 'DEFAULT/foo' : value => $myvar }
} else {
neutron_config { 'DEFAULT/foo' : ensure => absent }
}
can be removed in favor of :
neutron_config { 'DEFAULT/foo' : value => $myvar }
If for any reason '<SERVICE DEFAULT>' turns out to be a valid value for
a specific parameter. One could by pass that doing the following :
neutron_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>',
ensure_absent_val => 'foo' }
Change-Id: I3f972ecbde3719fe71a82a64f894d41f6ea7e842
Depends-On: I0eeebde3aac2662cc7e69bfad7f8d2481463a218
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.
Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.
Change-Id: I5542165142516fcd8fd3969c24ca92ac221452bd
If neutron.conf file contains some value for nova_region_name before Puppet
execution, if will keep whitespaces from the original value.
Later this value can be passed to neutron_network provider, for example,
which won't authorize at Keystone due to a whitespace in nova_region_name.
Change-Id: I9eddcc3fb2e8224bb541abbb6dd1e770ca5ef76c
Like the ML2 OpenVSwitch agent, the ML2 LinuxBridge agent defines its
config in ml2_conf.ini on Ubuntu. This patch updates the
neutron_agent_linuxbridge provider to behave the same as the
neutron_agent_ovs provider.
Closes-Bug: #1480277
Change-Id: I24462f9d04a07926c05790b80ed5f0064fcef97d
Two patches in the same review, because they come together.
1) Upgrade acceptance manifest from Kilo (stable) to Liberty (dev)
on both Ubuntu Trusty & Centos7.
Also:
2) Support for configuring openvswitch_agent.ini Upstream Liberty Neutron
now uses ml2/openvswitch_agent.ini to configure the neutron ML2 agent
instead of openvswitch/ovs_neutron_plugin.ini. This patch updates all
resources that configured the old file to use the newer version. This is
required since neutron If6feca7b7a6bdd6c3c6feb929fa26fb4b1f72770 and
should fix issues using puppet-neutron with the latest upstream
packages.
Depends-On: I7c1f31b3cc4c6ea1f894a263a8cff60e357accb8
Change-Id: If9fae3c83d606cb528f69ff54a28c046e0f7cc49
Co-Authored-By: Lukas Bezdicka <lbezdick@redhat.com>
Co-Authored-By: Dan Prince <dprince@redhat.com>
In Kilo, we removed Neutron OVS plugin because it was dropped in Juno in
favor of using ML2 plugin.
We missed to drop the neutron_plugin_ovs type/provider in the patch and
this is what this patch aims about.
Change-Id: Ic9addc51de43ec67db4835072be61e1306281611
This commit will add new tests for neutron providers that have the
create method. Includes a fix to the Puppet::Provider::Neutron_subnet
which was parsing host_routes backwards and replaces the use of the
model method with @resource.
Without this we are not successfully testing for methods removed in the
Puppet 3 to 4 transition.
Co-Authored-By: Lukas Bezdicka <social@v3.sk>
Change-Id: I82382b9f9da7db6910a3d9b5c7060c3f03473585
Close-Bug: #1466555
The neutron router-show command with shell formating outputs the
external_gateway_info with literal backslashes to escape the double
quotes. The provider must then match against the literal slashes when
extracting the gateway id. If this is not done, the provider cannot
detect the gateway id from the external_gateway_info property and will
always attempt to change the gateway name from '' to the desired name.
Change-Id: I85a18ed08886cebd14f61b65b3681a75a8d41741
Neutron provider still uses auth_port and auth_host config
options even though those are now deprecated and won't be set
if someone chooses to use auth_uri. This commit adds support
for auth_uri and keeps the provider backwards compatible.
Change-Id: I4824c09e6af4a800b5ac0c22bf5daea99452bd7e
Neutron can't be called with --router:external=True as that
will cause "ignored explicit argument u'True'" error.
Change-Id: I49a033fd2821100283e217225896fc93a927edd2
Like we did in OVS agent when running ML2 plugin, we need to:
* use neutron_agent_linuxbridge provider to configure the right config file.
Closes-bug: #1426080
Change-Id: Icf7391563dbfcafb788d23b0367fba810a90fb48
When neutron fails the neutron client is often very helpful in
describing the issue. This message should not be hidden in a debug
statement, we should be able to see it easily since it is often easy to
fix. This patch removes the debug output and puts the error message in
the notice.
Change-Id: Ic7769ba463bca22af8c5b1ebc9c43e2b25a0ca99
To avoid a future colision with other modules, we rename the
handle_request method with a prefix (module name).
Same patch in puppet-heat: https://review.openstack.org/#/c/162292/
Closes-bug: #1429096
Change-Id: If477dd15b1ffeb957481494a1da0b3e8ab29e299
Configurations for the OVS agent should go in its config file:
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
but as packaging is broken and different in Ubuntu and Redhat
we have to use new neutron_agent_ovs provider to configure
ovs agent correctly.
Therefore, we should not remove the agent config file and
replace it with a symlink to plugin.ini or ml2_conf.ini.
Those config files are meant to be used by the core plugin itself
in neutron-server, not the agents themselves.
- Remove symlink creation from ovs_neutron_plugin.ini to plugin.ini
- Use neutron_agent_ovs to configure OVS mechanism agent configs
Change-Id: I53d9b923784587e8a2a934f004a3b054c716daaa
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
If the neutron server is down, 120 seconds is far too long to wait for
puppet to fail. This patch reduces the timeout to 10 seconds because if
the neutron server is flaky, but not down, 10 seconds is a reasonable
amount of time to retry connecting.
Change-Id: I7bd694d1e5ee3477f7ea862965f7f3368903abde