22 Commits

Author SHA1 Message Date
Bob Ball
f35e95706c XenAPI: Replace remaining instances of 'devstack.succeeded'
Commit I05990c7154366350b0f9cc3e6c70d6f34238486f was incomplete
and left two references to the, now replaced, devstack.succeeded.

The impact of this is that the XVA always claims that devstack failed
to run when actually the run may have been successful

Change-Id: Ie4ac673011d77a9edc8923db94d914efe9f45d5d
2015-01-26 14:13:02 +00:00
Bob Ball
0686dae661 XenAPI: Fix another race condition
Fix it properly this time by forcing a PID from run.sh and using that to track.

A second issue is that upstart may run services twice, introduce a flock test
to ensure that we only run stack.sh once as running in parallel causes issues.

Change-Id: I05990c7154366350b0f9cc3e6c70d6f34238486f
2015-01-16 13:53:47 +00:00
Mate Lakat
518fb760d3 XenAPI: workaround for unsupp. associative arrays
Dom0's bash does not support associative arrays, however we source
`functions` and therefore our scripts fail. This change breaks the
dependency of dom0 tools on domU functions.

Fixes bug: 1379804

Change-Id: I229e2d5f07070a9236ec612d4032c94c4361a9f6
2014-10-29 18:10:43 +01: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
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
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
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
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
ec06efc607 Disable non-dhcp resolv.conf
Fixes: bug #1119268
Change-Id: Icf7d420a31eb7a0cb46b2e59a4328f6b640deb57
2013-02-08 10:50:34 +00:00
Dean Troyer
74759aa17a Remove DEFAULT_STACK_USER, just use STACK_USER
STACK_USER needs to be set for more than just stack.sh, there
was no real distinction for using DEFAULT_STACK_USER instead
of just setting STACK_USER directly in stackrc and allowing it
to be overridden in localrc.

Change-Id: I9e8d70db29bb421f1ce3dbf40a5ad299cc7ea785
2013-01-25 11:09:17 -06:00
Attila Fazekas
91b8d13eda Fix "sudo: sorry, you must have a tty to run sudo"
On many systems the requiretty sudoers option is turned on by default.
With "requiretty" option the sudo ensures the user have real tty access.

Just several "su" variant has an option for skipping the new session creation step.

Only one session can posses a tty, so after a "su -c" the sudo will not
work.

We will use sudo instead of su, when we create the stack account.

This change adds new variable the STACK_USER for
 service username.

Change-Id: I1b3fbd903686884e74a5a22d82c0c0890e1be03c
2013-01-11 09:15:30 +01:00
John Garbutt
72cffd56bf Make the standard devstack logging work with XenServer
Fixes bug 1087387

Stop redirecting the output in devstack to ensure when
you configure LOGFILE that the devstack scripts keep working

Change-Id: I00dce315f5f79c4fc351d9ab11c504274d998fce
2012-12-06 18:19:29 +00:00
John Garbutt
d8f1a87a45 Make it easier to use Precise or Oneric with XenServer DevStack
This is a partial fix for bug 1009937

Change-Id: I1fc7059cd812bce1539a5050f60717db4cbd81ef
2012-08-03 12:44:08 +01:00
John Garbutt
030fb2362f Make devstack work with xcp-xapi package on Ubuntu 12.04
- allow you to configure the xenapi_user (often other than root)
- allow you to disable the guest installer network
- install the plugins in the xcp-xapi location
- use alternate webserver location when adding the preseed file
- skip the centos specific ip forwarding configuration
- make use xcp inventory, if no xensource-inventory is found
- correctly deal with kpartx to mount the VM VDI in manage_vdi

Change-Id: I8d51725fc97f0bcaa27a46f7a7ced13c369c809e
2012-05-22 18:12:43 +01:00
John Garbutt
daadf744ed Improvements to DevStack's XenServer scripts
I have ensured:
- template gets re-used on second run
- template includes XenServer tools, and custom user accounts
- take snapshot before first boot, for easy re-run
- make host_ip_iface work with either eth2 or eth3
- make ssh into domU checks looser
- above is all ground work for improved jenkins tests
- added some more comments to make it scripts clearer

Change-Id: I5c45370bf8a1393d669480e196b13f592d29154f
2012-05-22 18:12:43 +01:00
Jenkins
2468d661c4 Merge "bug 980725: multi_host is always set to True with virtdriver=xenserver" 2012-04-23 19:16:48 +00:00
Renuka Apte
0af143b34e XenServer: new build and install scripts
Change-Id: Ia13a9c8073e59edf98415ba5b9f3a9cbd1453d32
2012-04-13 23:23:47 -05:00
Armando Migliaccio
4f27a72029 bug 980725: multi_host is always set to True with virtdriver=xenserver
set MULTI_HOST according to the value as defined in localrc or other rc files.

Change-Id: Ifc5d0fff06bffd39ab4ff1c1a6fa5d4ab10b9e27
2012-04-13 12:33:49 +01:00
Renuka Apte
c56885ad31 Improve devstack docs for Xenserver
Minor fixes to scripts

Fixes bug 943508

Change-Id: Iaf12b9d67efa78623e8253599010f60192b4af64
2012-03-08 13:58:28 -08:00
Renuka Apte
ce59d643f5 Add logging for prepare_guest
Change-Id: I2dc31acb56ee64c0c69e614a2fc96ae6b31b2ffa
2012-02-14 15:30:34 -08:00
root
b115341253 Generalize xen network config
Allow dhcp for IP addresses.
dhclient3 bug workaround.
Refactor code to improve network creation logic.

Change-Id: Ia3e2e65bbe8b68cf4832595cb7c283c3dc84db19
2012-02-14 15:30:34 -08:00
Anthony Young
1188904eee Separate out build_xva process so that it can be run on a machine besides dom0
Change-Id: I3a6e1ef874c83d79d09a8df1f086ec06d39db2df
2012-02-06 14:28:34 -08:00