34 Commits

Author SHA1 Message Date
Jenkins
396c142d14 Merge "Make libvirt migration security configurable" 2015-07-23 14:18:39 +00:00
Mathieu Gagné
7a7051ab48 Add ability to override compute_driver
This change introduces a new compute_driver parameter
for all compute driver manifests. This will allow a user to override
the compute_driver config value by its own instead of forking or
monkey-patching the manifests.

It also changes the compute_driver config value of Ironic
for ironic.IronicDriver which also works and better fit
the config value style already used in the other manifests.

Common use case for this parameter is to allow the use of a local
or derivative version of a driver which adds features and/or bug fixes.

Closes-bug: #1472445
Change-Id: I4cd211b389303c22f4c2aa6db7592cc9861d4f40
2015-07-08 14:41:36 -04:00
Martin Mágr
3ac6effa0e Install only required libvirt packages
In RH platform package libvirt is metapackage pulling unnecessary packages.
This patch implements installation of required packages only according to
virt_type parameter.

Change-Id: I68f7ade87dc5371d9bbfc79eafb528293f613375
2015-06-25 12:29:23 +00:00
David Gurtner
1383cee7d4 Make libvirt migration security configurable
Adding flags to choose between tls/tcp connections as well as
sasl/none authentication when configuring libvirt migration.

This allows to deploy proper libvirt security in combination with
the nova::compute class.

Change-Id: Ib479a1f4cd2df0d55347ed71fb8f0ab69aaeceef
2015-06-18 08:12:17 +02:00
Sebastien Badia
2b2480e1e3 Fix spec tests for RSpec 3.x and Puppet 4.x
Enclose service resources in a array, and remove empty
string parameters.

Change-Id: If26f3ffb366a6915d1862c9fd56c801a2989bcfa
Closes-bug: #1447620
2015-06-07 14:09:50 +00:00
Martin Mágr
dc2eb5518e Use correct name on el7+
On el7+ platform the correct name of messagebus service is dbus.
For idempotency of module on those platforms it is required to either
use correct names and not alises or fix service provider.

Change-Id: I824f40478e9190a24f7a7833b6d84311cdec8f25
2015-05-14 10:42:37 +02:00
Sebastien Badia
34ec23cff5 Fix RSpec3.x keywords
Replace should by is_expected.to.
Introduced by 70d33d7a687fc06fbb22674a678703d11717b693

Change-Id: I761af09544054993d1d2e5d67ef72cae4351eb74
2015-05-05 15:06:15 +02:00
Mike Dorman
a0d934b6e2 Use versioncmp for ::operatingsystemmajrelease comparison
Use the stdlib versioncmp() function for comparisons of the
::operatingsystemmajrelease fact.  If that fact evaluates to a string,
regular arithmetric comparisons will fail under the Puppet 4.x
language.

Change-Id: I021fd79c2f10244c9e47284a1d5b7ca331593fc0
Closes-bug: 1425300
2015-03-24 18:08:05 +01:00
Sebastien Badia
b8a187f54c 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: I172439c6ed185bb38b325b2524cab1475cdc7504
2015-03-19 18:45:08 +01:00
sathlan
70d33d7a68 IPv6 support for migration check.
This enables the use of the '::0' IPv6 address for the vncserver_listen
parameter.

    class { 'nova::compute::libvirt':
      vncserver_listen         => '::0',
      migration_support        => true,
    }

Change-Id: Iec69a82c6a7bbf1b0f7364e87e1e3e37a876be9a
Closes-Bug: rhbz#1185652
2015-03-16 15:51:37 -04:00
Matt Fischer
d53282fcce Only tag packages with openstack tag
We don't need the nova tag since Puppet will auto-tag the nova packages
with the appropriate service name.

Change-Id: Iab3a42dc915b7343eb59887e1a5e769a9ff522cd
Closes-Bug: #1391209
2015-02-04 12:56:01 -07:00
David Medberry
6fadda9561 Simple typo
Change-Id: I66e513b572900ac2a2e7cc3f91e0d1a1f099c7e7
2015-02-04 11:55:36 -07:00
Ivan Chavero
f0227c71b1 Disable file injection when using RBD as compute ephemeral storage
When using Ceph/RBD as ephemeral storage for Nova compute, it is
recommended by Inktank to disable file injection.
See: http://ceph.com/docs/next/rbd/rbd-openstack/

Change-Id: I73e016e861ef8b0aead840fa7c519f58068074df
2015-01-25 23:48:23 -07:00
Mathieu Gagné
92d9be12cd Remove deprecated parameters
* nova::api::auth_strategy (deprecated since 4.0.0)
* nova::api::workers (deprecated since 4.0.0)
* nova::compute::libvirt::libvirt_type (deprecated since 4.0.0)
* nova::db::mysql::cluster_id (deprecated since 4.0.0)
* nova::nova_cluster_id (deprecated since 4.0.0)
* nova::nova_group_id (deprecated since 4.2.0)
* nova::nova_user_id (deprecated since 4.2.0)
* nova::nova_shell (deprecated since 4.2.0)
* nova::sql_connection (deprecated since 3.0.0)
* nova::sql_idle_timeout (deprecated since 3.0.0)
* nova::logdir (deprecated since 3.2.0)
* nova::monitoring_notifications (deprecated since 4.0.0)
* nova::keystone::auth::cinder (deprecated since 3.0.0)

Change-Id: I31e8517b2a25febc9f6cd01197be279ee772ebce
2014-11-25 15:02:43 -05:00
Mathieu Gagné
5c8ee34222 Tag all nova packages
Some users wish to override the default package provider by their own.

Tag all packages with the 'openstack' and its corresponding
service name to allow mass resource attributes override using
resource collectors.

Change-Id: I3a8041be7b9fcb304d2cf0dbdd4a021cd8594c02
Closes-bug: #1391209
2014-11-13 11:55:04 -05:00
Emilien Macchi
93a0c27ac9 Debian: update libvirtd init script path
Lately [1], Debian packaging changed to use /etc/default/libvirtd instead of
/etc/default/libvirt-bin (probably to align with systemd, since in Red
Hat it's /etc/sysconfig/libvirtd).

This patch aims to modifify nova::migration::libvirt to build the right
init script path from a param in nova::compute::libvirt
(libvirt_service_name).

[1] http://anonscm.debian.org/cgit/pkg-libvirt/libvirt.git/commit/debian/libvirt-bin.maintscript?id=28dd3618a9a2a8f769d1fa12c28647c4599d9e8e

Change-Id: I7483efe644d301c2646e4063fe7f1aef3e83cb6b
Closes-bug: #1381172
2014-10-14 17:35:28 -04:00
Benedikt Trefzer
a79e5338df add parameter for libvirt_service_name
Currently the service name is taken from params.
This patch allows to overwrite the parameter.

Change-Id: I673854e81ca3177be9e4b1104fd862590616c163
2014-09-29 12:31:08 +02:00
Jenkins
7aa47a25ae Merge "Do not set special_service_provider on RHEL7." 2014-04-28 22:44:26 +00:00
Martin Magr
5a8ac8a5d0 RHEL should have default provider
On RHEL-7 systemd is used and the default provider (service I suppose)
works on older releases too.

Change-Id: I4cb378350cb8de7f7c1ce1c3caacabbe682227da
2014-04-28 12:00:04 +02:00
John Eckersberg
ae014c9abd Do not set special_service_provider on RHEL7.
RHEL7 uses systemd and should set this to undef as Fedora does.

Change-Id: Ic9a719dfff50bda85d428fba5d665d7b97d8959c
2014-04-23 16:15:54 -04:00
Pierre RAMBAUD
a3b4f08f66 Add options to use remove_unused_* parameters
Being able to modify the parameters "remove_unused_base_images",
"remove_unused_original_minimum_age_seconds",
"remove_unused_kernels", "remove_unused_resized_minimum_age_seconds"
if desired.

Change-Id: Ia24594ccc4b999674456e59a279e2d5916cd5d7a
Implements: blueprint add-remove-unused-parameters
2014-03-06 10:31:25 +01:00
Mark T. Voelker
0a5d6568f0 Parameterize disk_cachemodes
The current manifests don't expose a way for end users to set
the disk_cachemodes directive in nova.conf, which can be useful
for improving disk performance.  This patch adds a parameter
allowing users to specify a list of values to be written in
to the disk_cachemodes setting.  The default value is an empty
list, which will cause the disk_cachemodes setting to be removed
entirely from nova.conf (thus matching the Nova default and
current behavior).

Change-Id: I9173ef79e4e573515f290734535907794dda7dbf
2014-03-03 13:05:00 +00:00
Jenkins
a15a0d89da Merge "Parameterize cpu_mode" 2014-03-03 11:05:49 +00:00
Mark T. Voelker
48e8c9008a Parameterize cpu_mode
The libvirt cpu_mode setting in nova.conf currently isn't exposed
via the compute::libvirt class, but can be very useful in nested
virtualization situations (as are common in development labs).
The nova default value for the cpu_type parameter if left unspecified
is dependent on the value of the virt_type setting, and both
the virt_type and cpu_mode settings exist within the [libvirt]
section of nova.conf.  This patch adds a parameter allowing users
to set cpu_type with appropriate defaults based on the value
of the libvirt_virt_type parameter.

Change-Id: I0136f15621f616787aba1bbcbf68208bc8f9a1b1
2014-02-28 08:46:03 -05:00
Emilien Macchi
66ef747a29 enable libvirt at boot
When using libvirt driver, we need to ensure that libvirt service is
actually enabled at boot.

Change-Id: Ie3198010ca8cfbe515d4e99e2662330f6ac29290
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-02-25 18:06:37 +01:00
Emilien Macchi
2fc85017e5 Deprecates old libvirt config
Icehouse brings a new way to configure libvirt with a dedicated section.
This patch aims to configure libvirt in that way and fails when using
old method.

implement blueprint sync-libvirt-config
closes-bug #1259331

Change-Id: I57438e10d207da7df9c7912c311bac1e7fdfe8aa
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-02-18 21:22:51 +01:00
Mathieu Gagné
baeb98d5f8 Cleanup rspec tests of nova::compute::libvirt
Change-Id: Ie410ac8f2fc2d0ebd9e79a869f51e9b7bb315a6e
2014-01-31 10:34:41 -05:00
Doug Schaapveld
d74498fb2a 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: Ib70489d2ffdc1ff3de04d3a0462c0cace8d1b9ac
2013-12-17 21:41:30 -06:00
Dan Bode
c9757ec448 require sections are specified in nova_config
This massive code commit actually implements something very simple.

previously, we allowed nova_config to omit a section and assumed that
section was default.

This commit updates the code to require section names for all settings.

This change is being made b/c:
- it better maps to the config on disk
- it is consistent with the other modules

Change-Id: Iae71a4c48ed0f9792566f16f0bf13e61569b46e5
2013-04-12 15:06:58 -07:00
Dan Prince
2339d14f13 Only start messagebus on RedHat.
This work around is only required on RedHat so use operatingsystem
instead of osfamily.

Change-Id: I85f780753aa9b4d579a62777fe96177daecaf622
2013-04-11 13:56:05 -04:00
Dan Prince
d562af9e93 Only set special_service_provider on RHEL.
Updates the params.pp so that special_service_provider is set
to 'init' on RHEL only. This gets used to startup libvirtd.

This fixes issues using the Nova compute/libvirt module on
Fedora.

Change-Id: I81f6a50a10f8e16e5d54b93724258a977c35d61f
2013-04-11 10:43:13 -04:00
Dan Bode
b8800832f8 Adds service to enable message bus for redhat
This is a requirement for getting libvirtd working.
2013-03-20 13:05:02 -07:00
Dan Bode
d1a9d00053 convert precondition from array to a string
I ran into issues with this line. It could be b/c I am
using an older version of librarian-puppet. I updated the code
to make the issue go away.
2013-03-20 12:59:19 -07:00
Mathieu Gagné
f72120d346 Add rspec tests for nova::compute::libvirt 2013-03-20 14:48:00 -04:00