75 Commits

Author SHA1 Message Date
Jenkins
d13eb8ec40 Merge "Add Core, Ram and Disk filter to fake virt setting" 2014-09-20 19:38:52 +00:00
Gonéri Le Bouder
a214363cf0 Debian: use libvirt-bin when needed
libvirtd is the new name of the init script in Debian testing.
libvirt-bin is still in use on Debian Wheezy.

Since I222b71962f49896063910ff2a25e4f57be4bf819, libvirtd is the
default for Debian, this break the compatibility with Debian Wheezy.

With this patch, we use libvirt-bin only if there is no
/etc/init.d/libvirtd init script.

Change-Id: I13694fef93d36c2e128e15e7dbfaec9230335585
2014-09-18 18:07:39 +02:00
Devananda van der Veen
d0023fd7dd Switch config to use Ironic driver from Nova's tree
Change the Nova config to use the IronicDriver from the Nova tree,
so that the copy of this driver in Ironic's tree may be deleted.

Also removes the unneeded [ironic] "sql_connection" config parameter
which was cruft copied from the nova_bm configuration in commit
06fb29c66124b6c753fdd262eb262043b4551298

Change-Id: I35473b54d760bfa7395decbe6b086f64db60ab10
2014-09-08 11:27:16 -07:00
mathieu-rohon
62ec61c211 Detect when Debian is used to launch libvirtd
this patch checks if os_VENDOR is ubuntu to launch
libvirt-bin service. Previously, is_ubuntu() was used, but
this function only detects if a deb packaging is used, so
there were no distinction between Ubuntu and Debian.

Change-Id: I222b71962f49896063910ff2a25e4f57be4bf819
Closes-Bug: 1361260
2014-08-28 16:40:14 +02:00
Dean Troyer
85ebb3a868 Remove firewalld on Fedora 20 by default
firewalld interacts badly with the libvirt on f20, causing slow-downs
so great that it can timeout the gate.

Developers who want to leave it enabled should set FORCE_FIREWALLD=True

Change-Id: I5252a12223a35f7fb7a4ac3c58aa4a3cd1bc4799
2014-08-19 11:18:15 -05:00
Adam Gandelman
6d27148eb6 Cleanup lib/ironic
This moves around a bunch of functionality and attempts to isolate setup
steps into discrete functions (new or existing), making them easier to
consume from outside of Devstack (ie, Grenade).

Change-Id: I480167dcc008506ec2fe8c412db4114b74496e60
2014-08-06 16:48:35 -07:00
Christian Berendt
9e8ac9942d Remove configuration parameter EXTRA_BAREMETAL_OPTS
According to the comments in stack.sh the configuration parameter
EXTRA_BAREMETAL_OPTS should be removed during the Juno cycle.

Change-Id: I8564d16e56d1f77d3afa4af9a50fbffa3da8bfe5
2014-07-24 12:37:13 +02:00
Daniel P. Berrange
a12f996778 Avoid huge libvirtd.log files on Ubuntu hosts
The libvirt log filter settings match against the filename of
the libvirt source emitting the log message. Normally these
file names are relative to the source tree root, but in the
Ubuntu binary packages these have somehow ended up as absolute
filenames from the OS root. This means that a log filter of
'1:libvirt' which is only intended to match src/libvirt.c
will in fact match every single file. This caused enourmous
log files on Ubuntu hosts running the gate.

The fix is to use '1:libvirt.c' as a more specific filename
match, but we can't do this unconditionally because libvirt
>= 1.2.3 does not use filenames for log filter matching
anymore. So only change the match on Ubuntu hosts for now,
since that's where the original problem lies.

While doing this, also turn off the logging of object ref
and unref operations, since those pollute the logs with lots
of noise.

Change-Id: I71b67507a4e68a7bff0c358857aaaac08ef0c420
2014-07-01 17:27:29 +01:00
Jenkins
da2fe19e24 Merge "Use identity_uri instead of auth fragments" 2014-06-17 16:06:48 +00:00
Jenkins
906ffb7b77 Merge "XenAPI: Fix deprecated config options" 2014-06-16 12:13:34 +00:00
Bob Ball
786a3a3849 XenAPI: Fix deprecated config options
I346ee0248c03e60716bd7dc4a5ee4493610867cb broke the XenServer CI as
devstack was still setting the deprecated config options.

Change-Id: Icd84212e97a9d5e007745be8096fa552bc23cb6f
2014-06-16 08:37:05 +01:00
Jamie Lennox
3561d7f9ed Use identity_uri instead of auth fragments
auth_token middleware now accepts a standard URL string as the parameter
identity_uri instead of specifying protocol etc individually. Change the
services over to use this.

Also changes over some other places in which the auth fragments are used
individually to the new variables and fixes up some misconfigurations of
auth_token.

identity_uri option was release in keystoneclient 0.8.0

Change-Id: Iac13bc3d08c524a6a0f39cdfbc1009e2f5c45c2a
2014-06-16 15:16:48 +10:00
Ian Wienand
83afcfe9a9 [Fedora] Devstack fails to install in firewalld less system
The official F20 cloud image does not contains the firewalld,
there is nothing to restart, and it fails the installation.

The previous workaround change, assumed all is_fedoras has
a restartable firewalld without ensuring is it installed at all.

RHEL6 even does not have a firewalld.

Closes-bug: #1329102
Change-Id: I3d119ce48af81b30bf02b01c2cd386612ac6ef90
2014-06-12 10:25:07 +10:00
Ian Wienand
e6d99a946f Remove Fedora/libvirt workaround
An updated libvirt package to address [1] is in Fedora 20 now, so we
don't need this work-around.  Modify the comments of the other part of
the work-around (restart of services) and link to the most relevant
bug

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1098376

Change-Id: I47fba7b4f273162c2af1e37902a512041449750b
2014-05-27 13:58:12 +10:00
Joe Gordon
7a15a0e04b Add Core, Ram and Disk filter to fake virt setting
The FakeVirt driver shouldn't need custom scheduling options, so it run
instead of a real virt driver for testing purposes. This simplifies the
use case where someone wants to run the FakeVirt driver along side a
real driver so someone can test there cloud application without wasting
real instances.

Since the FakeVirt driver should look like it has near infinite resources,
turn on Core, Ram and Disk filters to make sure the drive works with them
enabled.

Change-Id: Ic7ec87e4d497d9db58eec93f2b304fe9770a2bbc
Related-Bug: #1268943
2014-05-21 14:22:04 +09:00
Ian Wienand
3ca91b2186 Workaround Fedora libvirtd issues on Xen instances
Fedora libvirtd fails to start on Xen instances (i.e. rackspace
instances) due to [1].  This works around the issue until it can be
fixed upstream.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1098376

Change-Id: I3790b5025982730263a6a84fce596e80f09efd5a
2014-05-19 18:37:56 +10:00
Gary Kotton
51c681d605 Add support for deprecated configuration vars in Juno
Just like the beginning of every other release, remove the deprecated
config option aliases that were marked as deprecated in Icehouse.

Nova patch - https://review.openstack.org/#/c/88456/

Change-Id: Idd051c516002030e8e191c7b8d31f1ff408e1c7d
2014-04-26 01:45:27 -07:00
Joe Gordon
1cd8efc890 Don't use deprecated nova libvirt conf names
libvirt_cpu_mode was renamed to libvirt.cpu_mode
libvirt_type was renamed to libvirt.virt_type

This patch is needed before I346ee0248c03e60716bd7dc4a5ee4493610867cb can
land.

Change-Id: Ie8a39147ece3a3c86f4b146fa0af3641b1079319
2014-04-17 16:47:28 -07:00
Jenkins
320bf38e34 Merge "XenAPI: Find location for XenAPI plugins" 2014-04-02 18:47:54 +00:00
Adam Gandelman
1bb9ef63c5 Update compute driver name for Ironic
Commit 08448e3a mistakenly updated the location of the Ironic compute
driver to be loaded from within the Nova tree.  However, no such module
exists as the compute and scheduler drivers both live in the Ironic tree.
This reverts that and adds a note explaining the setting.

Change-Id: I7f32f77bd7e5fd1f6b41014ac71bbf6e1a7d84cf
2014-03-31 11:41:54 -07:00
Jenkins
4c0e728780 Merge "Install qemu-kvm instead of kvm package on Ubuntu" 2014-03-28 13:45:55 +00:00
Jenkins
64ccbea8cf Merge "Ironic api-endpoint uses port 6385" 2014-03-28 13:44:50 +00:00
Jenkins
72eebd7865 Merge "Fix wrong compute driver name for Ironic" 2014-03-27 13:49:09 +00:00
Adam Gandelman
b0f8beb8f1 Install qemu-kvm instead of kvm package on Ubuntu
Since at least 12.04, the kvm package is a transitional dummy
package intended to move users to the newer qemu-kvm package.  This
removes the dependency on this dummy package, which will be going away
in 14.04, and instead depends on the proper qemu-kvm package.

Change-Id: I4a88ada3cf32106413a9fae6fe77c9c4c28a524e
Closes-bug: #1294557
2014-03-27 00:18:22 -07:00
Ruby Loo
1117479908 Ironic api-endpoint uses port 6385
The Ironic api_endpoint value in nova.conf (ironic section) is incorrectly
set to port 6358. This sets it to the correct port: 6385.

Change-Id: Ic591588e3480cc25c6e276f11103b7b0007d642a
Closes-Bug: #1297939
2014-03-26 17:19:36 +00:00
Sabari Kumar Murugesan
1a3c3734b2 VMware: Use multiline for cluster_name opt
cluster_name opt for vSphere driver is MultiStrOpt and currently
users are not able to set multiple values from localrc. This is
fixed by using iniset_multiline function.

Thus, new usage would be :
VMWAREAPI_CLUSTER='cluster1 cluster2 cluster3'
where c1, c2, c3 are the name of the clusters

Change-Id: Ie0f3a48614e6134d849050754932a3613363ce66
2014-03-24 15:51:08 -07:00
Bob Ball
348ae44f64 XenAPI: Find location for XenAPI plugins
Plugins can be installed in different places in dom0; re-enable the
use of xapi_plugin_location

Change-Id: If94ec6b250ad5b4f7730cfbf443d937eb85feb5c
2014-03-24 11:11:39 +00:00
Davide Guerri
08448e3a0c Fix wrong compute driver name for Ironic
Change-Id: Ia29e019065476f9884ab3fce4e26fe66700fb02d
2014-03-21 18:19:38 +00:00
Adam Gandelman
ea861741d8 Reuse existing libvirt setup functions for Ironic
When deploying Ironic, make use of the existing libvirt installation
and configuration used by the Nova libvirt driver. Ensures a functional
libvirt setup across distributions.

Change-Id: I904ae2bdd4e8299827270c351eb60b833f90ae75
2014-03-17 16:27:00 -07:00
Jenkins
ad3ac5876b Merge "Move libvirt install + setup to functions-libvirt" 2014-03-16 13:35:51 +00:00
Alexander Gordeev
06fb29c661 Integration testing preparation for Ironic
Add ability to create/register qemu vms for Ironic testing purposes

Implements bp:deprecate-baremetal-driver

Change-Id: If452438fcc0ff562531b33a36cd189b235654b48
2014-03-14 13:44:00 -07:00
Adam Gandelman
0f73ff2c51 Move libvirt install + setup to functions-libvirt
Moves installation and setup of libvirt to a common functions-libvirt,
which can be used by other drivers in the future that may require
cross-distro libvirt installation and config but are not using
VIRT_DRIVER=libvirt (ie, Ironic).

Change-Id: I4a9255c8b4bacd5acfde9b8061c9e537aeea592c
2014-03-13 15:03:55 -07:00
Sean Dague
7d4c7e09b4 remove docker from devstack
with I1c9bea2fdeebc4199c4f7d8fca4580a6fb7fed5b nova removed
docker from it's driver tree.

We shouldn't have driver support inside of devstack that's not
part of upstream projects (this has been a line we've been
pretty clear on with Neutron drivers in the past).

Remove docker driver accordingly.

Change-Id: Ib91d415ea1616d99a5c5e7bc3b9015392fda5847
2014-03-12 08:05:08 -04:00
Sean Dague
dd304603e0 put libvirt debug behind a flag
only turn on the libvirt debugging if we really need it, which
we could control in the gate via devstack-gate.

Change-Id: I5e6d41d5333357608ab6a614610c060400f70a10
2014-03-11 16:38:57 -04:00
Sean Dague
13349080b1 put libvirt debug in the right place
libvirt debug setting was happening in a place where we weren't
actually resetting the daemon. Move it to into the hypervisor
plugin where we do.

Change-Id: Ia79b0ef50f6b8fb007a20ce5cb4e510a5e4600a5
2014-03-10 11:27:23 -04:00
Jenkins
3a07906d90 Merge "Use cat instead of read<file" 2014-03-06 16:24:12 +00:00
Eric Windisch
3d2bdf50bc Use cat instead of read<file
When reading a file, it is expected that
the read process will exit 1 as this is
expected whenever the input reaches an EOF.

Because it is not clear if the 'exit 1' is
from a successful read or a more serious error,
and as this edge-case of 'read' is not well-known,
we instead change this code to read the file using
'cat'.

The new code is moved into a function, is_docker_running.

Furthermore, we now quote the variables and check
for the existance of the pid file for better and safer
error handling.

Change-Id: Idb56b87349a5a84d5d255715cfb7191341363118
Closes-Bug: 1286441
2014-03-04 12:48:45 -05:00
Eric Windisch
a8880cc22c Use glance image-show to check for uploaded Docker images
The behavior of the code being replaced was failing
with '-o errexit' should that, as in the common case,
the image has not been uploaded into Glance.

While we could workaround this using a '|| :', the existing
code also happened to overwrite the DOCKER_IMAGE global
which is used elsewhere. It seemed prudent to either change
this variable name or remove it altogether.

Finally, using 'glance image-show' is more deterministic
than grepping the output of 'glance image-list'.

Change-Id: I23188155966ae9db64259b4a9d25a0d98c63c912
Closes-Bug: 1286443
2014-03-01 00:24:51 -05:00
Jenkins
dad6e4114d Merge "Enforce function declaration format in bash8" 2014-02-28 06:32:20 +00:00
Ian Wienand
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
Attila Fazekas
a42650fb7e Fix libvirt polkit settings
After the https://review.openstack.org/#/c/75314 merged
the /etc/polkit-1/rules.d/50-libvirt-stack.rules files contains
subject.user == '"stack"' instead of
subject.user == 'stack'.

Change-Id: I09f252b2d0e53f012facb9f7eaa21c1e1bdf492b
2014-02-27 13:08:30 +01:00
Jenkins
415893fadd Merge "Add end-of-file checks to bash8" 2014-02-27 04:36:59 +00:00
Eric Windisch
201850120b Make python-guestfs NOPRIME & install for libvirt
The libguestfs dependency tree includes a number
of packages that we may not want or work everywhere, such as fuse.

Now python-(lib)guestfs will install from lib/nova_plugins/hypervisor-libvirt

Change-Id: I6c3a614010ee8d65813eec66a56680def622514c
2014-02-25 22:15:46 -05:00
Ian Wienand
b8e250232e Add end-of-file checks to bash8
Add two end-of-file checks to bash8.  Firstly, alert if heredoc hasn't
finished.  Some heredocs were done like:

---
sudo bash -c "cat <<EOF > foo
...
EOF"
---

(A better way to do this is "cat <<EOF | sudo tee ..." as it retains
the usual heredoc layout in the code).

The trailing quote was throwing the matching in bash8 off and it kept
appending the next file as if it was still part of the heredoc.  To
avoid this, we check if we're still in a heredoc when we start a new
file; if so raise an error and reset the heredoc status fresh.  We
track the state of the previous file, line and lineno so we can give a
good error.

---
E012: heredoc did not end before EOF: 'cat <<EOF'
 - lib/trove: L221
---

This includes fixes for the existing problem heredocs.

A similar EOF check is to ensure the previous file ended with a
newline.

---
E004: file did not end with a newline: '$MY_XTRACE'
 - lib/neutron_plugins/embrane: L40
---

This requires only one fix

Change-Id: I5e547d87b3921fc7ce6588c28f074e5c9f489c1f
2014-02-26 09:31:15 +11:00
Jenkins
293a405450 Merge "Set DEFAULT_IMAGE_NAME for Docker hypervisor" 2014-02-16 00:14:35 +00:00
Jenkins
824fac2cc7 Merge "Optionally enable file injection" 2014-02-15 02:28:09 +00:00
Jenkins
20047053be Merge "Move install responsibilities to domU" 2014-02-15 02:17:20 +00:00
Russell Bryant
5705db6913 Optionally enable file injection
There is a patch up for nova right now that disables file injection by default.
This is a corresponding devstack change that only sets file injection options if
it is enabled in the devstack config.  This is good to keep around so that we
can easily turn it on for testing.

The nova change is id Icff1304fc816acc843f8962727aef8bbbc7bbaa3.

Change-Id: I5015f2c351b1d680c205d7f9a5204febca490b91
2014-02-14 15:28:56 -05:00
Eric Windisch
3f918a4541 Set DEFAULT_IMAGE_NAME for Docker hypervisor
This allows the tempest configuration to set the right
image for booting docker containers with Nova.

Since glance uploads are not yet integrated in devstack,
IMAGE_URLS remains empty.

Change-Id: I5df153cd1d5e1411bb3c11816122ce280148e129
2014-02-12 13:35:00 -07:00
Eric Windisch
97ce935a92 Update docker driver to use a CirrOS image
For purposes of matching the VM image used
in devstack across hypervisors, set the
default container image for Docker to cirros.

This uses the CirrOS image from stackbrew,
the "standard library" for Docker.

Change-Id: I9d767a4e06c5caa7b92ffea25e6a9aeda9bf282a
2014-02-11 11:43:10 -07:00