154 Commits

Author SHA1 Message Date
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
085abd8eb7 Fix xenapi functions' tests
The tests got outdated, this fix makes the tests pass again.

Change-Id: Iadddfbf34bf79ba455811645e766c2f3d0fcca84
2014-01-07 10:20:37 +00:00
Bob Ball
60fcfb5c91 XenAPI: Fix bug with Xen ext4-using guests
Ubuntu saucy is using ext4, which means it hits a barrier
bug with certain versions of Xen, leading to a read only
filesystem.

This is bug https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089

Change-Id: I9a72b203d473dc555324d44ad7c240c80dccda15
2013-12-23 17:23:47 +00:00
Jenkins
bc22aeb4bc Merge "XenAPI: Update DomU to Ubuntu Saucy" 2013-12-21 12:26:47 +00:00
Jenkins
39807f4616 Merge "XenAPI: Increase DomU's memory" 2013-12-10 15:24:06 +00:00
Jenkins
c2fb94453d Merge "xenapi: display IP and DevStack result on console" 2013-12-09 14:28:29 +00:00
Bob Ball
57bf097e5a XenAPI: Increase DomU's memory
Devstack has been increasing in complexity, and if we use too
much of our memory it can lead to fragmentation which in turn
causes a DomU error and a failure of random tests.

Change-Id: Ide9cc84625caed4e35a64a47ee1e92a6cd567651
2013-12-09 14:15:19 +00:00
Jenkins
e9ca36b3d9 Merge "xenapi: enable user interaction with stack.sh" 2013-12-05 02:30:36 +00:00
Bob Ball
9a48a351fb XenAPI: Update DomU to Ubuntu Saucy
Driven by a race condition in LVM being hit in the tempest
tests.  This is a locking race between a file lock and a
semaphore which is fixed in 2.02.96-5.

Change-Id: I8a8c215c90a0602288292ffd06b7694d2db6219e
2013-12-04 23:13:57 +00:00
Jenkins
8097838ab1 Merge "Switch the base URL to git.openstack.org" 2013-12-02 19:04:08 +00:00
Steve Kowalik
047cac56e1 Switch the base URL to git.openstack.org
The git repositories on github for openstack are mirrors of the primary
repositories, which are hosted on git.openstack.org, so switch as much
as I can to using the primary, rather than the github mirror.

Change-Id: Idcfda49a691582055256b830c61e098f4a271339
2013-11-16 20:11:35 +11: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
Mate Lakat
8787e0fd0c xenapi: always reset JeOS's network
If the JeOS template contained an exotic network configuration, the VM
prep step might fail. This patch resets the networking of the VM before
starting it.

Fixes bug 1245607

Change-Id: I921f1fdd0709d7a7760c4bb165e32f3898098bff
2013-10-28 18:19:17 +00:00
Sean Dague
0b865a55f2 final bash8 files for the rest of devstack
With this devstack/master is bash8 clean, and ready for enforcement

Change-Id: I03fc89b401e6b7a23224d71472122c1bfa3ad0bd
2013-10-22 13:06:18 -04:00
Jenkins
3072724207 Merge "XenAPI: Get pool default SR rather than "Local storage"" 2013-10-22 12:40:19 +00:00
Jenkins
ffae1057ae Merge "xenapi: max out VCPU count" 2013-10-14 18:14:13 +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
Jenkins
a4664a2c07 Merge "XenAPI: Get the management network dynamically" 2013-10-08 15:00:55 +00: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
Jenkins
7255659a55 Merge "xenapi: increase default memory to 3G" 2013-10-03 21:10:28 +00:00
Mate Lakat
bfb880d547 xenapi: increase default memory to 3G
Devstack was swapping with 2G

Change-Id: I8fe77591cb0ca0f946028d7219b43d77eea3419f
2013-10-02 17:44:18 +01:00
Bob Ball
78ef1f3b2c XenAPI: Get the management network dynamically
xenbr0 is correct for most installations, but not all.  Notable xenserver-core
may use a differently named device.  Since we can auto detect this, remove the
config and do so.

Change-Id: I989f6ddd5ffb526ab350f263ef6fc402c596304a
2013-09-30 16:00:40 +01:00
Mate Lakat
53d6fa604d xenapi: set dhcp timeout on VM installation
Set the DHCP timeout to 120 seconds during virtual machine installation.
Some users failed to run devstack, due to a low DHCP timeout setting.
The default value is 60 seconds. This change sets the value to 120 secs,
that should give enough time for most people.

Change-Id: I15fde45ed0d005c1a8621134eee6c3c338b5be5d
2013-09-27 12:30:28 +01:00
Jenkins
0319ea5271 Merge "xenapi: Get rid of prompt settings" 2013-09-26 14:55:28 +00:00
Mate Lakat
da481d0d0a xenapi: display IP and DevStack result on console
The devstack setup service can update /etc/issue, displaying the status
of the installation and the VM's management IP. With this change, after
the devstack service finsihed, the login prompt will look like this:

OpenStack VM - Installed by DevStack
  Management IP:   10.219.3.108
  Devstack run:    SUCCEEDED

DevStackOSDomU login:

This helps people to log in to their system.

Change-Id: Idd6bbd5faf9ced5618cd3e95191bfc3b89473fa2
2013-09-26 14:06:07 +01:00
Jenkins
b31daba802 Merge "Replace OpenStack LLC with OpenStack Foundation" 2013-09-25 20:58:34 +00:00
Mate Lakat
93f3b8693a xenapi: enable user interaction with stack.sh
In XenServer, devstack runs inside a virtual machine. This makes it hard
for the user to interact with stack.sh should a parameter be missing.
This change will create an upstart job (devstack) that runs
stack.sh with console enabled so user can interact with it by running
vncviewer or using XenCenter.

Logging the output is also disabled, stamp files are used instead to
detect the script run status in case install_os_domU.sh is used.

As run.sh.log is removed, standard devstack logging should be used.

The change also removes the environment settings from run.sh, as they
are not needed, they should be specified in localrc. This way user
cannot get different experiences by using unstack.sh/stack.sh or run.sh

Also a proper unstack.sh is called instead of killing screen in run.sh

Change-Id: I7eb12bd74746cc7a1db3aa9fd68ece645a50001d
2013-09-25 14:54:20 +01:00
Mate Lakat
fb434b28d0 xenapi: Get rid of prompt settings
Remove the setting of prompt from prepare guest, keeping the scripts
smaller.

Change-Id: Ifb2b3aba07831e1552d6a1c6cd2081592c43ccf6
2013-09-24 15:58:37 +01:00
ZhiQiang Fan
7d56215837 Replace OpenStack LLC with OpenStack Foundation
Change-Id: I7642e7163b615798867881b012240164465c5e43
Fixes-Bug: #1214176
2013-09-20 02:20:35 +08:00
Mate Lakat
1ca490c049 xenapi: Use C locale
By exporting the LC_ALL=C we can get rid of localisation issues, as the
actual scripts are already assuming an english installation.

FIxes bug 1227527

Change-Id: Ieeebce4d53b09959146a970f3fb803201ac5ebdf
2013-09-19 10:03:36 +01:00
Jenkins
72854cc567 Merge "xenapi: enable block device access for stack user" 2013-09-05 11:52:55 +00:00
Jenkins
1800a8a1eb Merge "xenapi: README.md and embedded localrc updates" 2013-09-04 18:07:59 +00:00
Jenkins
9e597ec22d Merge "xenapi: Set VM memory before starting it" 2013-09-04 18:06:41 +00:00
Jenkins
9e2ba92d7a Merge "xenapi: add username to vncviewer command" 2013-09-04 18:06:27 +00:00
Mate Lakat
bbf5623774 xenapi: README.md and embedded localrc updates
This change updates the readme, so that it is easier to get started, and
reflects the actual behavior of DevStack.

Changes in README.md:
 - Link to xenserver download page
 - Remove neutron interface - it is no longer installed by devstack
 - Add appendix with
   - How to use a different ubuntu mirror
   - How to use a proxy for ubuntu
   - How to re-use the created VM
 - Remove run from snapshot section and "do cloudy stuff"

Changes in the Readme-embedded sample localrc:
 - Upload a vhd image and a uec image by default - easier to get started

Change-Id: I13bb8e59ff5367ff7623fe9aa273886a957f81a7
2013-08-31 13:36:19 +01:00
Mate Lakat
4728001d01 xenapi: Increase default OS domU memory to 2G
In XenServer scenarios, an additional domU is created to run OpenStack
services. This change is increasing the memory for that VM to speed up
test runs.

Change-Id: I322f4e4703e506620fa7e7456c4264ee0d050edc
2013-08-31 12:12:46 +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
97621a1d1f xenapi: add username to vncviewer command
Devstack prints out an instruction, how to look at the virtual machine's
console. The command did not include the username, so if the user had a
config file to use a different username for that network, the command
failed.

Change-Id: I5dd49169c45e26e8d2bb3d5920a1b7fa584be50f
2013-08-30 13:12:17 +01:00
Mate Lakat
b1dc9bd5e4 xenapi: enable block device access for stack user
Although nova is setting the permissions on block devices, sometimes it
fails, and that results in an instance failing to launch. It is only an
issue for 3-part images, and images accessed through block devices. This
patch adds an udev rule, so that devices will be accessible.

fixes bug 1218251

Change-Id: I837ea515457fbfc50e9ce138ea9de9db12baa8be
2013-08-29 11:52:20 +01:00
Bob Ball
4669122dc8 Add XenServer to GetDistro's logic
This is primarily to satisfy the expectations of various scripts that os_*
variables are defined, and will result in a distro similar to "xs6.1.0-59235p"

Fixes bug 1211001

Change-Id: I951e1eb3a5e25f4d8773a11b15cf38157b6492fe
2013-08-13 21:51:41 +01:00
Jenkins
da2b6785fc Merge "xenapi: Use a jeos vm as a template" 2013-08-13 09:26:28 +00:00
Jenkins
c31d192262 Merge "manage-vdi: Wait until devices have been created before mounting" 2013-07-31 14:48:21 +00:00
Mate Lakat
c02b2f87cc xenapi: Use a jeos vm as a template
DevStack was using templating to speed up the setup process with
XenServer. The template already included some devstack customisations,
not just a clean OS. This change modifies devstack behaviour, so that
the template is a simple clean operating system. This makes it easier to
use custom OS as a template, potentially speeding up the tests.

related to blueprint xenapi-devstack-cleanup

Change-Id: I6cb0a7ed7a90e749b78329a8e2b65fb8b7fcfa5f
2013-07-30 20:00:08 +01:00
Jenkins
e7559a479e Merge "xenapi: Uninstall instances" 2013-07-30 01:14:44 +00:00
Mate Lakat
0d97cbe2b5 xenapi: Uninstall instances
The devstack script sometimes failed to clean up the left over
instances. This patch will utilize the xe vm-uninstall force=true
command to get rid of the instances.

Change-Id: I3450e2d5c9a4b1fe8ede39c4cc5c337cd541ea35
2013-07-29 09:41:50 +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
1f0efadccf Merge "xenapi: preinstall python netaddr" 2013-07-15 16:19:23 +00: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