114 Commits

Author SHA1 Message Date
Ian Wienand
523f488036 Namespace XTRACE commands
I noticed this when debugging some grenade issues failures.

An include of grenade/functions stores the current value of XTRACE
(on) and disables xtrace for the rest of the import.

We then include devstack's "functions" library, which now overwrites
the stored value of XTRACE the current state; i.e. disabled.

When it finishes it restores the prior state (disabled), and then
grenade restores the same value of XTRACE (disabled).

The result is that xtrace is incorrectly disabled until the next time
it just happens to be turned on.

The solution is to name-space the store of the current-value of xtrace
so when we finish sourcing a file, we always restore the tracing value
to what it was when we entered.

Some files had already discovered this.  In general there is
inconsistency around the setting of the variable, and a lot of obvious
copy-paste.  This brings consistency across all files by using
_XTRACE_* prefixes for the sotre/restore of tracing values.

Change-Id: Iba7739eada5711d9c269cb4127fa712e9f961695
2015-11-27 15:36:04 +11:00
Sean Dague
7860f2ba31 install ebtables locking workaround
ebtables is racing with itself when nova and libvirt attempt to create
rules at the same time in the nat table. ebtables now has an explicit
--concurrent flag, that all tools must opt into to prevent ebtables
from inherently being unsafe to run.

libvirt gained this support in 1.2.11, which is too new for our ubuntu
primary testing environment. Nova still hasn't added this support,
though even if it did, we'd run into the issue with libvirt.

We can do the most ghetto thing possible and create a wrapper for
ebtables that does explicit locking on it's own. It's pretty terrible,
but it should work. And it is the kind of work around that people
unable to upgrade libvirt will probably need to do.

This is an opt in value which we should set in the gate to True.

Related-Bug: #1501558

Change-Id: Ic6fa847eba34c21593b9df86a1c2c179534d0ba5
2015-11-18 10:59:50 -05:00
Hirofumi Ichihara
508931ff36 Remove Ubuntu 14.10 as supported distribution
Ubuntu 14.10(utopic) reached end of life[1].

[1]: https://lists.ubuntu.com/archives/ubuntu-announce/2015-July/000197.html

Change-Id: Iab13ca797bda56462d9d117aa500d3ba0d9bebcb
2015-11-02 17:50:31 +09:00
jianghua wang
797668ba77 XenServer: the cron job shouldn't print debug text into stderr
one cron job attempts to print debug text into stderr; so the file
of /root/dead.letter gets created and its size grows continuously.
It could eventually threaten dom0 disk space. Maybe there are two
solutions: one is to redirect the output to a specific log file;
and rotate log files in the script. And the other one is simply
to redirect the output /dev/null. By considering the function of
this cron job and the printed contents are straight and simple,
this patch set goes with the later solution.

Change-Id: I4875e5e3837e6f0249e314c6c5f408c79145c6c1
Closes-Bug: 1503966
2015-10-08 06:56:25 +01:00
Aaron Rosen
bd5e6b1659 Remove unnecessary execute permissions
These files have acquired execute permissions that
are not strictly necessary because they are being 
sourced, and not intended to be run separately.

Restore to 644

Change-Id: I0b8654123416a07521502b61610ca45c94494a07
2015-10-01 21:01:35 +00:00
Gary Kotton
54616845df VMware: remove configuration integration_bridge from nova
There are a number of different neutron plugins that work with the
VMware nova driver. If necessary this flag can be set by each plugin
if necessary.

Change-Id: I47ac2a5c71ff573f474d45b85a523fc243ec3ade
2015-09-08 21:39:20 -07:00
Jenkins
d9b425df06 Merge "libvirt virt_type=parallels support enchancement" 2015-07-21 04:58:31 +00:00
Maxim Nestratov
e6f37b91e5 libvirt virt_type=parallels support enchancement
As soon as Parallels Cloud Server/Virtuozzo is based on CloudLinux distribution
this new rpm kind of distribution is introduced.
Also we setup vnc and set vnc_encoding parameter to None as soon it isn't
supported by parallels.

Change-Id: Ib97a09f397f950227498cfc2ce162d19b700f6f4
2015-07-15 11:59:53 +03:00
Dirk Mueller
a3c94468ba Remove support for enabling file injection
File injection is disabled in nova meanwhile, and devstack core
reviewers think it shouldn't be configureable in devstack anymore.
This basically reverts https://review.openstack.org/#/c/70560/

Change-Id: Ia7dd407da00c0b1c9641865aea1f7b74533d7357
2015-07-13 09:57:33 +02:00
Ian Wienand
614ca26b47 Install qemu-kvm package on centos/fedora
Change I79a8d8ac7ad2fbd7d2fce696821d130218e43e03 removed the install
of python-libguestfs, which was actually hiding a dependency issue on
Centos.  The "kvm" package is ultimately missing some bios files from
"seabios-bin" -- however with python-libguestfs installed this was
coming in via a dependency chain that pulled in qemu-kvm, which has
the dependency.

qemu-kvm is not strictly required as all the functionality is within
qemu-system-x86.  But while we get [1] sorted out this restores the
job functionality.

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

Change-Id: I3379bc497978befac48c5af0f1035b96d030b7eb
2015-06-26 14:45:04 +10:00
Dirk Mueller
0ae942b41c Only install python-libguestfs bindings when needed
Currently those bindings are missing from SLES12, and since
they're not actually used unless file injection is enabled
(which is not by default), only conditionally depend on it.

Change-Id: I79a8d8ac7ad2fbd7d2fce696821d130218e43e03
2015-06-23 12:22:21 +02:00
Ian Wienand
3380a16974 Disable firewalld always
We've bike-sheded over this before
(I5252a12223a35f7fb7a4ac3c58aa4a3cd1bc4799) but I have just traced
down further issues to firewalld with neutron+ipv6 (see the bug).

In fact, as mentioned in the comments, RDO disables firewalld and the
neutron guide says to disable it [1].  The force flag is left if
anyone really wants this; but nobody is testing (or, as far as I can
tell, working on) this so bring devstack back into line and disable it
always.  Note we do not remove the package; as has been found in the
puppet scripts this can lead to dependency issues.

[1] http://docs.openstack.org/developer/devstack/guides/neutron.html

Change-Id: Ief7cb33d926a9538f4eb39c74d906ee0c879de35
Partial-Bug: 1455303
2015-05-15 19:14:19 +10:00
Clark Laughlin
fcc3f6ee98 Add support for arm64 images
This patch enables proper support for arm64 images by disabling VNC support
and adding several properties to the image in glance that are necessary to
boot correctly:
  hw_cdrom_bus=virtio
  hw_machine_type=virt
  os_command_line='console=ttyAMA0'

Change-Id: I68c9a5e0e083af2f92875c3bdf70df750f6e4d8f
2015-04-09 08:55:56 +00:00
Sean Dague
60996b1b60 introduce pip_install_gr
This creates a new pip_install_gr that installs from global
requirements allowed versions. Now that stable branches are getting
capped all of devstack needs to be fixed to do things like this.

Change-Id: I8fd0ef2bfc544ca2576fab09d3018f760b8848fe
2015-04-08 10:28:17 -04:00
Andrew McDermott
bcef63ed43 Update qemu package name for Ubuntu aarch64
The qemu-system package, and not qemu-kvm, should be installed on either
trusty- or utopic-based ARMv8 (aarch64) Ubuntu releases. Additionally,
libguestfs is not available so that is not installed.

No changes are required for vivid.

Change-Id: Id9dc1fc465bd7acab17c991c292fb531016758ad
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
2015-04-05 17:10:32 +00:00
Jenkins
0f173a4821 Merge "Update libvirt cpu map before starting nova" 2015-04-03 20:21:21 +00:00
Kashyap Chamarthy
d3cfb82c65 functions-libvirt: Enable DEBUG_LIBVIRT config attribute by default
Enabling it by default because:

  - This allows you to get the relevant logs right away when something
    in the libvirt code path fails, without having to submit another
    change and keep doing a 'recheck' to re-run the CI check/gate jobs
    until you hit the bug.

  - The libvirt log filters specified in the function
    'configure_libvirt' are much more _selective_ and not a catch-all
    debug option where you end up with the unhelpful situation of having
    to find a "specific piece of hay in a haystack"[1].

FWIW, I always have it enabled in local test environments, and I don't
see the resulting libvirtd.log growing beyond a couple of MB for
three-four days of usage.

[1] http://lists.openstack.org/pipermail/openstack-dev/2014-January/024414.html

Change-Id: I5e0b35446075b419fe473e1db8d0bfedd7009741
2015-04-01 12:05:07 +02:00
Clark Boylan
edd6048168 Update libvirt cpu map before starting nova
We are trying to get a working 64bit qemu cpu model in the gate for nova
live migration testing. It appears that we need to make this change
prior to nova starting.

Make the change in configure_libvirt() to handle this along with the
other libvirt config updates. This allows us to restart the libvirt
service once. This function calls a python tool which parses and updates
the XML if necessary.

Change-Id: I00667713bfba67ab8cedbcb1660ff94d4f4bcc07
2015-03-31 15:06:30 -07:00
Kashyap Chamarthy
ae7b4f9b9e functions-libvirt: Enable 'qemu_monitor' logging filter for libvirt
A lot of libvirt interactions with QEMU are via the QEMU monitor
console, which allows you to either query or modify the state of a
virtual machine. Spefici examples include: querying the status of live
block operations, live snapshot operations, live migration, etc.

Enabling the 'qemu_monitor' log filter allows us to capture precisely
what commands libvirt is sending to QEMU.

Note that the log level was intentionally set to '1' (i.e. debug) for
this specific filter, because (a) it's not extremely verbose, (b) when
something breaks, it's helpful to have the exact sequence of
interactions between libvirt and QEMU.

Change-Id: Iba95b6bd7c9f197c8d48c7d978f538e50d4e31fa
2015-03-31 21:35:05 +02:00
Sean Dague
206c596d69 add back python-guestfs
This is needed otherwise we fall back to the nbd code path which is
super hacky. This shouldn't have been deleted for the venv path.

Change-Id: If5cb6cb4944bd0ed3548d53c98443b76725d1c0c
2015-03-30 13:56:11 -04:00
Jenkins
9720239618 Merge "Install Nova into its own venv" 2015-03-27 17:34:10 +00:00
Dean Troyer
4533eeec1f Install Nova into its own venv
Install a couple of optional feature prereqs in hypervisor plugins.

rootwrap is horribly called indirectly via PATH.  The choice, other than fixing
such nonsense, is to force the path in sudo.

TODO:
* python guestfs isn't in pypi, need to specifically install it to not
  use the distro package

Change-Id: Iad9a66d8a937fd0b0d1874005588c702e3d75e04
2015-03-26 14:54:00 -05:00
Adam Gandelman
de77c471f3 Make ironic's service check flexible
We currently assume we are deploying ironic with the rest of
a cloud and assert that glance/neutron/nova are enabled. This
makes it a bit more flexible and allows deploying with only
the minimum required services if desired, and asserts the others
are enabled when we intend on testing nova+ironic integration.

This is required for in-tree python-ironicclient functional tests,
which we aim to run against a minimal devstack deployment.

Change-Id: I99001d151161fa225b97c3ba6b167a61aa9b59fe
2015-03-11 17:17:49 -07:00
Attila Fazekas
1f316beb20 Remove rhel6 and py26 support
el6 is shipped with Python 2.6.x which is not expected
to be supported with the openstack kilo release.

For el6 support we need to do lot of thing differently,
which makes the code more complicated.

This change removes el6 and py26 support from devstack.

This change also removed a discontinued (1 year ago)
openSUSE 12.2 code path, which used a similar codepath as el6.

Several comment related to el6 also removed or modified.

Change-Id: Iea0b0c98a5e11fd85bb5e93c099f740fe05d2f3a
2015-01-27 09:22:52 +01:00
Jenkins
b3e38cf295 Merge "Avoid VM configuration with Ironic hardware mode." 2015-01-21 08:12:25 +00:00
Zhongyue Luo
37026f5366 Avoid VM configuration with Ironic hardware mode.
If "IRONIC_HARDWARE" is True, VMs are not required when using Ironic.

Change-Id: I33ba294f1e2ea583cd4c24c392637a4ee60a39ab
2015-01-16 08:36:08 +08:00
Sean Dague
537532931d Make changes such that -o nounset runs
This makes a bunch of variable cleanups that will let -o nounset
function, for the time being we hide nounset behind another setting
variable so that it's not on by default.

Because this is bash, and things are only executed on demand, this
probably only works in the config it was run in. Expect cleaning up
all the paths to be something that takes quite a while.

This also includes a new set of unit tests around the trueorfalse
function, because my change in how it worked, didn't. Tests are good
m'kay.

Change-Id: I71a896623ea9e1f042a73dc0678ce85acf0dc87d
2015-01-15 13:06:14 -05:00
Bob Ball
be485221b3 XenAPI: Simplify installed packages
Remove duplicate packages.
pip is handled by devstack, so don't try and install it here.

Change-Id: I6f22e0f86ae071d30bf69de9ed5dec6b28ebc92b
2014-12-12 13:14:46 +00:00
Jenkins
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00
Sean Dague
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
Jenkins
7adfe91ca6 Merge "libvirt plugin "parallels" support" 2014-12-07 18:17:46 +00:00
Sean Dague
2f8e08b572 remove nova baremetal driver support
This has been deleted from the nova tree, we should purge it from
devstack, as it will not work any more.

Change-Id: I20501fec140998b91c9ddfd84b7b10168624430a
2014-12-05 08:31:16 -05:00
Jenkins
ca7aa301b2 Merge "Move sgabios setup to hypervisor-ironic" 2014-11-26 15:41:54 +00:00
Evgeny Antyshev
19354585e1 libvirt plugin "parallels" support
We're in the process of establishing the CI testing with
Parallels Cloud Server plugin for libvirt.
Currently we use local clone of devstack in our infrastructure,
but we want to switch to upstream

requires extra customization of nova.conf and glance-api.conf:
nova.conf should have "images_type" and "connection_uri"
defined, and glance-api.conf to have "ploop" in disk formats

Implements: blueprint pcs-support
Change-Id: I0b073359fda8b4531cae7b8946eb52a561c82857
2014-11-26 19:04:28 +04:00
Adam Gandelman
9eb8177eb7 Move sgabios setup to hypervisor-ironic
This moves setup of sgabios ROM to the ironic hypervisor library.
This is failing to backport to juno because of an error in the sideways ironic
grenade. install_ironic() is expected to setup only python things and happens
earlier than initial package installation.

Fixes-bug: #1396352
Change-Id: I75f0052045143571619e6712d57014228abf7a20
2014-11-25 22:22:36 +00:00
Adam Gandelman
a1ffcfab47 Set libvirt live_migration_uri
Sets up n-cpu to migrate domains via SSH.  By default, hosts attempt
to connect to each other as root, so this specifies STACK_USER instead.

Change-Id: Ic6e868091c89a2cc6b2f0fada3f7e95002aaff8b
2014-11-20 16:42:32 -08:00
Adam Gandelman
4b45fca7bb Do not hardcode ironic svc port, protocol
The Ironic API server's port and protocol are hardcoded in various
places.  This updates the ironic bits to use configured values instead
and fixes a bug around iptables rule creationl.

Change-Id: I1ace68affff3afdbc0058be4d32f8044a24e9338
Closes-bug: #1393498
2014-11-18 11:57:20 -08:00
Jenkins
e5dbec252a Merge "Fix docs build errors" 2014-10-08 22:14:51 +00:00
Dean Troyer
3324f19f5a Fix docs build errors
Fix shocco errors during docs generation

Closes-Bug: 1362691
Change-Id: I2b7fb008c89f0b4e7280b2d0a054320765e83e47
2014-10-02 15:30:50 -05:00
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