util-vserver.git
18 years agoAdd support for removing resource (disk, network) limits
Steve Muir [Wed, 9 Nov 2005 22:04:25 +0000 (22:04 +0000)]
Add support for removing resource (disk, network) limits

18 years agoMakes sense to check that this actually compiles
Steve Muir [Wed, 9 Nov 2005 21:23:50 +0000 (21:23 +0000)]
Makes sense to check that this actually compiles

18 years agoRemove unnecessary constant definition
Steve Muir [Wed, 9 Nov 2005 21:17:45 +0000 (21:17 +0000)]
Remove unnecessary constant definition

18 years agoAdd function to remove disk limit
Steve Muir [Wed, 9 Nov 2005 21:13:29 +0000 (21:13 +0000)]
Add function to remove disk limit

18 years agoRevert python module path to correct value
Steve Muir [Tue, 8 Nov 2005 13:43:04 +0000 (13:43 +0000)]
Revert python module path to correct value

18 years agoRemove unused code to handle vserver flags
Steve Muir [Tue, 8 Nov 2005 01:03:40 +0000 (01:03 +0000)]
Remove unused code to handle vserver flags

18 years agoAssume eth0 as default device when initialising
Steve Muir [Tue, 8 Nov 2005 00:42:38 +0000 (00:42 +0000)]
Assume eth0 as default device when initialising

18 years agoTidy up handling of network parameters, don't rely upon config files
Steve Muir [Tue, 8 Nov 2005 00:26:01 +0000 (00:26 +0000)]
Tidy up handling of network parameters, don't rely upon config files
to initialise VServer helper objects

18 years agoTidy up handling of network parameters
Steve Muir [Tue, 8 Nov 2005 00:23:45 +0000 (00:23 +0000)]
Tidy up handling of network parameters

18 years agoDon't need to use resman anymore
Steve Muir [Tue, 8 Nov 2005 00:22:59 +0000 (00:22 +0000)]
Don't need to use resman anymore

18 years agoNeed to close the cwd file descriptor
Steve Muir [Mon, 7 Nov 2005 20:11:50 +0000 (20:11 +0000)]
Need to close the cwd file descriptor

18 years agoImplement the setsched function
Steve Muir [Wed, 2 Nov 2005 23:06:01 +0000 (23:06 +0000)]
Implement the setsched function

18 years agoFix Python modules to handle scheduling parameters correctly
Steve Muir [Wed, 2 Nov 2005 23:05:51 +0000 (23:05 +0000)]
Fix Python modules to handle scheduling parameters correctly

18 years agoImplement and use vserverimpl.setsched
Steve Muir [Wed, 2 Nov 2005 23:03:45 +0000 (23:03 +0000)]
Implement and use vserverimpl.setsched

18 years agoDon't need our own version of setup.py anymore
Steve Muir [Tue, 1 Nov 2005 22:04:53 +0000 (22:04 +0000)]
Don't need our own version of setup.py anymore

18 years agoFix Makefile to correctly locate util-python
Steve Muir [Tue, 1 Nov 2005 22:02:04 +0000 (22:02 +0000)]
Fix Makefile to correctly locate util-python

18 years agoUse new pybuild scheme that works with libtool
Steve Muir [Tue, 1 Nov 2005 21:54:00 +0000 (21:54 +0000)]
Use new pybuild scheme that works with libtool

18 years agoRemove unreachable code and confusing comment
Steve Muir [Tue, 1 Nov 2005 21:53:40 +0000 (21:53 +0000)]
Remove unreachable code and confusing comment

18 years agoFix handling of over-quota condition
Steve Muir [Fri, 28 Oct 2005 21:43:17 +0000 (21:43 +0000)]
Fix handling of over-quota condition

18 years agoAdded SCHED_SHARE flag
Andy Bavier [Tue, 25 Oct 2005 15:29:26 +0000 (15:29 +0000)]
Added SCHED_SHARE flag

18 years agoRead resource values from a resources dictionary
Steve Muir [Wed, 12 Oct 2005 17:35:34 +0000 (17:35 +0000)]
Read resource values from a resources dictionary

18 years agoPass resources dict to lower-level chcontext function in order to get
Steve Muir [Wed, 12 Oct 2005 17:35:06 +0000 (17:35 +0000)]
Pass resources dict to lower-level chcontext function in order to get
correct resource limits e.g., CPU share

18 years agoAllow caller to indicate that disk usage values have already been set
Steve Muir [Fri, 7 Oct 2005 21:34:40 +0000 (21:34 +0000)]
Allow caller to indicate that disk usage values have already been set

18 years agoUse library function to enter a vserver context
Steve Muir [Fri, 7 Oct 2005 20:53:48 +0000 (20:53 +0000)]
Use library function to enter a vserver context

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.