Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 4151 - Clustering enhancements for Gentoo
Summary: Clustering enhancements for Gentoo
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
: 23710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-25 15:20 UTC by Olivier Crete
Modified: 2010-09-10 18:59 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
checkserver function and shmdir constant (functions.sh.patch,629 bytes, patch)
2002-06-25 15:21 UTC, Olivier Crete
Details | Diff
shutdown customisations.. (halt.sh.patch,2.04 KB, patch)
2002-06-25 15:22 UTC, Olivier Crete
Details | Diff
bootup downloading in tmpfs... (rc.patch,2.64 KB, patch)
2002-06-25 15:23 UTC, Olivier Crete
Details | Diff
switch boot script (switch,478 bytes, text/plain)
2002-06-25 15:24 UTC, Olivier Crete
Details
further improvements to /sbin/rc (rc.patch,894 bytes, patch)
2002-11-26 17:58 UTC, Olivier Crete
Details | Diff
patch for functions.sh (functions.sh.patch,1.65 KB, patch)
2003-06-26 14:56 UTC, Olivier Crete (RETIRED)
Details | Diff
remove ssi specific stuff from halt.sh (halt.sh.patch,770 bytes, patch)
2003-06-26 14:56 UTC, Olivier Crete (RETIRED)
Details | Diff
patch for rc (rc.patch,4.04 KB, patch)
2003-06-26 14:57 UTC, Olivier Crete (RETIRED)
Details | Diff
patch for runscript.sh (runscript.sh.patch,2.45 KB, patch)
2003-06-26 14:57 UTC, Olivier Crete (RETIRED)
Details | Diff
rc.patch for the new no-tmpfs solutio (rc.patch,4.99 KB, text/plain)
2003-07-15 13:39 UTC, Jean-François Richard
Details
runscript.sh.patch for the new no-tmpfs solution (runscript.sh.patch,2.31 KB, text/plain)
2003-07-15 13:39 UTC, Jean-François Richard
Details
halt.sh.patch ...continuing... no-tmpfs stuff (halt.sh.patch,1.39 KB, text/plain)
2003-07-15 13:40 UTC, Jean-François Richard
Details
functions.sh.patch no-tmpfs... (functions.sh.patch,3.09 KB, text/plain)
2003-07-15 13:41 UTC, Jean-François Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Crete 2002-06-25 15:20:14 UTC
We use Gentoo to build clusters and so we have made a few additions to the boot
system for cluster use. Basicly, the diskless nodes and the server are booted
from the same system image. The nodes nfs mount the server's / fs read-only and
use local tmpfs for modifiable stuff (/root /var /etc).

We modify three existing scripts and add a new one. We feel that it would be
nicer to separate them from the main scripts, but we are not sure how to
integrate it as many things need to be part of the early boot and late shutdown
sequences...

functions.sh: add a checkserver function (telling us if we are on a node or
server) and a constant (shmdir) used to mount tmpfs later.. The checkserver
function can also be used by some services that are used at both places with
different configs.

halt.sh: many things are escaped on nodes... doesn't try to deactivate swap on
nodes (as they have no disk anyways), doesn't go to console on nodes if
umounting fails (the nodes are headless)

rc: do not try to activate swap on diskless nodes, and copy the content of
modifiable directories into tmpfs

and finally we add "switch" which switches runlevels based on the checkserver
function...

patches attached
Comment 1 Olivier Crete 2002-06-25 15:21:10 UTC
Created attachment 1782 [details, diff]
checkserver function and shmdir constant
Comment 2 Olivier Crete 2002-06-25 15:22:07 UTC
Created attachment 1783 [details, diff]
shutdown customisations..
Comment 3 Olivier Crete 2002-06-25 15:23:40 UTC
Created attachment 1784 [details, diff]
bootup downloading in tmpfs...
Comment 4 Olivier Crete 2002-06-25 15:24:12 UTC
Created attachment 1785 [details]
switch boot script
Comment 5 Olivier Crete 2002-07-02 13:09:33 UTC
Btw, more details on our website..
http://www.cerca.umontreal.ca/chp/en/projects/adelie/
Comment 6 Donny Davies (RETIRED) gentoo-dev 2002-10-25 02:44:47 UTC
i sorta cleaned up this stuff a while ago, and sent a unified diff to Az.

i dunno where we are in the grand scheme of things with this.

perhaps it is time to resync our efforts there?  i imagine what you
have and what we have are quite different at the moment.
Comment 7 Olivier Crete 2002-11-26 17:58:09 UTC
Created attachment 5980 [details, diff]
further improvements to /sbin/rc

This is a patch against rc-scripts-1.4.2.4 (from baselayout-1.8.5.4) that adds
a few enhancements from our last cluster.
1. It will work even if /var /root and /etc have their own partitions.. since
NFS doesnt get through mountpoints
2. /etc/mtab is filled properly
3. fstab.node is copied if its there...

Also, this system wont work if /usr is in its own partition on the server (we
dont have a clean solution to that yet)...
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2002-11-27 15:31:15 UTC
Added to cvs.
Comment 9 Olivier Crete (RETIRED) gentoo-dev 2003-06-26 14:55:10 UTC
Here's a new version of our patches against rc-scripts 1.4.2.9 (from baselayout 1.8.5.9). The new design allows much more flexibility and removes SSI specific stuff from the main scripts. Instead of having fixed "node_default/server_default", we use two new init parameters to specify the boot and default runlevels. So we have changed all fixed uses of "boot" to a new variable (BOOTLEVEL). Also we can force a specific soft/runlevel from the kernel command line, allowing different nodes to boot from the same inittab file.
A typical kernel command line might look like: 
linux bootlevel=boot.different softlevel=anotherlevel
The bootlevel will be preserved and will be used just like the current "boot" is used. 
Also, for conf.d, we changed it so that it will look for /etc/conf.d/{service}.{runlevel} before looking for the normal file.
For this thing, we've added an add_suffix function in functions.sh which returns "file.suffix" if it exists or just "file" otherwise. 
Also, the switch script can disappear, since with those new changes, the server is now a normal gentoo system. 

The SSI specific scripts to go with this will come in a later bug report (and are available on request). 
Comment 10 Olivier Crete (RETIRED) gentoo-dev 2003-06-26 14:56:20 UTC
Created attachment 13908 [details, diff]
patch for functions.sh
Comment 11 Olivier Crete (RETIRED) gentoo-dev 2003-06-26 14:56:49 UTC
Created attachment 13909 [details, diff]
remove ssi specific stuff from halt.sh
Comment 12 Olivier Crete (RETIRED) gentoo-dev 2003-06-26 14:57:18 UTC
Created attachment 13910 [details, diff]
patch for rc
Comment 13 Olivier Crete (RETIRED) gentoo-dev 2003-06-26 14:57:31 UTC
Created attachment 13911 [details, diff]
patch for runscript.sh
Comment 14 Jean-François Richard 2003-07-15 13:39:03 UTC
Created attachment 14516 [details]
rc.patch for the new no-tmpfs solutio
Comment 15 Jean-François Richard 2003-07-15 13:39:37 UTC
Created attachment 14517 [details]
runscript.sh.patch for the new no-tmpfs solution
Comment 16 Jean-François Richard 2003-07-15 13:40:10 UTC
Created attachment 14518 [details]
halt.sh.patch ...continuing... no-tmpfs stuff
Comment 17 Jean-François Richard 2003-07-15 13:41:02 UTC
Created attachment 14519 [details]
functions.sh.patch  no-tmpfs...
Comment 18 Jean-François Richard 2003-07-15 13:50:22 UTC
The last four patches are the "adaptation" of our previous patches to the new "no-tmpfs" init 
system in Gentoo.  Since we were using quite different scripts for the boot runlevel (no 
"checkroot" for example) and that the new system hardcodes some of the boot services, we 
had to find a simple yet elegant solution. 
 
We chose to make init scripts read "/etc/runlevels/LEVEL/critical" to know what are the boot 
runlevel services.  If this file is not present, it uses the Gentoo hardcoded defaults. 
 
We still maintain the kernel command line parameters, as in our last "patch-attack". 
Comment 19 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-17 14:50:37 UTC
Quick look want to impress me - its a lot cleaner.  I will get review it
in the next few days and merge it.  If issues, I will get back to you.
Comment 20 Martin Schlemmer (RETIRED) gentoo-dev 2003-07-17 14:52:12 UTC
*** Bug 23710 has been marked as a duplicate of this bug. ***
Comment 21 Heinrich Wendel (RETIRED) gentoo-dev 2003-11-19 06:28:20 UTC
seems to be in portage.