45 Commits

Author SHA1 Message Date
Kevin Zhao
551848dd69 Fix devstack default settings in aarch64
1. Lack qemu-efi in ubuntu
2. Lack edk2.git-aarch64 in Fedora/Centos
3. Remove NOVNC disable.

Change-Id: Ifbd0c386df6b28bc64cef20cab8e08f99a85c782
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2020-05-11 08:24:54 +00:00
Ian Wienand
9b8b7021d0 Fedora: install python3-libguestfs
All platforms are python3 now

Change-Id: Ie9f4c7e52f23a45bb8cf70a5fddf1b21a40d7000
2020-04-16 13:03:56 +10:00
Carlos Goncalves
8dd6f153d6 Add LIBVIRT_CPU_MODE to set CPU mode
In same cases, the hypervisor presents to the guest OS a named CPU model
is similar to the host CPU and adds extra features to approximate the
host model. However, this does not guarantee all features will be
precisely match.

This patch adds LIBVIRT_CPU_MODE to allow users to define the CPU mode
they want to use, for example "host-passthrough".

Change-Id: I83792c776b50d1d22584be2a37cc6a166f09c72b
2020-01-20 14:16:12 +01:00
Stephen Finucane
248d4bb8d2 Stop configuring '[DEFAULT] firewall_driver' for nova
This option has default to the 'NoopFirewallDriver' for some time and
will soon be removed. Stop configuring it entirely.

Change-Id: I4dbc0015cf26d7edf51d0d5fd978ccd3a1ad1b79
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-16 09:27:54 +00:00
jianghua wang
843b039b3c Use the renamed vnc options
As the following commit has renamed the two vnc options; let's
use the new options in devstack:
https://review.openstack.org/#/c/498387/

Change-Id: Id125666814ea9bb8a22b579aee0f6bc1c65ade80
2017-10-13 07:25:43 +00:00
Dirk Mueller
a6467d36db Prepare guestfs-support for openSUSE
With libguestfs usage for file injection now being enabled by
default as part of I568c56dbcb62ec541661364c142eff2397e3eed7
the opensuse job started to fail due to lack of guestfs images
being available.

The error in question was
NovaException: libguestfs installed but not usable (cannot
find any suitable libguestfs supermin, fixed or old-style
appliance on LIBGUESTFS_PATH (search path: /usr/lib64/guestfs)

This part is being fixed by explicitly adding the missing package
dependencies to the compute node rpm package list while the maintenance
update for Leap 42.2 is in preparation.

Change-Id: Ie76ac0a51c1ee2ad6559917825dee1c7a91a3a76
2017-07-18 11:32:02 +02:00
Andrea Frittoli
1c442eebc8 Fix libguestfs on Ubuntu
libguestfs does not work on ubuntu because the kernel is not
world readable. This breaks file injection with libvirt.
See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725
for more details.

The workaround proposed by Ubuntu is to relax the kernel ACL
if needed, so we need to do that in case file injection is
enabled on an Ubuntu host running libvirt.

Partial-bug: #1646002
Change-Id: I405793b9e145308e51a08710d8e5df720aec6fde
2016-12-01 17:00:41 +00:00
Matt Riedemann
14cb490d1e nova: stop setting deprecated use_usb_tablet option
The use_usb_tablet option is replaced by the pointer_model
option.

Depends-On: Id18b5503799922e4096bde296a9e7bb4f2a994aa

Change-Id: Ic2a49f88df988c6404c1c72e9ee28a487e4f7908
2016-09-13 15:51:23 -04:00
Matt Riedemann
6390d5ef82 libvirt: install python-guestfs when ENABLE_FILE_INJECTION=True
There is a bit of a weird history here, but the net is we're not
installing python-guestfs when ENABLE_FILE_INJECTION is set, which
it is in the gate-tempest-dsvm-neutron-full-ssh job, which makes
file injection (personality) tests fail.

The history:

Commit 0ae942b41c6dcd0fe7353e7d68574194fb72a66d moved installing
python-guestfs to the hypervisor-libvirt file and it was conditional
on a flag to enable file injection and the backing distro.

Commit a3c94468baa159840a47c34cf94d97d816208313 removed the ability
to configure nova for file injection, which never made any Tempest
tests fail because we didn't have a job that tested file injection
with ssh, which is what gate-tempest-dsvm-neutron-full-ssh does.

Commit 6d3670a65280d71529f8aad8ca5a0422abffebd0 added the ability
back to enable file injection and the gate-tempest-dsvm-neutron-full-ssh
job uses it, but missed added the condition back in from 0ae942b41
which installed the python-guestfs package. This change adds that
back in.

Change-Id: I1c1ef093b70007100646c086dc5724cd64751d00
Closes-Bug: #1622649
2016-09-12 11:35:22 -04:00
Jenkins
88c1a7715d Merge "Add a way to enable file injection for nova/tempest" 2016-08-09 11:43:39 +00:00
Jenkins
be0f207007 Merge "nova: remove explicit file injection being disabled" 2016-08-09 10:39:39 +00:00
Kevin Zhao
5d7992a018 Modify the default cpu-mode for aarh64 in Libvirt
For AArch64, KVM don't recognize the cpu-mode "none",
so change the default cpu-mode as host-passthrough for
generating nova.conf

Change-Id: I94a22e5a15a974b9c11e9f9fd996857453b6e2ca
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2016-07-20 00:20:38 +08:00
Matt Riedemann
6d3670a652 Add a way to enable file injection for nova/tempest
File injection is disabled by default for the libvirt
driver in nova. This adds a variable to enable file
injection for the libvirt driver and is also used
to configure tempest.conf for running personality
tests.

Change-Id: I34790fadeffd6e3fdc65bd9feed3d6e62316896c
Related-Bug: #1598581
2016-07-03 19:40:25 -04:00
Matt Riedemann
9079a40e9e nova: remove explicit file injection being disabled
Change 9ce99a44cf85e431227536e2251ef05b52e61524 disabled file
injection with the libvirt driver by default back in Icehouse,
so devstack doesn't need to do this explicitly anymore.

Change-Id: Id0c521f6f624367bd497463c8c2d99488548fcff
2016-07-03 19:20:27 -04:00
Matt Riedemann
9278eb78df Move setting lvm libvirt configs to hypervisor-libvirt
When the nova backend is LVM we set some libvirt configs
in nova.conf. Those should happen in the libvirt plugin
file rather than the generic nova file since it's specific
to running nova-compute with libvirt.

Change-Id: I37a63a5fba2e9eea4daafe4ec390b2e7aac236f3
2016-05-18 13:38:38 -04:00
Mahito OGURA
cf4f76299f Update the vnc config options group 'DEFAULT' to 'vnc'
n-api log output WARNINGs that vnc config options group 'DEFAULT'
is deprecated. New vnc config options group is 'vnc'.
This is change of Nova.[1]
This patch changes the vnc config options group 'DEFAULT' to 'vnc'.

[1] https://bugs.launchpad.net/nova/+bug/1447528

Change-Id: If54f750bac83298e90bdca27b5992fe2e5fbb712
Closes-Bug: 1483583
2015-12-14 06:40:23 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Sean Dague
6bf1f1fb33 use ext4 for guest default ephemeral
this isn't upstream default because of compatibility questions
with really old host on providers. However there is no reason not
to do it in devstack.

Change-Id: I6438c0efb297cfa5d3dbb5f00701b24f01c39d14
2014-02-01 17:05:18 -05:00
Steven Dake
d5a5460888 Revert "Change the libvirtd log level to DEBUG"
Suggested by Daniel Berrange in this thread:
http://lists.openstack.org/pipermail/openstack-dev/2014-January/024407.html

This reverts commit 3bd85c9d6e257fc952cb3c6d0c09e199685bd5ed.

Change-Id: I370ba61cf8a00b51684cd504fed4ba4078d868be
2014-01-15 10:58:21 -07:00
Ken'ichi Ohmichi
3bd85c9d6e Change the libvirtd log level to DEBUG
Gate tests fail sometimes due to libvirt problems, but it is difficult
to investigate their reasons or workarounds because there is not any
log about libvirt.
This patch changes the log level of libvirtd to DEBUG for investigating
libvirt problems.

Change-Id: Ib6559ff978fa813d0332f2339d241dd3437196ee
Related-Bug: #1254872
2013-12-26 01:53:17 +09:00
Stephan Renatus
e578effb33 Make use of STACK_USER instead of relying on USER
Quite easily one ends up calling ./stack.sh in an environment that,
albeit being user "stack" (for example), doesn't quite meet the
expectations of devstack.  The errors that follow can be rather hard to
track down, as the dependency on `USER` is not mentioned.

To remedy this situation, this commit

- uses STACK_USER instead of USER and
- mentions that dependency in the script headers of lib/*

Change-Id: If4cdc39b922ea64b4c0893a0e695ec06349fccc5
2013-11-19 13:39:58 +01:00
Sean Dague
101b424842 fix whitespace in the rest of lib/*
this brings this in line with bash8 checker

Change-Id: Ib34a2292dd5bc259069457461041ec9cd4fd2957
2013-10-22 13:02:23 -04:00
Dean Troyer
8c032d1635 Convert remaining hypervisors to plugin model
Convert BareMetal, OpenVZ, PowerVM hnd libvirt ypervisor configurations
in Nova to the new plugin setup.

Change-Id: I47d744a2c9fdda0771f5b473ec3b26fb099f7439
2013-10-11 11:30:56 -05:00