-#
-# $Id$
-#
-%define url $URL$
-
%define name util-vserver-pl
%define version 0.4
-%define taglevel 10
+%define taglevel 28
%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
Vendor: PlanetLab
Packager: PlanetLab Central <support@planet-lab.org>
Distribution: PlanetLab %{plrelease}
-URL: %(echo %{url} | cut -d ' ' -f 2)
+URL: %{SCMURL}
Requires: util-vserver util-vserver-core util-vserver-build util-vserver-sysv
Provides: util-vserver-python = %{version}-%{release}
echo /bin/vsh >> /etc/shells
fi
-/usr/sbin/bwlimit init
-
# Migrate old style vservers to new style
pushd /etc/vservers
for i in `ls /etc/vservers`
do
- echo "persistent,lback_allow" > $i/nflags
- /usr/sbin/nattribute --set --nid `cat $i/context` --flag lback_allow
-
- sed -i -e '/tmpfs\tsize=16m/d' $i/fstab
+ if grep -rq "^0\.0\.0\.0" "$i/interfaces/"; then
+ # set nflags
+ echo "persistent,lback_allow" > $i/nflags
+ /usr/sbin/nattribute --set --nid `cat $i/context` --flag lback_allow
- mkdir -p $i/sysctl/0
- echo net.ipv4.ip_forward > $i/sysctl/0/setting
- echo 1 > $i/sysctl/0/value
+ # set cflags
+ echo -e "persistent\n~info_init" > $i/cflags
+ /usr/sbin/vattribute --set --xid `cat $i/context` --flag ~sched_hard
- echo -e "persistent\n~info_init" > $i/cflags
- /usr/sbin/vattribute --set --xid `cat $i/context` --flag ~sched_hard
+ # deprecated
+ rm -f $i/flags
+
+ # remove 16mb tmp restrictions
+ sed -i -e '/tmpfs\tsize=16m/d' $i/fstab
+
+ # enable mount namespaces
+ rm -f $i/nonamespace
+
+ # enable IP forwarding
+ mkdir -p $i/sysctl/0
+ echo net.ipv4.ip_forward > $i/sysctl/0/setting
+ echo 1 > $i/sysctl/0/value
+
+ # create missing interface files/directories
+ mkdir -p $i/interfaces/0
+ hostname -i > $i/interfaces/0/ip
+ touch $i/interfaces/0/nodev
+
+ mkdir -p $i/interfaces/1
+ echo -e "127.0.0.1" > $i/interfaces/1/ip
+ touch $i/interfaces/1/nodev
+ fi
done
popd
%files -f %name-python.list
%defattr(-,root,root,-)
-%{_sbindir}/bwlimit
%{_sbindir}/disklimit
%{_sbindir}/vuseradd
%{_sbindir}/vuserdel
%{_mandir}/man8/vsh.8*
%changelog
+* Tue Aug 28 2012 Andy Bavier <acb@cs.princeton.edu> - util-vserver-pl-0.4-28
+- Bugfix for IPv6, ported from 0.3 branch
+
+* Thu Jul 19 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-27
+- bwlimit now ships with plnode-utils
+
+* Tue Jun 07 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-26
+- added support for loopback isolation
+
+* Wed Mar 23 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-25
+- vuserdel doesn't handle new vserver features that we are using like mount namespaces and/or cgroups, so it silently fails most of the time. Remove old code and start to use vserver provided tools
+
+* Thu Mar 10 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-24
+- * associate SSH processes with the appropriate cgroup
+- * migrate only when neccessary
+
+* Wed Mar 02 2011 S.Çağlar Onur <caglar@verivue.com> - util-vserver-pl-0.4-23
+- remove hardcoded nproc.hard limit as it shouldn't be hardcoded
+
+* Wed Feb 02 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-22
+- pass device to bwlimit
+
+* Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-21
+- force remove nonamespace
+
+* Tue Oct 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-20
+- Fix the segfault caused by existing TUN device
+
+* Fri Aug 13 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-19
+- Fix syntax error
+
+* Mon Aug 09 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-18
+- migrate old style interface files to new style
+
+* Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-17
+- Some dead code removed from repository
+
+* Mon Jul 19 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-16
+- * use system-wide umask
+- * enable set_ipaddresses_config function
+- * set more default values
+
+* Mon Jul 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-15
+- new constant VC_LIM_INFINITY
+
+* Tue Jul 06 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-14
+- fix setting cpu_share for slices
+
+* Thu Jun 24 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-13
+- start to use mount namespaces
+
+* Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - util-vserver-pl-0.4-12
+- initscripts are ignored - handled by nodemanager and triggered by rc
+
+* Thu Jun 17 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - util-vserver-pl-0.4-11
+- sliver name as the last argument to initscript
+
* Tue Jun 01 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - util-vserver-pl-0.4-10
- remove tmpfs mounted /tmp