Setting tag nodemanager-2.0-38
[nodemanager.git] / nodemanager-lib.spec
1 %define slicefamily %{pldistro}-%{distroname}-%{_arch}
2
3 %define name nodemanager-lib
4 %define version 2.0
5 %define taglevel 38
6
7 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
8
9 Summary: PlanetLab Node Manager Library
10 Name: %{name}
11 Version: %{version}
12 Release: %{release}
13 License: PlanetLab
14 Group: System Environment/Daemons
15 Source0: %{name}-%{version}.tar.gz
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
17
18 Vendor: PlanetLab
19 Packager: PlanetLab Central <support@planet-lab.org>
20 Distribution: PlanetLab %{plrelease}
21 URL: %{SCMURL}
22
23 # not possible because of forward_api_calls
24 #BuildArch: noarch
25
26 # Uses function decorators
27 Requires: python >= 2.4
28 # connecting PLC
29 Requires: python-pycurl
30 # Signed tickets
31 Requires: gnupg
32 # sioc/plnet
33 Requires: pyplnet >= 4.3
34 # we do need the slice images in any case
35 Requires: sliceimage-%{slicefamily}
36
37 %description
38 The PlanetLab Node Manager manages all aspects of PlanetLab node and
39 slice management once the node has been initialized and configured by
40 the Boot Manager. It periodically contacts its management authority
41 for configuration updates. It provides an XML-RPC API for performing
42 local operations on slices.
43 nodemanager-lib only provides a skeleton and needs as a companion
44 either nodemanager-vs or nodemanager-lxc
45
46 %prep
47 %setup -q
48
49 %build
50 # make manages the C and Python stuff
51 %{__make} %{?_smp_mflags} lib
52
53 %install
54 # make manages the C and Python stuff
55 rm -rf $RPM_BUILD_ROOT
56 %{__make} %{?_smp_mflags} install-lib DESTDIR="$RPM_BUILD_ROOT"
57
58 # install the sliver initscript (that triggers the slice initscript if any)
59 mkdir -p $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/
60 rsync -av sliver-initscripts/ $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/
61 chmod 755 $RPM_BUILD_ROOT/usr/share/NodeManager/sliver-initscripts/
62
63 mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/
64 rsync -av initscripts/ $RPM_BUILD_ROOT/%{_initrddir}/
65 chmod 755 $RPM_BUILD_ROOT/%{_initrddir}/*
66
67 install -d -m 755 $RPM_BUILD_ROOT/var/lib/nodemanager
68
69 install -D -m 644 logrotate/nodemanager $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/nodemanager
70
71 ##########
72 %post
73 # tmp - handle file renamings; old names are from 2.0-8
74 renamings="
75 /var/lib/misc/bwmon.dat@/var/lib/nodemanager/bwmon.pickle
76 /root/sliver_mgr_db.pickle@/var/lib/nodemanager/database.pickle
77 /var/log/getslivers.txt@/var/lib/nodemanager/getslivers.txt
78 /var/log/nm@/var/log/nodemanager
79 /var/log/nm.daemon@/var/log/nodemanager.daemon
80 /var/run/nm.pid@/var/run/nodemanager.pid
81 /tmp/sliver_mgr.api@/tmp/nodemanager.api
82 /etc/logrotate.d/nm@/etc/logrotate.d/nodemanager
83 "
84 for renaming in $renamings; do
85   old=$(echo $renaming | cut -d@ -f1)
86   new=$(echo $renaming | cut -d@ -f2)
87   newdir=$(dirname $new)
88   if [ -e "$old" -a ! -e "$new" ] ; then
89       mkdir -p $newdir
90       mv -f $old $new
91   fi
92 done
93 #
94 chkconfig --add conf_files
95 chkconfig conf_files on
96 chkconfig --add nm
97 chkconfig nm on
98 chkconfig --add fuse-pl
99 chkconfig fuse-pl on
100 if [ "$PL_BOOTCD" != "1" ] ; then
101         service nm restart
102         service fuse-pl restart
103 fi
104
105 ##########
106 %preun
107 # 0 = erase, 1 = upgrade
108 if [ $1 -eq 0 ] ; then
109     chkconfig fuse-pl off
110     chkconfig --del fuse-pl
111     chkconfig nm off
112     chkconfig --del nm
113     chkconfig conf_files off
114     chkconfig --del conf_files
115 fi
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(-,root,root,-)
122 %{_datadir}/NodeManager/
123 %{_bindir}/forward_api_calls
124 %{_initrddir}/
125 %{_sysconfdir}/logrotate.d/nodemanager
126 /var/lib/
127
128 %changelog
129 * Tue Jun 26 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-38
130 - split packaging, nodemanager-vs (obsoletes NodeManager) and nodemanager-lib
131
132 * Thu Jun 21 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-37
133 - refactoring: isolate initscript functionality
134 - aimed at making initscript implementation with lxc straightforward
135 - show stack trace when module loading fails
136 - accounts.py renamed into account.py for consistency
137
138 * Sun Jun 03 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-36
139 - /var/log/nodemanager shows duration of mainloop
140
141 * Fri Apr 13 2012 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-35
142 - remove Requires to deprecated vserver-* rpms, use sliceimage-* instead
143
144 * Fri Dec 09 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-34
145 - Added memory scheduling to core scheduler
146 - Core scheduler will now attempt to schedule cores on the same CPU to a slice, if a slice uses multiple cores
147
148 * Thu Jul 07 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-33
149 - tweaked log policy for the core scheduler
150 - curlwrapper has an optional verbose mode
151
152 * Mon Jun 06 2011 Baris Metin <bmetin@verivue.com> - nodemanager-2.0-32
153 - fixes for hmac and omf_control tags
154 - optional besteffort flag to core scheduler
155 - logrotate entry for /var/log/nodemanager.daemon
156 - a template for bash initscripts
157
158 * Tue Mar 22 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-31
159 - rename initscript_body into initscript_code
160 - fix generic vinit for broken bash syntax &>>
161
162 * Mon Mar 21 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-30
163 - new initscript_body slice tag, with stop and restart
164 - generic vinit script live updated
165 - new coresched module
166 - protect against non-existing vsys scripts
167 - use Config. instead of globals
168
169 * Sun Feb 20 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-29
170 - more robust reservation plugin
171
172 * Thu Feb 17 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-28
173 - bind-mount slice's .ssh into sliver for omf-friendly slices - no need to use dotsshmount (vsys) anymore
174 - reservation plugin more robust
175
176 * Tue Feb 01 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-27
177 - pass device to bwlimit
178
179 * Tue Jan 25 2011 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-26
180 - start to use /etc/vservers/<guest>/sysctl/<id>/{setting,value} files as new kernels don't support old syntax
181
182 * Tue Jan 04 2011 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-25
183 - Catch all exceptions for sfa plugin
184
185 * Wed Dec 22 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-24
186 - Handle exception AttributeError: ComponentAPI instance has no attribute 'get_registry'
187
188 * Mon Nov 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-23
189 - Use networks key if interfaces is missing to solve the incompatibility between new NM and old API
190
191 * Mon Nov 29 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-22
192 - plugins/sliverauth.py improvements
193
194 * Mon Oct 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-21
195 - Disable sfagids plugin
196
197 * Mon Oct 11 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-20
198 - Re-tag nodemanager to include conflicted commits
199
200 * Thu Sep 23 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-19
201 - hotfix - make the UpdateSliceTag for ssh_key really incremental (was storming the API)
202 - sfagids plugin deleted
203 - band-aid patch for lack of GetSliceFamily removed
204
205 * Mon Aug 23 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - nodemanager-2.0-18
206
207 * Fri Jul 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - nodemanager-2.0-17
208 - revert curlwrapper to former forking-curl version
209 - fixes in the omf plugin for ssh key location and node hrn
210 - set umask 0022 in tools.daemon
211
212 * Thu Jul 08 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - nodemanager-2.0-16
213 - configure omf-resctl for keys
214
215 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-2.0-15
216 - fix key generation
217
218 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-2.0-14
219 - name changes and fix typos
220
221 * Mon Jun 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - NodeManager-2.0-13
222 - remove config and options parameters from start function
223
224 * Sat Jun 26 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-12
225 - working version of reservable nodes
226 - sliverauth generates an ssh keypair and export pub part as 'ssh_key' tag
227 - dismantled the -s|--startup option (no convincing need for that)
228 - simpler and more robust init.d/nm
229 - initscript content management through replace_file_with_string
230 - sliverauth uses replace_file_with_string
231 - curlwrapper has a debug mode
232
233 * Wed Jun 23 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-11
234 - pretty-printing/normalized python code - hopefully neutral
235
236 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-10
237 - (1) unconditionnally install and chkconfig-like a generic 'vinit' service
238 - that triggers /etc/init.d/vinit.slice if present and executable
239 - (2) install the slice-provided initscript (as per the initscript tag) as
240 - /etc/init.d/vinit.slice
241 - (3) as a result the initscript are now triggered by rc as part of the
242 - standard vserver .. start, properly attached to the vserver,
243 - and properly killed upon vserver .. stop
244 - (4) this works best with util-vserver-pl 0.3-31 or 0.4-12
245
246 * Wed Jun 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-9
247 - fix for 64bits nodes: add newline to the personality files that instruct util-vserver to create 32bits slivers
248 - basic/partial support from reservable nodes through the 'reservation plugin' (not fully working yet)
249 - plugins can set 'persistent_data' to receive the latests know GetSlivers in case the connection is down
250 - cleanup: moved runtime files in /var/lib/nodemanager, and logs as /var/log/nodemanager* (see specfile)
251 - cleanup: some modules renamed (e.g. nm.py becomes nodemanager.py)
252 - cleanup: nodemanger now is a class; however plugins are still dumb modules
253 - cleanup: does not depend on obsolete Set
254
255 * Fri May 14 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-2.0-8
256 - tagging before RC
257
258 * Wed May 12 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - NodeManager-2.0-7
259 - Fix typos in plugins/drl.py and doc/NMAPI.xml.in
260 - Added some precautions to the slice id-saving code
261 - Added log message to code that records the slice id
262
263 * Mon Apr 26 2010 Sapan Bhatia <sapanb@cs.princeton.edu> - NodeManager-2.0-6
264 - This version changes the location of the slice id for components such as PlanetFlow to look up. Previously this piece
265 - of information was stored in the 'vserver name' field of the per-vserver context structure in the kernel but we needed
266 - to move it elsewhere since Daniel decided to use that for something else (the vserver name... pedantic!).
267
268 * Wed Apr 14 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-2.0-5
269 - fix log_call in plugins/drl.py
270
271 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-4
272 - protect against nodes in migrated PLC's not having the hrn tag yet
273
274 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-3
275 - new omf-resctl and drl plugins
276 - specialaccount optimized to overwrite authorized keys only upon changes
277 - codemux plugin has support for a new 'ip' setting
278 - mainloop to display ordered modules&plugins at all times
279
280 * Thu Feb 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-2
281 - modules and plugins have a priority
282 - specialaccounts appears soon in the priority chain
283 - logger.log_call logs process output, and has a timeout
284 - vuser{add,del} run through bash -x
285 - nm initscript has support for 'service nm restartverbose'
286 - logs reviewed for consistency
287 - use hashlib module instead of sha when available
288
289 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-2.0-1
290 - first working version of 5.0:
291 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
292 - nodefamily is 3-fold with pldistro-fcdistro-arch
293 - relies on GetSlivers to expose 'GetSliceFamily' for slivers
294 - (in addition to the 'vref' tag that's still exposed too)
295 - logging reviewed for more convenience
296 - support for 'service nm restartdebug'
297 - make sync knows how to publish uncommitted code on a test node
298
299 * Tue Jan 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-1.8-23
300 - emergency tag - make the setting of hmac by the sliverauth plugin more robust
301
302 * Mon Jan 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-1.8-22
303 - support for f10 and f12 in the vref slice tag
304
305 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-1.8-21
306 - build on fedora12
307 - uses slicename 'sfacm' instead of 'genicw'
308
309 * Fri Oct 30 2009 Sapan Bhatia <sapanb@cs.princeton.edu> - NodeManager-1.8-20
310 - This tag is identical to 1.8-19. The main addition is PLC-controllable vsys scripts. The reason I am
311 - retagging is to eliminate any confusion associated with the -19 tag which was (temporarily) modified a few
312 - days ago.
313
314 * Tue Oct 27 2009 Sapan Bhatia <sapanb@cs.princeton.edu> - NodeManager-1.8-19
315 - This patch makes vsys scripts PLC-configurable. Previously, vsys scripts needed to be
316 - self-contained. With this change, they will be able to refer to the attributes associated with a
317 - slice.
318
319 * Thu Oct 22 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-1.8-18
320 - fix for syntax error
321
322 * Wed Oct 21 2009 anil vengalil <avengali@sophia.inria.fr> - NodeManager-1.8-17
323 - -fixed problem with sioc import at the build side
324 - -bwlimit.set() now accepts the device and does not asume that it is eth0
325
326 * Tue Oct 20 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - NodeManager-1.8-16
327 - - don't hardcode the device name (depends on util-vserver-pl change rev. 15385)
328
329 * Fri Oct 09 2009 Marc Fiuczynski <mef@cs.princeton.edu> - NodeManager-1.8-15
330 - The seed for random previously was the meaning of life (i.e., 42) but
331 - that resulted in a not so random choice for the hmac.  This
332 - implementation now uses a random.seed that is based on the current
333 - time.
334
335 * Tue Oct 06 2009 Marc Fiuczynski <mef@cs.princeton.edu> - NodeManager-1.8-14
336 - Minor fix such that sliverauth.py makes a more specific call to
337 - GetSliceTags that include that specific tagname it is looking for.
338
339 * Sat Sep 19 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - NodeManager-1.8-13
340 - Fix bug that prevented 'OVERRIDES' for working correctly.
341
342 * Tue Sep 08 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-12
343 - Increase disk limits to 10G per sliver
344 - Sanity check slice for home directory before starting (hack)
345 - Check codemux arguments
346
347 * Thu Aug 06 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-11
348 - * Fix Delegation
349 - * Move plcapi in plugin-api GetSlivers() calls.
350 - * Persistent Authcheck and resync session when auth failure
351
352 * Tue Aug 04 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-10
353 - Disabling sliverauth module.  Not ready for deployment.
354
355 * Mon Aug 03 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-9
356 - Fixing overrides semantics.
357
358 * Mon Aug 03 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-8
359 - Generalized plugins
360 - Fixed initscript start up bug.
361
362 * Tue Jun 30 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-7
363 - * Fix delegation authentication problem
364 - * Can now disable codemux using _default slice, and setting tag {codemux: -1}
365
366 * Tue May 26 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - NodeManager-1.8-4
367 - * Rerun initscripts when slice goes from disabled to enabled.
368
369 * Tue May 26 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - NodeManager-1.8-4
370 - * Update session key when out of synch with PLC
371 - * PLCDefaults uses tagname
372
373 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - NodeManager-1.8-3
374 - log invokations of vsys
375
376 * Fri Mar 27 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-2
377
378 * Tue Mar 24 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.8-1
379
380 * Wed Apr 02 2008 Faiyaz Ahmed <faiyaza@cs.prineton.edu - NodeManager-1.7.4
381 - Codemux supports multiple hosts mapping to single slice
382 - Fixed bug in delegation support where tickets delivered weren't
383   being passed to sm.deliver_ticket().
384 * Fri Mar 28 2008 Faiyaz Ahmed <faiyaza@cs.prineton.edu - NodeManager-1.7.3
385 - Codemux now configured via slice attribute (host,port)
386 - Support for multiple vserver reference images (including different archs)
387 - Mom BW emails are sent to list defined by MyPLC's config
388 - Sirius BW loans honored correctly.  Fixed.
389 - BW totals preserved for dynamic slices so as not to game the system.
390 * Thu Feb 14 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - NodeManager-1.7-1 NodeManager-1.7-2
391 - Configures vsys via vsys slice attribute {name: vsys, value: script}
392 - CPU reservations are now calculated via percentages instead of shares
393 - BW totals preserved for dynamic slices
394 - Closes bug where node cap sets off bw slice alarms for all slices.
395
396 * Wed Oct 03 2007 Faiyaz Ahmed <faiyaza@cs.princeton.edu> .
397 - Switched to SVN.
398
399 * Mon Nov 13 2006 Mark Huang <mlhuang@paris.CS.Princeton.EDU> - 
400 - Initial build.