26 Commits

Author SHA1 Message Date
jianghua wang
78f6c1d70b tools/Xen: failed to install domU in new XenServer
Current install_os_domU.sh depends on some keywords which are changed in the
next version XenServer which is upgraded to CentOS 7. So with the existing
script to install domU in the new version XenServer, it will always fail.
This patch is to make it to be compatible with all XenServer versions:
1. the output format of "ifconfig" is changed; the fix is to use the ip
   command to retrieve IP address.
2. In XS 6.5 and the previous XS, the "xe-guest-utilities" package file name
   is as "xe-guest-utilities_<version>_<arch>.deb" but now it delivers a
   single file for all Arch's and the file name is
   "xe-guest-utilities_<version>_all.deb". In order to make it to be
   compatible, the fix will try to search the old file name pattern by
   default. If it does't exist, then try to search the new file name pattern.

Change-Id: I893e89e42a5ef7dd079b571ea308f318c9befc9e
Closes-Bug: #1494241
2015-09-24 09:07:26 +01:00
Bob Ball
f3b49e23b0 XenAPI: Add another plugin directory
Buildroot on 64-bit systems may use /usr/lib64 to store the XAPI plugins
Add this as an option to search for.

The list is getting of acceptable paths is getting longer but some work is going
on in XAPI to allow us to query for this path, which will mean we can get
rid of this list in future.

Change-Id: I79aafb6a86032c7ab04937c9e9bec08661ecdefa
2014-12-09 17:37:03 +00:00
Mate Lakat
dec5ca0f20 XenAPI: Remove non-used functions
Remove the no-longer used functions that were used to download plugins
to dom0.

Change-Id: I8dfd476781b683a8378efdae45d3cb1b46e7063c
2014-10-29 17:31:45 +01:00
Ian Wienand
62cae13d7e Fix tools/xen/functions for bashate errors
Change I205d675ff231c0403dd135eacc8d57b45317859f modified the matching
for bashate and it has started running on this file, whereas before it
wasn't.  This fixes the errors it is now picking up.

Change-Id: I7876b5c94d90f15e3b0228999c0750bfbebcaa1c
2014-09-04 21:50:06 +10:00
Mate Lakat
d15c8a0824 Move install responsibilities to domU
As we are moving forward to test XenAPI in the gate, it is necessary to
move dom0 related modifications to be performed from domU. For this
purpose, a new user is created, and that user should be used to talk to
dom0 from domU. This change creates that user, makes it possible for
dom0 to log in to domU with that account, and configure that account to
be able to talk down to dom0.

Also move several steps to the nova xenserver plugin:
 - dom0 plugin installation
 - create kernels and images directory
 - install console rotate script
 - configure a cron to execute console rotate script

Configuration changes:
    A new configuration option, DOMZERO_USER has been created, that
    specifies a user account that is configured to be able to do
    passwordless ssh to dom0.

Change-Id: If9de0b297a67b7cdb5de78d8dd0e8b2ca578b601
2014-02-05 13:48:35 +00:00
Mate Lakat
2781f3bfc3 Workaround missing zip snapshot
At the moment, xenserver installation depends on github snapshots.
Unfortunately, git.openstack.org does not have that capability. This
fix includes:

 - Exit with error code, if a download fails
 - create proper urls, even if they are using the git protocol
 - set git base to github - so we are able to do snapshots

Fixes bug: 1259905

Change-Id: I8d0cf8bf8abb16ee0a4b138a6719409c75e7a146
2014-01-07 10:20:37 +00:00
Mate Lakat
2b8814d0ec xenapi: enable user to specify FLAT_NETWORK_BRIDGE
install_os_domU.sh failed, if the FLAT_NETWORK_BRIDGE is found in
localrc. As nova looks up the network by either name-label or bridge
name, it makes sense to enable the user to specify this parameter. As an
example, if the user wants to use name-labels to specify networks, and
those name-labels could be used in domU to create bridges:

VM_BRIDGE_OR_NET_NAME="osvmnet"
FLAT_NETWORK_BRIDGE="osvmnet"

In this case, the domU will know only about a name label, so it could be
decoupled from which xapi bridges used.

This change also adds some fixes (missing double quotes).

Change-Id: I045e367ef441be20c4e8cb8af3c1149392db796b
2013-11-14 11:27:39 +00:00
Jenkins
3072724207 Merge "XenAPI: Get pool default SR rather than "Local storage"" 2013-10-22 12:40:19 +00:00
Bob Ball
83dcf20460 XenAPI: Get pool default SR rather than "Local storage"
Match the nova default of using the Pool default SR as the storage for
VMs

Change-Id: I3b681ae7062ba0db3d9eab70b410b7d9658e37c9
2013-10-14 17:18:02 +01:00
Mate Lakat
9f878cbe6d xenapi: max out VCPU count
Give as much VCPUs to the DevStack machine as possible. First asking
xenapi about its CPU count, and as a fallback, count the CPUs in dom0.
This should result in faster test runs.

Change-Id: I1ffb99ecd435f1d7eb5754fe9cd99f0e8ceae6dc
2013-10-04 09:56:24 +01:00
Mate Lakat
16ed068db5 xenapi: Set VM memory before starting it
If someone was re-using an existing template, for a memory change, he
needed to re-install the vm. This change sets the osdomu mem before
starting it, so it doesn't matter how much memory did the VM had
according to the template. It also removes the memory manipulation bits
from install-os-vpx.sh.

Change-Id: Iad85f573b90c23140012c20c552a17277d9c97a0
2013-08-30 14:21:10 +01:00
Mate Lakat
abe56ee90f xenapi: Setup and Rotate text console logs
This patch installs the cronjob that rotates/sets up the text console
logs of the guests.

Related to blueprint xenapi-server-log

Change-Id: Ie4c778b54f69519fbb80aa0d9822383f55a1e2f9
2013-07-24 16:54:55 +01:00
Jenkins
25d3ecf23e Merge "xenapi: xe network-attach for OVS bridge creation" 2013-07-15 15:03:22 +00:00
Jenkins
0ee1367a6d Merge "xenapi: Exit immediately if zipball download fails" 2013-07-15 14:03:27 +00:00
Euan Harris
6f0017161f xenapi: Exit immediately if zipball download fails
If install_os_domU.sh fails to download the Xapi plugins zipball
correctly it ignores the error and continues the installation.
This could damage the hypervisor's filesystem, as it may delete
files or overwrite them with garbage.

Change-Id: I9f6dc31b977592e2818e37b2d310c2a5dc477364
Fixes: bug #1195640
2013-07-11 12:05:44 +01:00
Mate Lakat
d8511034e6 xenapi: xe network-attach for OVS bridge creation
For Neutron we need an additional OVS bridge to be present. The xe
network-create command did not create the bridge immediately. A
workaround was applied to attach a network interface to that network,
forcing xapi to create the underlying OVS bridge. It turned out, that
the xe network-attach command could be used instead, so the workaround
is removed and replaced with the proper solution by this patch.

Fixes bug 1197305

Change-Id: I10cc763531b71238f0bc12a12de985f8f35d7e27
2013-07-10 15:48:52 +01:00
Euan Harris
12229a77a5 devstack: Add paths specific to XenServer Core
* XenServer Core keeps its Xapi plugins in a different path to XenServer,
   in order to comply with the Filesystem Hierarchy Standard.

 * XenServer Core mounts devices under /dev/xen/blktap-2 in dom0,
   whereas XenServer mounts them under /dev/sm.

Change-Id: I0a66cd03f000f19c8ff63a8ae4231c00fda88380
2013-07-10 14:05:22 +01:00
Jenkins
cf225101fb Merge "Create the /images directory used by the resize functionality." 2013-06-27 20:45:46 +00:00
Bob Ball
39aeda23b2 Create the /images directory used by the resize functionality.
XenServer's resize uses /images as a known-path for each hypervisor.
This is a symlink to the storage repository so disks can be moved between
the /images path and the storage repository efficiently.

Change-Id: I13b39dbf5537ad45160c1af4cc10bd867b7f89c1
2013-06-24 10:51:42 +01:00
Mate Lakat
5a56cd6283 xenapi: Cleanup networking
OpenStack VM had 4 interfaces, from which eth0 was connected to HIMN (Host
Internal Management Network), and not used at all. The reason for not
using this interface according to johngarbutt is:
 - VNC console would not work
 - migrations would not work
 - many other things
This change removes the interface, thus devstack is providing the
same architecture as described in the official documentation, YAGNI
applied on the HIMN:

    http://goo.gl/dmrNF

The change also modifies some defaults, so it's easier to get started:
 - The Ubuntu VM is network-installed through the management network
 - OS VM is getting its address on the management network through DHCP
 - Default Public IP addresses aligned to stack.sh defaults
 - OS Services are listening on Management Interface

Related to blueprint xenapi-devstack-cleanup

Change-Id: I73c9751ade6f4786b8b682a1994cb87f0a624379
2013-06-20 14:43:14 +01:00
Mate Lakat
8ff33ce75f xenapi: kernel_cmdline moved out from template
The kernel's cmdline was set during the initial devstack machine
installation. Thus, during second runs, the kernel's cmdline was not
updated. This patch extracts append_kernel_cmdline, and configures
domU's kernel cmdline every time. As some networking parameters are
passed through the kernel cmdline, this patch makes it possible to
change the network configuration, even if a cached devstack exists.

Related to blueprint xenapi-devstack-cleanup

Change-Id: I3b7175f4e83326c3e28825ac50625f6bd2a9a029
2013-05-31 10:45:46 +01:00
Mate Lakat
f652e0fb6d xenapi - quantum: L2 agents for dom0 and domU
This patch makes it easier to support the all-in-one installation of
XenServer with Quantum:
- separate agents for domU and dom0 openvswitches. The domU agent's name
  is "q-domua", and the dom0 agent is called "q-agt"
- create a physnet1 physical network to connect those openvswitches

Note: This patch depends on the quantum patch:

    https://review.openstack.org/15022

For a diagram, see:
    http://goo.gl/BuAdg

Change-Id: Iff851438553528b9051edd380ecbb2c0415cbf78
2013-05-24 18:23:53 +01:00
Mate Lakat
9e32677927 xenapi - cleanup network configuration
The Xenserver/XCP part of devstack was configuring the hypervisor's
connectivity to the outer world, by adding VLANs, and physical
interfaces to the virtual networks. It added a lot of complexity, and
made it hard to get started with XenServer. This patch removes that
extra complexity, so it is left as an exercise for the user.

Related to blueprint blueprint xenapi-devstack-cleanup

Change-Id: If3367335c3da8621d0afe1f6cae77511fbdbb3e2
2013-05-24 12:07:56 +01:00
Mate Lakat
8644676846 xenapi - use management network to reach OS VM
Devstack used the HOST_IP_IFACE to reach the OpenStack VM through ssh.
This patch changes this behavior, so that the IP address of the
interface connected to the management network will be used.

Related to blueprint xenapi-devstack-cleanup

Change-Id: I7f34d973870792d60a33ea512901d9b0d422150b
2013-05-12 18:41:40 +01:00
Mate Lakat
fe586b1cbe xenapi: /boot/guest should point to local SR
Fixes bug 1037516

This patch creates a directory os-guest-kernels inside the local SR, and
sets up /boot/guest to be a symlink to that directory. This way
OpenStack won't pollute Dom0's filesystem.

Change-Id: If8dfe24355bd782a401fed0f2c4b423efd9c11ba
2013-04-03 15:33:33 +01:00
Mate Lakat
57e3da9b76 xenapi: Extract plugin installation functions
This change extracts the plugin installation functions, and covers the
extracted functions with tests. Use:

    ./test_funtions.sh run_tests

to run the tests.

Change-Id: I1d78d9e8cc4d52ee2df83d07e4c74dda4805f21a
2013-03-25 15:12:58 +00:00