util-vserver.git
18 years agoBump release number to reflect changes in vsh and vserverimpl
Steve Muir [Fri, 7 Oct 2005 20:53:33 +0000 (20:53 +0000)]
Bump release number to reflect changes in vsh and vserverimpl

18 years agoConvert values to strings before writing to config file
Steve Muir [Fri, 7 Oct 2005 20:13:05 +0000 (20:13 +0000)]
Convert values to strings before writing to config file

18 years agoOops, don't limit slices to 4 processes
Steve Muir [Fri, 7 Oct 2005 19:55:34 +0000 (19:55 +0000)]
Oops, don't limit slices to 4 processes

18 years agoFiles generated by automake
Steve Muir [Fri, 7 Oct 2005 19:07:53 +0000 (19:07 +0000)]
Files generated by automake

18 years agoUse symbolic constant for no limit
Steve Muir [Fri, 7 Oct 2005 19:02:06 +0000 (19:02 +0000)]
Use symbolic constant for no limit

18 years agoCreated common function to enter vserver context and set resource limits
Steve Muir [Fri, 7 Oct 2005 18:50:58 +0000 (18:50 +0000)]
Created common function to enter vserver context and set resource limits

18 years agoUse common function to enter vserver context and set resource limits
Steve Muir [Fri, 7 Oct 2005 18:50:43 +0000 (18:50 +0000)]
Use common function to enter vserver context and set resource limits

18 years agoShould chdir after chroot
Steve Muir [Fri, 7 Oct 2005 18:39:24 +0000 (18:39 +0000)]
Should chdir after chroot

18 years agoConvert DISKLIMIT value to an integer
Steve Muir [Thu, 6 Oct 2005 13:30:06 +0000 (13:30 +0000)]
Convert DISKLIMIT value to an integer

18 years agoDon't barf if we can't unlink a non-existent file
Steve Muir [Wed, 5 Oct 2005 22:15:51 +0000 (22:15 +0000)]
Don't barf if we can't unlink a non-existent file

18 years agoApply disklimit when starting vservers.
Steve Muir [Wed, 5 Oct 2005 21:47:44 +0000 (21:47 +0000)]
Apply disklimit when starting vservers.
Delete old backup file before creating new one

18 years agoSave and restore cwd since it gets clobbered by the directory walker
Steve Muir [Wed, 5 Oct 2005 21:36:06 +0000 (21:36 +0000)]
Save and restore cwd since it gets clobbered by the directory walker

18 years agoMake disk limit handling more NM-friendly, get rid of dependency on
Steve Muir [Wed, 5 Oct 2005 18:30:39 +0000 (18:30 +0000)]
Make disk limit handling more NM-friendly, get rid of dependency on
util_vserver_vars

18 years agoFix to implement chcontext so that NM's vserver start works correctly.
Marc Fiuczynski [Tue, 27 Sep 2005 22:08:15 +0000 (22:08 +0000)]
Fix to implement chcontext so that NM's vserver start works correctly.

18 years agoMake code look more like the implementation in vserverimpl.c. Should really
Marc Fiuczynski [Tue, 27 Sep 2005 22:07:28 +0000 (22:07 +0000)]
Make code look more like the implementation in vserverimpl.c. Should really
unify those into a common lib.

Use VC_VXF_STATE_SETUP in flagword.

18 years agoFixed a number of bugs:
Marc Fiuczynski [Thu, 22 Sep 2005 21:43:18 +0000 (21:43 +0000)]
Fixed a number of bugs:
- vserver_enter function not exported properly as a method.
- reimplemented vserver_enter.
- vserver_flags needed flags to VC_VXF_STATE_SETUP set.

18 years agomore fixes
Marc Fiuczynski [Tue, 20 Sep 2005 21:58:27 +0000 (21:58 +0000)]
more fixes

18 years agofix for multiple entry
Marc Fiuczynski [Tue, 20 Sep 2005 21:19:57 +0000 (21:19 +0000)]
fix for multiple entry

18 years agoUpdated chcontext to use new style vserver support to enter a context.
Marc Fiuczynski [Thu, 15 Sep 2005 20:32:38 +0000 (20:32 +0000)]
Updated chcontext to use new style vserver support to enter a context.

Updated setsched to support Andy's new scheduler.

18 years agoupdated scheduling and chcontext code to work with new vserverimpl
Marc Fiuczynski [Thu, 15 Sep 2005 20:31:20 +0000 (20:31 +0000)]
updated scheduling and chcontext code to work with new vserverimpl

18 years ago- define VROOTDIR for backward compatibility
Mark Huang [Mon, 12 Sep 2005 20:24:08 +0000 (20:24 +0000)]
- define VROOTDIR for backward compatibility

18 years agocpuguaranteed conditional in the code was flipped.
Marc Fiuczynski [Wed, 7 Sep 2005 17:55:17 +0000 (17:55 +0000)]
cpuguaranteed conditional in the code was flipped.

18 years agoAdded support to check for a CPUGUARANTEED value in a vserver configuration
Marc Fiuczynski [Wed, 7 Sep 2005 17:53:05 +0000 (17:53 +0000)]
Added support to check for a CPUGUARANTEED value in a vserver configuration
file.  It needs to either be CPUGUARANTEED=0 for false and 1 for true.

18 years agoAdded support to set cpu scheduler parameters.
Marc Fiuczynski [Wed, 7 Sep 2005 10:50:18 +0000 (10:50 +0000)]
Added support to set cpu scheduler parameters.

18 years ago- add /sbin and /usr/sbin to PATH
Mark Huang [Sat, 3 Sep 2005 21:47:11 +0000 (21:47 +0000)]
- add /sbin and /usr/sbin to PATH

18 years ago- don't build images in .vtmp, vcached blows this away every 15 minutes
Mark Huang [Fri, 2 Sep 2005 20:00:39 +0000 (20:00 +0000)]
- don't build images in .vtmp, vcached blows this away every 15 minutes

18 years ago- add full path to vcached
Mark Huang [Fri, 2 Sep 2005 13:36:57 +0000 (13:36 +0000)]
- add full path to vcached

18 years ago- whoops, every 15 minutes instead of every 15 hours
Mark Huang [Thu, 1 Sep 2005 18:52:53 +0000 (18:52 +0000)]
- whoops, every 15 minutes instead of every 15 hours

18 years ago- allowing vc_ctx_create() to return -EEXIST is not the right thing to
Mark Huang [Wed, 31 Aug 2005 15:23:10 +0000 (15:23 +0000)]
- allowing vc_ctx_create() to return -EEXIST is not the right thing to
  do (leaves all future vsh sessions in root context!). Call
  vc_ctx_migrate() to migrate the current process tree to the specified
  context, if vc_ctx_create() fails and returns -EEXIST. Also, for
  safety, (re)set the various resource limits (including capabilities)
  for the context every time.

18 years ago- obsolete, instead of provide, util-vserver-py23
Mark Huang [Tue, 30 Aug 2005 17:00:11 +0000 (17:00 +0000)]
- obsolete, instead of provide, util-vserver-py23

18 years ago- python does not export variables beginning with underscore
Mark Huang [Sun, 28 Aug 2005 16:41:01 +0000 (16:41 +0000)]
- python does not export variables beginning with underscore

18 years ago- python does not export variables beginning with underscore
Mark Huang [Sat, 27 Aug 2005 17:38:57 +0000 (17:38 +0000)]
- python does not export variables beginning with underscore
- util-vserver-vars also specifies some values by reference, dereference
  these before converting to python

18 years agorebuild for fc2
Mark Huang [Fri, 26 Aug 2005 04:07:54 +0000 (04:07 +0000)]
rebuild for fc2

18 years ago- fix unquoted variable (causes python syntax error)
Mark Huang [Fri, 26 Aug 2005 04:03:43 +0000 (04:03 +0000)]
- fix unquoted variable (causes python syntax error)

18 years ago- restore build of python modules
Mark Huang [Fri, 26 Aug 2005 04:02:45 +0000 (04:02 +0000)]
- restore build of python modules

18 years ago- no need for /etc/init.d/vservers-init
Mark Huang [Fri, 26 Aug 2005 04:01:11 +0000 (04:01 +0000)]
- no need for /etc/init.d/vservers-init

18 years ago- can't link directly against libvserver anymore
Mark Huang [Fri, 26 Aug 2005 04:00:44 +0000 (04:00 +0000)]
- can't link directly against libvserver anymore
- replace pybuild with autoconf/libtool/custom Makefile hack

18 years agoVROOTDIR changed to __DEFAULT_VSERVERDIR
Mark Huang [Fri, 26 Aug 2005 03:58:57 +0000 (03:58 +0000)]
VROOTDIR changed to __DEFAULT_VSERVERDIR

18 years ago- remove (now redundant) protos
Mark Huang [Fri, 26 Aug 2005 03:58:36 +0000 (03:58 +0000)]
- remove (now redundant) protos

18 years ago- restore build of python modules
Mark Huang [Fri, 26 Aug 2005 03:30:01 +0000 (03:30 +0000)]
- restore build of python modules

18 years agorequire python >= 2.3 for util-vserver-python
Mark Huang [Fri, 26 Aug 2005 03:26:16 +0000 (03:26 +0000)]
require python >= 2.3 for util-vserver-python

18 years ago- set correct release number
Mark Huang [Wed, 24 Aug 2005 13:25:08 +0000 (13:25 +0000)]
- set correct release number

18 years agoResource limit information is not kept in the kernel for contexts that do not have
Marc Fiuczynski [Wed, 24 Aug 2005 11:46:19 +0000 (11:46 +0000)]
Resource limit information is not kept in the kernel for contexts that do not have
any processes.  These limits need to be reinstantiated.  For this reason, I have
modified vsh to read in CPULIMIT, MEMLIMIT, and TASKLIMIT from /etc/vservers/xyz.conf
and set these limits if the context does not exist.   When NM takes over this role,
the get_limits() function of vsh will need to be modified to obtain those limits
from NM rather than these conf files.

18 years agoFix to let multiple instance of vsh log into the same xid context.
Marc Fiuczynski [Tue, 23 Aug 2005 02:24:43 +0000 (02:24 +0000)]
Fix to let multiple instance of vsh log into the same xid context.

18 years ago- FC2 doesn't have automake-1.9, only automake-1.8.3; hope this is okay
Mark Huang [Sun, 21 Aug 2005 22:31:33 +0000 (22:31 +0000)]
- FC2 doesn't have automake-1.9, only automake-1.8.3; hope this is okay

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 22:25:39 +0000 (22:25 +0000)]
- sync to util-vserver-0.30.208

18 years ago- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
Mark Huang [Sun, 21 Aug 2005 22:24:39 +0000 (22:24 +0000)]
- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
  it before it got deleted)

18 years ago- merge revision 1.2 to util-vserver-0.30.207 (yes, 207; this is the latest version...
Mark Huang [Sun, 21 Aug 2005 22:24:19 +0000 (22:24 +0000)]
- merge revision 1.2 to util-vserver-0.30.207 (yes, 207; this is the latest version of it before it got deleted)

18 years ago- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
Mark Huang [Sun, 21 Aug 2005 22:23:45 +0000 (22:23 +0000)]
- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
  it before it got deleted)
- account for distrib-info moving to /usr/lib/util-vserver/legacy/, and
  change the .207 behavior back

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 22:21:04 +0000 (22:21 +0000)]
- sync to util-vserver-0.30.208
- mef: please verify that this version of the tool works the same as the
  one that you backported

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 22:17:13 +0000 (22:17 +0000)]
- sync to util-vserver-0.30.208

18 years ago- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
Mark Huang [Sun, 21 Aug 2005 22:14:58 +0000 (22:14 +0000)]
- sync to util-vserver-0.30.207 (yes, 207; this is the latest version of
  it before it got deleted)
- apparently the way it works changed between 0.30 and 0.30.207: change
  it back to its old behavior ("vbuild <source directory> <destination
  directory>").

18 years ago- vbuild was deprecated in 0.30.208; add it back since we still need it
Mark Huang [Sun, 21 Aug 2005 22:11:41 +0000 (22:11 +0000)]
- vbuild was deprecated in 0.30.208; add it back since we still need it
- add rules for building vsh

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 22:10:56 +0000 (22:10 +0000)]
- sync to util-vserver-0.30.208
- install vcached, vuseradd, and vuserdel

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 22:10:13 +0000 (22:10 +0000)]
- sync to util-vserver-0.30.208
- I'm not really sure why this keeps happening. The immutable unlink
  ext2 flag is bit 27, damn it, at least according to the kernel.

18 years ago- remove /etc/vservers S_CAPS parsing; this is not really well supported
Mark Huang [Sun, 21 Aug 2005 21:57:16 +0000 (21:57 +0000)]
- remove /etc/vservers S_CAPS parsing; this is not really well supported
  right now under the new 0.30.208 framework, and we don't currently use
  it now that we have Proper. Should be relatively straightforward to
  restore if necessary, by using vc_text2cap() instead.
- print better error messages
- use new vc_ctx_create() syscall. Correct the old "legacy" way of
  creating a context and reducing its capabilities for posterity, but
  don't actually compile it. For the record, apparently you have to
  reduce the capabilities in a second call to vc_new_s_context() with
  VC_SAMECTX; see kernel/vserver/context.c under "dirty hack for
  capremove".

18 years ago- sync to util-vserver-0.30.208 (the legacy version of this script, anyway)
Mark Huang [Sun, 21 Aug 2005 21:46:24 +0000 (21:46 +0000)]
- sync to util-vserver-0.30.208 (the legacy version of this script, anyway)
- remove waitfor() functionality, this script is no longer used to stop
  vservers anyway (Node Manager does this now)

18 years ago- use new 0.30.208 util-vserver-vars variable names
Mark Huang [Sun, 21 Aug 2005 21:44:09 +0000 (21:44 +0000)]
- use new 0.30.208 util-vserver-vars variable names
- use legacy vserver vserverkillall script to kill processes

18 years ago- use new 0.30.208 util-vserver-vars variable names
Mark Huang [Sun, 21 Aug 2005 21:41:03 +0000 (21:41 +0000)]
- use new 0.30.208 util-vserver-vars variable names
- also "unlock" accounts in /etc/passwd if appropriate
- use legacy vserver script to execute commands inside vserver

18 years ago- sync to util-vserver-0.30.208
Mark Huang [Sun, 21 Aug 2005 21:39:20 +0000 (21:39 +0000)]
- sync to util-vserver-0.30.208

18 years ago- moved here from sysv/
Mark Huang [Sun, 21 Aug 2005 21:39:05 +0000 (21:39 +0000)]
- moved here from sysv/

18 years ago- don't generate cron job, install it
Mark Huang [Sun, 21 Aug 2005 21:38:52 +0000 (21:38 +0000)]
- don't generate cron job, install it

18 years ago- remove daemon functionality entirely
Mark Huang [Sun, 21 Aug 2005 21:37:10 +0000 (21:37 +0000)]
- remove daemon functionality entirely
- use new 0.30.208 util-vserver-vars variable names
- setattr now installed in /usr/sbin

18 years agoThis commit was generated by cvs2svn to compensate for changes in r1242,
Mark Huang [Sun, 21 Aug 2005 18:05:23 +0000 (18:05 +0000)]
This commit was generated by cvs2svn to compensate for changes in r1242,
which included commits to RCS files with non-trunk default branches.

18 years agoSync util-vserver.spec.in to util-vserver.spec
Steve Muir [Fri, 12 Aug 2005 21:13:02 +0000 (21:13 +0000)]
Sync util-vserver.spec.in to util-vserver.spec

18 years agoAdd support for static vserver IDs (needed for putting pl_conf in a slice)
Steve Muir [Thu, 28 Jul 2005 21:32:27 +0000 (21:32 +0000)]
Add support for static vserver IDs (needed for putting pl_conf in a slice)

18 years ago- bring up-to-date with util-vserver.spec
Mark Huang [Tue, 26 Jul 2005 19:02:41 +0000 (19:02 +0000)]
- bring up-to-date with util-vserver.spec

18 years ago- no need for vcached workarounds anymore
Mark Huang [Tue, 26 Jul 2005 19:02:33 +0000 (19:02 +0000)]
- no need for vcached workarounds anymore
- check $PL_BOOTCD instead of runlevel

18 years agoFix typo: dlimit.py should have been bwlimit.py
Steve Muir [Thu, 21 Jul 2005 18:27:48 +0000 (18:27 +0000)]
Fix typo: dlimit.py should have been bwlimit.py

18 years agoAdd bwlimit and cpulimit modules to Python RPM
Steve Muir [Thu, 21 Jul 2005 18:20:52 +0000 (18:20 +0000)]
Add bwlimit and cpulimit modules to Python RPM

18 years agoAdded support to set bwlimits.
Marc Fiuczynski [Tue, 12 Jul 2005 20:05:23 +0000 (20:05 +0000)]
Added support to set bwlimits.

18 years agoThis file implements the core functionality of the resman bwlimit script
Marc Fiuczynski [Tue, 12 Jul 2005 19:42:44 +0000 (19:42 +0000)]
This file implements the core functionality of the resman bwlimit script
in python.

18 years agoAdded CKRM compatibility for set_sched.
Marc Fiuczynski [Mon, 11 Jul 2005 20:26:19 +0000 (20:26 +0000)]
Added CKRM compatibility for set_sched.

18 years agoNow exporting the vserver rlimit interface directly, which can be used to
Marc Fiuczynski [Mon, 11 Jul 2005 20:08:13 +0000 (20:08 +0000)]
Now exporting the vserver rlimit interface directly, which can be used to
get/set mem/task and other limits.

18 years agoAdded get/set memlimit and tasklimit.
Marc Fiuczynski [Mon, 11 Jul 2005 20:07:28 +0000 (20:07 +0000)]
Added get/set memlimit and tasklimit.

18 years agoAdded set_sched for vserver scheduler.
Marc Fiuczynski [Mon, 11 Jul 2005 19:38:42 +0000 (19:38 +0000)]
Added set_sched for vserver scheduler.

18 years agoModified set_dlimit to print a warning message when trying to set a
Marc Fiuczynski [Mon, 11 Jul 2005 19:15:08 +0000 (19:15 +0000)]
Modified set_dlimit to print a warning message when trying to set a
disk limit (in blocks) that is smaller than the number of blocks
the vserver is already using.  Should probably be an exception in
the future.

18 years agoAdded set_dlimit and get_dlimit to be used by NM to enforce disk limits.
Marc Fiuczynski [Mon, 11 Jul 2005 19:08:45 +0000 (19:08 +0000)]
Added set_dlimit and get_dlimit to be used by NM to enforce disk limits.

18 years agoImplements set_dlimit and get_dlimit for vserver disk limits.
Marc Fiuczynski [Mon, 11 Jul 2005 18:40:11 +0000 (18:40 +0000)]
Implements set_dlimit and get_dlimit for vserver disk limits.
NM should use set to initialize the disk limits, and can use
get to export the disk limits of a vserver.

18 years agovserverimpl now includes support to set both task and memory limits.
Marc Fiuczynski [Wed, 22 Jun 2005 03:52:02 +0000 (03:52 +0000)]
vserverimpl now includes support to set both task and memory limits.
cpulimit.py is a backwards compat file to write cpu limits via ckrm;
however, this will be deprecated when we switch to Andy's new sched
for which the setsched support already is in vserverimpl.

18 years agonow returns 1k block count rather than 512byte block count
Marc Fiuczynski [Tue, 21 Jun 2005 21:52:18 +0000 (21:52 +0000)]
now returns 1k block count rather than 512byte block count

18 years agoforgot to read in xid from python args
Marc Fiuczynski [Tue, 21 Jun 2005 10:43:56 +0000 (10:43 +0000)]
forgot to read in xid from python args

18 years agoMoved vduimpl.c from util-python, import common pybuild infrastructure
Steve Muir [Mon, 20 Jun 2005 19:59:42 +0000 (19:59 +0000)]
Moved vduimpl.c from util-python, import common pybuild infrastructure

18 years agoback ported from recent util-vserver
Marc Fiuczynski [Sat, 18 Jun 2005 06:08:22 +0000 (06:08 +0000)]
back ported from recent util-vserver

18 years agoadded setsched support
Marc Fiuczynski [Sat, 18 Jun 2005 06:05:13 +0000 (06:05 +0000)]
added setsched support

18 years agoback ported setsched syscall for new scheduler
Marc Fiuczynski [Sat, 18 Jun 2005 05:56:14 +0000 (05:56 +0000)]
back ported setsched syscall for new scheduler

18 years agoadded setsched and dlimit vserver syscall support
Marc Fiuczynski [Sat, 18 Jun 2005 05:55:28 +0000 (05:55 +0000)]
added setsched and dlimit vserver syscall support

18 years agopl_mom needs us to retain functionality for starting a single vserver
Steve Muir [Wed, 15 Jun 2005 22:16:36 +0000 (22:16 +0000)]
pl_mom needs us to retain functionality for starting a single vserver

18 years agovserver start: allow caller to wait for vserver to be started
Steve Muir [Wed, 15 Jun 2005 22:04:47 +0000 (22:04 +0000)]
vserver start: allow caller to wait for vserver to be started

18 years agoDon't bother trying to gracefully shutdown vservers
Steve Muir [Wed, 15 Jun 2005 21:39:57 +0000 (21:39 +0000)]
Don't bother trying to gracefully shutdown vservers

18 years agovserver prep: set runlevel in /var/run/utmp, mount /proc and /dev/pts
Steve Muir [Wed, 15 Jun 2005 21:15:19 +0000 (21:15 +0000)]
vserver prep: set runlevel in /var/run/utmp, mount /proc and /dev/pts

18 years agovserver-init start functionality subsumed by Node Manager
Steve Muir [Wed, 15 Jun 2005 21:14:17 +0000 (21:14 +0000)]
vserver-init start functionality subsumed by Node Manager

18 years agoCloser approximation to how the vserver script starts a vserver; still
Steve Muir [Wed, 8 Jun 2005 19:11:08 +0000 (19:11 +0000)]
Closer approximation to how the vserver script starts a vserver; still
need to fix up /var/run/utmp and mount /proc and /dev/pts

18 years agoSimpler use of chroot and chcontext
Steve Muir [Wed, 8 Jun 2005 18:05:06 +0000 (18:05 +0000)]
Simpler use of chroot and chcontext

18 years agoFix the open and start methods
Steve Muir [Fri, 3 Jun 2005 22:05:34 +0000 (22:05 +0000)]
Fix the open and start methods

18 years agoReturn child's PID when starting a vserver
Steve Muir [Fri, 3 Jun 2005 19:47:59 +0000 (19:47 +0000)]
Return child's PID when starting a vserver

18 years agoAdd method to start a vserver
Steve Muir [Fri, 3 Jun 2005 19:23:42 +0000 (19:23 +0000)]
Add method to start a vserver

18 years agobump release number
Marc Fiuczynski [Thu, 2 Jun 2005 20:53:04 +0000 (20:53 +0000)]
bump release number

18 years agoFixed vlimit. This program lets us set various per-vserver limits. In
Marc Fiuczynski [Thu, 2 Jun 2005 19:56:08 +0000 (19:56 +0000)]
Fixed vlimit.  This program lets us set various per-vserver limits. In
particular, we can now set nproc limits (aka the vserver equivalent to
CKRM numtasks).  There are other limits that apparently just work, too,
such as resident-set-size, number of open files, etc., that I'll start
playing with, too.

18 years agoBuild a Python modules RPM
Steve Muir [Wed, 25 May 2005 17:57:19 +0000 (17:57 +0000)]
Build a Python modules RPM