You see the following error when using puppet:
Error: Could not start Service[libvirt]: Execution of '/bin/systemctl
start libvirt-bin' returned 1: Job for libvirt-bin.service failed
because the control process exited with error code. See "systemctl
status libvirt-bin.service" and "journalctl -xe" for details.
This is because you cannot start the libvirt-bin service twice in a row.
root@pkvmci829:~# systemctl start libvirt-bin
root@pkvmci829:~# systemctl start libvirt-bin
Job for libvirt-bin.service failed because the control process exited
with error code. See "systemctl status libvirt-bin.service" and
"journalctl -xe" for details.
Systemd already is able to start libvirtd as a daemon. It does not need
the -d parameter added to /etc/default/libvirt-bin. This just causes
systemd to keep respawning libvirtd in a loop until it realizes that it
isn't working.
Change-Id: Iaffe85dda5c5bfed88f27602189aca074ec7aeda
Stop overriding service providers and let Puppet finds the best,
depending of the distro where Puppet is run.
Change-Id: Ic06ffc377f8982337d977bebb96ef7f6196e5c22
This change adds the management of virtlockd and virtlogd services
to the nova::compute::libvirt. These services are actually required
for nova to be able to communicate correctly with libvirt. Virtlockd
exists for RedHat and Ubuntu but is not currently available under
Debian. Virtlogd is Ubuntu specific service that is usually started
automatically on install of the libvirt package. However if you
disable that or some how prevent it from running, then it may
interfere with nova. We should explicitly manage them since they
are required.
Change-Id: I52c6609e547fa50dccb4b31b9d93748b2b02dee0
This commit will swap the special service provider variable from undef
to redhat for EL7 platforms.
This needs to be done to work around an issue[1] where the systemd
service provider on Puppet 4 doesn't understand services started as a
dependencies, also know as "static" as enabled. This results in the
service "dbus" being enabled on every run. Using the deprecated
legacy "service" command solves th issue.
[1] https://tickets.puppetlabs.com/browse/PUP-5353
Change-Id: I54b1bb85869f2749079288df9fae76db00f43038
If we try to get-or-set virsh secret before starting libvirt, we got
this:
Failed to connect socket to '/var/run/libvirt/libvirt-sock'
Also, drop the requirement on nova::config::end Anchor for libvirt
service, that already needs to run before nova-compute service.
It's created a dependency cycle:
Anchor[nova::config::end] => Service[libvirt] => Exec[get-or-set virsh
secret] => Exec[set-secret-value virsh] => Anchor[nova::config::end]
Also, stop requiring ceph-client-package Package resource in the
'get-or-set virsh secret' Exec, since the resource is not required in
this class.
This patch is an attempt to prevent this situation and allow to deploy
nova-compute with RBD in a single Puppet run.
Change-Id: I69a7d40e7d1847be06a843986ace4f0602272fe1
The Ceph RBD deployment guide for OpenStack [1] suggests use of
hw_disk_discard from Juno. This change adds support into the module
for such a config option.
1. http://docs.ceph.com/docs/master/rbd/rbd-openstack/
Change-Id: Ib0198d63d7e1de4677a1345da1f710277a63d13b
Most other nova packages are already in classes that allow you to
specify the package ensure attribute for managing pinning, upgrading to
latest, or managing the packages externally.
Change-Id: Iee9004bd71f96ea1c3d8cc419e3b1cd4b9df6992
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain. This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.
Change-Id: I0b524e354b095f2642fd38a2f88536d15bcdf855
Switch Nova to use $::os_service_default
Change logging.pp, db.pp and tests.
Change-Id: I928a93534c6d27c020b7afb5b7dda32c379e9d62
Related-bug: #1515273
This change updates the puppet-nova module to use the correct libvirt
service name and log group for the debian packages. In addition the
tests have been updated to properly test the debian and ubuntu
packages.
Change-Id: I8fcca7c1d14f5dec3840789ef00c9ccd11c6191b
Closes-Bug: #1515076
CPU model name shouldn't be set when a host CPU mode is requested.
The CPU model is incompatible with CPU mode unless cpu_mode set
to "custom" value.
Change-Id: I01e4de69dcfbaa4eb3563922d1e114d51d1064b1
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
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
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
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
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
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
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
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
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
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
On RHEL-7 systemd is used and the default provider (service I suppose)
works on older releases too.
Change-Id: I4cb378350cb8de7f7c1ce1c3caacabbe682227da
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
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
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
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>
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>
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
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
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