Remove 4 from default runlevel in xen-watchdog, xend and xendomains.
Similar to what changeset 24847:0900b1c905f1 does in xencommons, remove
runlevel 4 from the other runlevel scripts. LSB defines runlevel 4 as
reserved for local use, the local sysadmin is responsible for symlink
creation in rc4.d.
Runlevel 4 was specified in Default-Start since a very long time. Then
it was copied also to the new xen-watchdog in 21861:fb3649141e19. Until
now this was not an issue since only xencommons is automatically enabled
during package install, and a custom xend and xendomains script is
included in the SuSE packages. Since some time a rpmlint check complains
about the wrong Default-Start entry in xen-watchdog.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Upstream the "xen/acpi-processor: C and P-state driver that
uploads said data to hypervisor." takes care of uploading power information
information that normally a cpu frequency scaling driver would using
in the initial domain. We want the hypervisor to take that data and
make good usage of it.
Fortunatly for us we do not have to worry about the native cpu frequency
scaling drivers being loaded first, as the upstream commit:
"xen/cpufreq: Disable the cpu frequency scaling drivers from loading."
takes care of that. Meaning we can load the xen-acpi-processor at any time.
By default that driver is built as a module - and since we are
the only user of it - we should load it.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
24905:2b5cf6bde62d accidentally contained a change to
tools/hotplug/Linux/init.d/xencommons. That change is probably OK but
should not be in 24905 so remove it.
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
LSB defines runlevel 4 as "reserved for local use, default is
normal/full multiuser"
The current behaviour of insserv in openSuSE 11.4 and SLES11SP2 is that
xencommons gets a symlink in /etc/init.d/rc4.d/ due to the 4 in the
Default-Start: line. As a result insserv will print a warning:
insserv: warning: current stop runlevel(s) (2 3 5) of script `xencommons' overwrites defaults (2 3 4 5).
Since the local admin is responsible to create all symlinks manually in
/etc/init.d/rc4.d/ the xencommons script should not automatically enable
itself in runlevel 4.
So, remove the 4 from Default-Start: line.
Note: This change will not automatically remove old/stale xencommon
symlinks in /etc/init.d/rc4.d/ during a package upgrade.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Move the sxp producing code off into a separate file. It is supported
for legacy reasons and needn't be updated other than the improve
compatibility with xm.
libxl_domain_config is not currently generated by the IDL (adding the
necessary support for Array types is on my to do list) so hand code
the json generation function for now.
Since this rather directly exposes a libxl data structure it's not
clear what sort of forward compatibility guarantees we can
make. However it seems like it should be as stable as libxl's own API
(which we are looking to stabilise)
(Gratuitous string.h include needed for memset in libxl_util.h)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
oxenstored is an ocaml implementation of the xenstore daemon. It is faster,
more scalable and more reliable than the C xenstored.
In particular the transaction model in oxenstored does not involve taking a
complete copy of the database and aborting on any (even non-conflicting) other
change.
There is a paper on the design and implementation of oxenstored at
http://gazagnaire.org/pub/GH09.pdf which includes a performance evaluation and
comparison with the C daemon etc.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
There is currently no code in the kernel to trigger autoload of the
evtchn or gntdev drivers. Load them manually during xencommons start.
Handle both pvops and xenlinux module names.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Currently xencommons prints an error that /proc/xen/capabilities does
not exist when started on a non-xen kernel.
Update the xencommons script to run only when needed:
- do not run if /proc/xen does not exist
- check if /proc/xen/capabilities exists before doing the grep for dom0
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Currently, xendomains service will save or migrate all the running domains in
the host on stop.
Change XENDOMAINS_AUTO_ONLY=true. Then on service stop, it will only
save or migrate all VMs under XENDOMAINS_AUTO (/etc/xen/auto), but always
shutdown all the running VMs.
It's a way to cleanly shutdown all the running VMs on system reboot. If you
want to save/migrate a VM, create a link to /etc/xen/auto.
Signed-off-by: Zhigang Wang <zhigang.x.wang@oracle.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Changset 22806:eefb8e971be5 broke 'xl'.
After starting the xenstored, xenconsoled, xenbackendd and running xl
create I get this:
libxl: error: libxl.c:53:libxl_ctx_init Is xenstore daemon running?
failed to stat /var/run/xenstore.pid: No such file or directory
cannot init xl context
The reason for the failure is that the NetBSD startup script
creates the file
/var/run/xenstored.pid
but libxl checks for
/var/run/xenstore.pid
Attached patch makes this consistent across Linux and NetBSD by
changing the Linux name (to the more-conventional food.pid form).
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
"xen-watchdog stop" attempts to kill non existing "watchdogd" but
misses the running "xenwatchdogd". This also provokes errors during
install and Debian package management.
Signed-off-by: user virtual <virtualusr@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This is the default runlevel on a Debian system.
In addition update-rc.d complains:
update-rc.d: warning: xencommons stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)
and it seems reasonable to stop the daemons during shutdown or reboot
so make that change as well.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Since 22187:c41252a55a0a we have been installing our example
xencommons settings file in either /etc/sysconfig or /etc/default,
depending on whether /etc/sysconfig exists.
However I omitted to add the code to /etc/init.d/xencommons to
actually read either version of the file, although every other init
script seems to have it.
An effect of this misplaced/unread file is that the automatic tests
don't cause xenconsoled to collect serial logs, because the tester
edits whichever file actually exists.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Introduce CONFIG_LEAF_DIR, SUBSYS_DIR, INITD_DIR variables to cope
better with variation between distributions.
See docs/misc/distro_mapping.txt for details.
Signed-off-by: Bruce Edge <bruce.edge@gmail.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
# User Olaf Hering <olaf@aepfle.de>
# Date 1280140115 -3600
# Node ID 8c3e1e8ddd599371d882b17996be88b545119ccb
# Parent 2092c06f9467747da608c448ddd01e2f1f82290a
tools/hotplug: init.d should test for /proc/xen/capabilities being a file
Correct test for /proc/xen/capabilities
It is a file, not a directory.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
"Default-Enabled:" is not a LSB keyword.
Remove it from the LSB section.
This avoids an openSuSE buildcheck warning and we are not aware of any
reason why it should be kept.
From: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Modified-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Add missing dependencies to runlevel script
xend requires at least xenstored
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
On one of my boxes, the xenstore-write setting dom0's name starts
before xenstored is actually ready to handle the connection properly,
resulting in the name set failing. Wait for xenstored to be up and
responding to reads before continuing, timing out after 30 seconds.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Fix the xencommons init script chkconfig configuration since the
priority was missing here and chkconfig was complaining about invalid
chkconfig script so I added both start and stop priorities to the
chkconfig line and it was working fine, the script was successfully
added to chkconfig when using `chkconfig --add xencommons` and
management using the chkconfig utility was now possible.
Tested on RHEL-5 Server with Xen-4.1-unstable installed, running on
PVops kernel 2.6.32.15 and it was working fine.
Signed-off-by: Michal Novotny <minovotn@redhat.com>
If xenfs is compiled as a module, now cannot complete
'service xencommons start', modprobe xenfs can fix it.
Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Now the init script is called xencommons and, as the name suggests, it
is a common script between xl and xend because it is used to start
xenconsoled, xenstored and xenbackendd and the initialization of these
three daemons has been removed from xend. The global
xen_toolstack=xl/xend variable has been removed. Regarding the
network setup, I made the vif scripts follow the same pattern as the
other scripts in xen-backend: a new script called vif-setup is
executed unconditionally. vif-setup is going to do the right thing
depending on the value of the environmental variable "script" (same
technique used before), defaulting to vif-bridge. In the common
scenario the toolstack doesn't need to set the variable "script"
because vif-bridge is going to be called anyway. There is no global
network script to setup the network bridges with xl, so if you are
using xl without xend, you need to manually configure the bridges
using your distro network setup, or, if you are lazy, you can just add
something like:
/etc/xen/scripts/network-bridge start
to your rc.local.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
this patch adds an init script for xl, so that it can be used without
xend installed on the system. In cases in which both toolstacks are
present, only one init script will be run, dependening on the value of
xen_toolstack in /etc/sysconfig/xen_toolstack. Please note that a
correct value of xen_toolstack (either xl or xend), is required now.
The network script and the vif script to be used with xl can be
specified in /etc/sysconfig/xenlightdaemons. Xl sets the vif script
to xl-vif-script by default, that reads /etc/sysconfig/xenlightdaemons
and calls the vif script set there. A port to a debian system should
be straightforward, just replacing /etc/sysconfig with /etc/default
everywhere.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
pvops dom0 kernels have a separate xenfs which has to be mounted on
/proc/xen. Systems with older configurations don't have xenfs listed
in fstab, and it can sometimes make sense to keep it that way (for
example, if the dom0 wants to boot a native-only kernel too).
The attached patch to the script which ends up in /etc/init.t/xend
mounts /proc/xen if it appears to be necessary.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
The attached patch enables to set the environment variables for xend
in /etc/sysconfig/xend.
There are four variables.
XENCONSOLED_TRACE=3D[none|guest|hv|all]
XENSTORED_ROOTDIR=3D/var/lib/xenstored
XENSTORED_TRACE=3D[yes|on|1]
XENBACKENDD_DEBUG=3D[yes|on|1]
The XENCONSOLED_TRACE and XENSTORED_ROOTDIR take strings for each
command's options. And if thease variables have non-zero strings, then
export them.
If the XENSTORED_TRACE and XENBACKENDD_DEBUG take either "yes", "on"
or "1" then export them.
From: Kazuhiro SUZUKI <kaz@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Ubuntu puts /var/lock on tmpfs, so we should create /var/lock at
startup, rather than at installation time.
Signed-off-by: Jun Koi <junkoi2004@gmail.com>
Show errors in the way they are coming from xm command only (no usage
is printed now). Watchdog_wm() has been changed for not showing dots
in the process of shutting down domains and if an error occurs it
prints target domain, operation (save/restore/migrate etc.) and reason
of failure in more user-friendly way.
Signed-off-by: Michal Novotny <minovotn@redhat.com>