X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodemanager-lib.spec;h=b7674b1b517828dbc5d1d873b3545f3d2db1d67e;hb=fd251de13cea2b9d8f3080a10d9d3f278100a9ae;hp=eb547166179af935ebe0b94b57109d45c0456264;hpb=bf9ffbbab53c490871bd94002d01553567168a02;p=nodemanager.git diff --git a/nodemanager-lib.spec b/nodemanager-lib.spec index eb54716..b7674b1 100644 --- a/nodemanager-lib.spec +++ b/nodemanager-lib.spec @@ -1,11 +1,20 @@ %define slicefamily %{pldistro}-%{distroname}-%{_arch} %define name nodemanager-lib -%define version 2.0 -%define taglevel 38 +%define version 5.2 +%define taglevel 9 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}} +########## use initscripts or systemd unit files to start installed services +%if "%{distro}" == "Fedora" && %{distrorelease} >= 18 +%define make_options WITH_SYSTEMD=true +%define initdir /usr/lib/systemd/system +%else +%define make_options WITH_INIT=true +%define initdir %{_initrddir} +%endif + Summary: PlanetLab Node Manager Library Name: %{name} Version: %{version} @@ -23,8 +32,13 @@ URL: %{SCMURL} # not possible because of forward_api_calls #BuildArch: noarch +# make sure we can invoke systemctl in post install script +%if "%{initdir}" != "%{_initrddir}" +Requires: systemd +%endif + # Uses function decorators -Requires: python >= 2.4 +Requires: python >= 2.7 # connecting PLC Requires: python-pycurl # Signed tickets @@ -33,6 +47,8 @@ Requires: gnupg Requires: pyplnet >= 4.3 # we do need the slice images in any case Requires: sliceimage-%{slicefamily} +# for bwlimit +Requires: plnode-utils %description The PlanetLab Node Manager manages all aspects of PlanetLab node and @@ -43,54 +59,24 @@ local operations on slices. nodemanager-lib only provides a skeleton and needs as a companion either nodemanager-vs or nodemanager-lxc +############################## %prep %setup -q %build # make manages the C and Python stuff -%{__make} %{?_smp_mflags} lib +%{__make} %{?_smp_mflags} %{make_options} lib %install # make manages the C and Python stuff rm -rf $RPM_BUILD_ROOT -%{__make} %{?_smp_mflags} install-lib DESTDIR="$RPM_BUILD_ROOT" - -# install the sliver initscript (that triggers the slice initscript if any) -mkdir -p $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/ -rsync -av sliver-initscripts/ $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/ -chmod 755 $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/ - -mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/ -rsync -av initscripts/ $RPM_BUILD_ROOT/%{_initrddir}/ -chmod 755 $RPM_BUILD_ROOT/%{_initrddir}/* +%{__make} %{?_smp_mflags} %{make_options} install-lib DESTDIR="$RPM_BUILD_ROOT" -install -d -m 755 $RPM_BUILD_ROOT/var/lib/nodemanager - -install -D -m 644 logrotate/nodemanager $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nodemanager - -########## +############################## %post -# tmp - handle file renamings; old names are from 2.0-8 -renamings=" -/var/lib/misc/bwmon.dat@/var/lib/nodemanager/bwmon.pickle -/root/sliver_mgr_db.pickle@/var/lib/nodemanager/database.pickle -/var/log/getslivers.txt@/var/lib/nodemanager/getslivers.txt -/var/log/nm@/var/log/nodemanager -/var/log/nm.daemon@/var/log/nodemanager.daemon -/var/run/nm.pid@/var/run/nodemanager.pid -/tmp/sliver_mgr.api@/tmp/nodemanager.api -/etc/logrotate.d/nm@/etc/logrotate.d/nodemanager -" -for renaming in $renamings; do - old=$(echo $renaming | cut -d@ -f1) - new=$(echo $renaming | cut -d@ -f2) - newdir=$(dirname $new) - if [ -e "$old" -a ! -e "$new" ] ; then - mkdir -p $newdir - mv -f $old $new - fi -done -# +########## traditional init +%if "%{initdir}" == "%{_initrddir}" +########## chkconfig --add conf_files chkconfig conf_files on chkconfig --add nm @@ -98,13 +84,29 @@ chkconfig nm on chkconfig --add fuse-pl chkconfig fuse-pl on if [ "$PL_BOOTCD" != "1" ] ; then - service nm restart - service fuse-pl restart + service nm restart + service fuse-pl restart +fi +########## +%else +########## systemd +systemctl enable nm.service +systemctl enable conf_files.service +# empty +#systemctl enable fuse-pl.service +if [ "$PL_BOOTCD" != "1" ] ; then + systemctl restart nm.service +# systemctl restart fuse-pl.service fi - ########## +%endif + +############################## %preun # 0 = erase, 1 = upgrade +########## traditional init +%if "%{initdir}" == "%{_initrddir}" +########## if [ $1 -eq 0 ] ; then chkconfig fuse-pl off chkconfig --del fuse-pl @@ -113,7 +115,18 @@ if [ $1 -eq 0 ] ; then chkconfig conf_files off chkconfig --del conf_files fi +########## +%else +########## systemd +if [ $1 -eq 0 ] ; then +# systemctl disable fuse-pl.service + systemctl disable conf_files.service + systemctl disable nm.service +fi +########## +%endif +############################## %clean rm -rf $RPM_BUILD_ROOT @@ -121,14 +134,126 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root,-) %{_datadir}/NodeManager/ %{_bindir}/forward_api_calls -%{_initrddir}/ +%{initdir}/ %{_sysconfdir}/logrotate.d/nodemanager -/var/lib/ +/var/lib/nodemanager/ +%config(noreplace) /etc/sysconfig/nodemanager %changelog +* Wed Dec 11 2013 Thierry Parmentelat - nodemanager-5.2-9 +- fixes in hostmap, and in interfaces +- new vsys_sysctl +- privatebridge now comes with nodemanager-lib + +* Fri Sep 20 2013 Thierry Parmentelat - nodemanager-5.2-8 +- omf plugin does not block any longer when running trigger script +- log goes into sliver's /var/log instead + +* Wed Aug 28 2013 Thierry Parmentelat - nodemanager-5.2-7 +- new install-scripts target in Makefile +- conf_files and fuse-pl initscripts chmod'ed +x +- omf_resctl config template tweaked to use _slicename_%_hostname_ + +* Sun Jul 14 2013 Thierry Parmentelat - nodemanager-5.2-6 +- make sure to create /etc/planetlab/virt so others can read that +- expose get_node_virt() and command_in_slice() +- refined omf_resctl plugin (fetches trigger, and calls it on expire change) +- user's .profile now has right owner +- other tweaks in lxc slivers + +* Wed Jul 03 2013 Thierry Parmentelat - nodemanager-5.2-5 +- lxc slice creation: slice user was created with unknown gid - fixed +- lxc slice creation: .profile for root and user - fixed + +* Sat Jun 29 2013 Thierry Parmentelat - nodemanager-5.2-4 +- fix umounting of ssh directory when deleting omf-friendly slivers +- support for writing cgroups in subsystems other than cpuset +- add xid to template match +- finer-grained split between -lib -vs and -lxc +- first roughly complete omf_resctl for omfv6 +- minor fix for when getslivers does not have minexemptrate + +* Fri May 24 2013 Andy Bavier - nodemanager-5.2-3 +- Fix path, machine arch in slivers + +* Tue Apr 30 2013 Stephen Soltesz - nodemanager-5.2-2 + +* Thu Mar 07 2013 Thierry Parmentelat - nodemanager-5.2-1 +- no-op bump to 5.2 to be in line with the rest of the system + +* Thu Feb 21 2013 Thierry Parmentelat - nodemanager-2.1-22 +- improvements to privatebridge + +* Sat Jan 19 2013 Scott Baker - nodemanager-2.1-21 +- change hostnames related to private IPs to use pvt.hostname instead of slice_name.hostname + +* Mon Jan 14 2013 Scott Baker - nodemanager-2.1-20 +- fix wrong gre tunnel deleted when topology changes + +* Mon Jan 14 2013 Scott Baker - nodemanager-2.1-19 +- Update /etc/hosts in slivers from sliver_hostmap tag. + +* Mon Jan 07 2013 Scott Baker - nodemanager-2.1-18 +- Support passing a list of interfaces in slice interface tag to configure multiple interfaces, +- initial check-in of privatebridge plugin. + +* Fri Dec 14 2012 Scott Baker - nodemanager-2.1-17 +- set ownership of slice homedir, att slice user to etc/sudoers inside of slice + +* Wed Dec 12 2012 Scott Baker - nodemanager-2.1-16 +- fix slices not deleted properly when they use vsys + +* Mon Dec 10 2012 Scott Baker - nodemanager-2.1-15 +- fix error in syndicate plugin, add error message to nodemanager for attributeerror during load/start + +* Mon Dec 10 2012 Scott Baker - nodemanager-2.1-14 +- Add syndicate plugin, create /etc/hostname and home directory in LXC guests + +* Tue Nov 13 2012 Andy Bavier - nodemanager-2.1-13 +- Bridge virtual interfaces to VLANs + +* Wed Oct 24 2012 Andy Bavier - nodemanager-2.1-12 +- Add support for L2 bridged interfaces with public IPs inside a slice + +* Thu Oct 18 2012 Scott Baker - nodemanager-2.1-11 +- Support for freezing BestEffort slices for Vicci + +* Wed Sep 05 2012 Andy Bavier - nodemanager-2.1-10 +- Change to use new vsh (wrapper for lxcsu) + +* Fri Aug 31 2012 Thierry Parmentelat - nodemanager-2.1-9 +- add missing import +- 2.1-8 is less broken than 2.1-7 for omf-friendly slices, in that the slivers would get created, but the OMF-feature probably won't work as .ssh won't get exposed to the sliver + +* Thu Aug 30 2012 Thierry Parmentelat - nodemanager-2.1-8 +- tag 2.1-7 was broken for OMF-friendly slices +- expose_ssh_dir was erroneously defined on the Worker class + +* Thu Jul 19 2012 Thierry Parmentelat - nodemanager-2.1-7 +- bwlimitlxc now ships with plnode-utils + +* Mon Jul 09 2012 Thierry Parmentelat - nodemanager-2.1-6 +- set LD_PRELOAD for linux-containers nodes + +* Thu Jun 28 2012 Thierry Parmentelat - nodemanager-2.1-5 +- first complete version for vs and lxc - functional but not thoroughly tested though + +* Tue Jun 26 2012 Thierry Parmentelat - nodemanager-2.1-4 +- split packaging in 3 (lib, lxc, vs) +- this tag will only work with lxc though + * Tue Jun 26 2012 Thierry Parmentelat - nodemanager-2.0-38 - split packaging, nodemanager-vs (obsoletes NodeManager) and nodemanager-lib +* Mon Jun 25 2012 Thierry Parmentelat - nodemanager-2.1-3 +- renamed bwlimit as bwlimitlxc to avoid conflicts with util-vserver-pl +- purpose being to be able to run this branch on vserver nodes as well + +* Thu Jun 21 2012 Thierry Parmentelat - nodemanager-2.1-2 +- merged nodemanager-2.0-37 in 2.1/lxc_devel and add initscript support to lxc +- passes tests with lxc but won't build against vs due to conflict +- as bwlimit.py also ships with util-vserver-pl + * Thu Jun 21 2012 Thierry Parmentelat - nodemanager-2.0-37 - refactoring: isolate initscript functionality - aimed at making initscript implementation with lxc straightforward @@ -138,6 +263,10 @@ rm -rf $RPM_BUILD_ROOT * Sun Jun 03 2012 Thierry Parmentelat - nodemanager-2.0-36 - /var/log/nodemanager shows duration of mainloop +* Fri Apr 13 2012 Thierry Parmentelat - nodemanager-2.1-1 +- first working draft for dealing with libvirt/lxc on f16 nodes +- not expected to work with mainline nodes (use 2.0 for that for now) + * Fri Apr 13 2012 Thierry Parmentelat - nodemanager-2.0-35 - remove Requires to deprecated vserver-* rpms, use sliceimage-* instead @@ -381,12 +510,14 @@ rm -rf $RPM_BUILD_ROOT - Codemux supports multiple hosts mapping to single slice - Fixed bug in delegation support where tickets delivered weren't being passed to sm.deliver_ticket(). + * Fri Mar 28 2008 Faiyaz Ahmed - NodeManager-1.7-1 NodeManager-1.7-2 - Configures vsys via vsys slice attribute {name: vsys, value: script} - CPU reservations are now calculated via percentages instead of shares