176 Commits

Author SHA1 Message Date
Jenkins
dd39fc36f7 Merge "XenAPI: Fix declare definition" 2014-08-01 16:47:35 +00:00
Bob Ball
5fb83a0a33 XenAPI: Fix declare definition
Some versions of bash do not initialise a variable with declare -a
therefore with set -u bash can terminate the script.

Be more verbose in declaring the array if it is not set

Change-Id: I6ec2b6e986aeffe539a2ab93432fa7af9e5a4f5d
2014-07-29 13:40:57 +01:00
Jenkins
2ebcd3817f Merge "XenAPI: Use GUEST_PASSWORD when installing DomU" 2014-07-22 00:42:47 +00:00
Bob Ball
d6b43a09c4 XenAPI: Fix race condition on tailing stack.log
Stack.log is created by stack.sh, which is started by run.sh.  Using
the pid from run.sh doesn't mean that stack.log has been created yet
so wait for the log to be created before tailing

Change-Id: I86e563478949cb7bbe0d1afd80b790ba70328e3a
2014-07-15 17:45:47 +01:00
Bob Ball
105eaee2c0 XenAPI: Use GUEST_PASSWORD when installing DomU
We know what the GUEST_PASSWORD will be, so set it during DomU
installation; therefore if the installation fails for any reason
we have a correct GUEST_PASSWORD set rather than the obscure and
undocumented 'r00tme'

Change-Id: I684646a74f2cede43667a40556e247955e042ae4
2014-07-14 15:21:07 +01:00
Jenkins
0b8b18d840 Merge "XenAPI: Tail output from stack.sh" 2014-06-24 18:00:30 +00:00
Bob Ball
dc7ebbb9a4 XenAPI: Tail output from stack.sh
While installing devstack in XenServer's DomU we can easily
track the output so end-users have much more visibility of
both what is going on and what (if anything!) went wrong.

Change-Id: I7d12a13cea9dffda6c1388ce711b6adf76cae72c
2014-06-24 14:37:36 +01:00
Bob Ball
8230296ec3 Use curl to download from github.com
Github recently removed some sslv3 ciphers - wget seems to only
enable a subset of the ciphers available so fails now, but curl
continues to succeed.

Use --no-sessionid to work around
https://bugzilla.redhat.com/show_bug.cgi?id=1098711

Change-Id: Ia110bd2d0a222e438189c10a9c1a236bd7ea3d0e
2014-06-24 11:36:47 +01:00
Jenkins
d65f7a2858 Merge "Upgrade to cirros 0.3.2" 2014-05-19 19:20:00 +00:00
Bob Ball
d06d4550de XenAPI: Fix final script to include functions
Generally a ubuntu template is supplied - but in the case
where it is not, we need to source functions before sourcing
stackrc (Through xenrc)

Change-Id: I8325cf1c6f83946b7798e6d1bb8278e86831d3c4
2014-05-15 21:12:50 +01:00
Attila Fazekas
2d4c8da803 Upgrade to cirros 0.3.2
Cirros 0.3.2 is fixing the host name setting issue, which
is required for turning on the tempest instance validation tests.

Change-Id: I1b87740ab02c4eb0a8df653a35e1f85d40abda51
Related-Bug: #1132686
2014-03-20 23:12:58 +01:00
Joe Gordon
bb1e07859c Don't install vim or locate by default
Devstack doesn't need vim or locate, if someone wants to use them, they
can just install them afterwards.

Change-Id: I00f27c20c86d89465e4aefc67ed645a309c09a03
2014-03-07 12:47:06 -08: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
Masayuki Igawa
1958c1eb5e Remove unnecessary comment out lines
This commit removes some comment-outed codes. If we want to use them, we
can get them from the git repository.

Change-Id: Ie438c43d332d0631750f0ad458653fc40e23faad
2014-02-20 14:35:44 +09:00
Jenkins
3ccd768db0 Merge "Rename Openstack to OpenStack" 2014-02-18 07:43:37 +00:00
Jenkins
20047053be Merge "Move install responsibilities to domU" 2014-02-15 02:17:20 +00:00
tanlin
2b69f23625 Rename Openstack to OpenStack
Change-Id: I78ac040e926ef8040ee674b6fea3223a8ab4ae99
2014-02-12 17:52:17 +08:00
Jenkins
b4b9146de2 Merge "XenAPI: Fix new useage of trueorfalse" 2014-02-11 17:12:49 +00:00
Shane Wang
5ed43bf82a Fix misspellings in devstack
Fix misspellings detected by:
 * pip install misspellings
 * git ls-files | grep -v locale | misspellings -f -

Change-Id: I19726438d15cd27b813504aac530e7e53c4def12
Closes-Bug: #1257295
2014-02-08 08:49:18 +08: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
Chmouel Boudjnah
86a8e97679 Add while/until to the for/do rule
Like 'for/do' check that the while/until operator are on
the same line with the do.

Fixes some pep8 error along the way.

Change-Id: I440afe60691263365bf35310bf4212d94f30c339
2014-02-05 07:52:54 +01:00
Sean Dague
16dd8b3ed9 introduce if/then & for/do rules
we mostly have a consistent style on if/then & for/do in devstack,
except when we don't. This attempts to build a set of rules to
enforce this.

Because there are times when lines are legitimately long, and there
is a continuation, this starts off ignoring if and for loops with
continuations. But for short versions, we should enforce this.

Changes to make devstack pass are included. The fact that the
cleanup patch was so small is pretty solid reason that this is
actually the style we've all agreed to.

Part of a git stash from hong kong that I finally cleaned up.

Change-Id: I6376d7afd59cc5ebba9ed69e5ee784a3d5934a10
2014-02-05 07:52:54 +01:00
Bob Ball
c643ebb26d XenAPI: Fix new useage of trueorfalse
* Ensure that Xen setup scripts will continue to function when unset
  variables are used in stackrc
* Ensure that the generic functions are sourced in all places that xenrc
  (which sources stackrc) is sourced.

Change-Id: I54eba20733c2e149621b74a1387f0bef14fca12e
2014-02-03 09:08:54 +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