Discussion:
[CI] cluster tools.
Aneesh Kumar K.V
2002-05-16 07:53:02 UTC
Permalink
Hi,
The attached patch correct some of the build issues that I faced on a
redhat machine. It takes the backup of all the files before it replaces
it with cluster files.

Why ?
configure_cluster didn't have execute permission and as a result on my
system( which doesn't have a shared storage ) it went and replaced the
fstab with the one came with cluster tools without leaving me a backup
. Similarly the network configuration files.
( while rebuilding the fstab file i made a mistake. This caused the
machine to crash during the next boot. and I had to create a custom
initial ram disk to get the machine back. It was actually pain. Having a
backup is always a good idea. ).

If the .old file is already there, no backup is taken .This prevent
rewriting already taken backup when i run make install again and again .
running uninstall in ssi dir ( deconfigure_cluster script is here
).This brings the system back to the old state.

If there is nothing wrong with the patch. I can do a checking.

-aneesh
Index: Makefile
===================================================================
RCS file: /cvsroot/ci-linux/cluster-tools/Makefile,v
retrieving revision 1.2
diff -r1.2 Makefile
62a63
make -C ssi uninstall
Index: ssi/Makefile
===================================================================
RCS file: /cvsroot/ci-linux/cluster-tools/ssi/Makefile,v
retrieving revision 1.6
diff -r1.6 Makefile
33a34,44
@if [ ! -f $(UML_ROOT)/etc/sysconfig/network-scripts/ifcfg-eth0.old ]; then \
f=$(UML_ROOT)/etc/sysconfig/network-scripts/ifcfg-eth0; \
echo "Saving existing $$f as $$f.old"; \
cp -f $$f $$f.old; \
fi
@if [ ! -f $(UML_ROOT)/etc/sysconfig/network-scripts/network-functions.old ]; then \
f=$(UML_ROOT)/etc/sysconfig/network-scripts/network-functions; \
echo "Saving existing $$f as $$f.old"; \
cp -f $$f $$f.old; \
fi
62a74,79
@if [ ! -f $(UML_ROOT)/etc/fstab.old ]; then \
f=$(UML_ROOT)/etc/fstab; \
echo "Saving existing $$f as $$f.old"; \
cp -f $$f $$f.old; \
fi
chmod u+x ./configure_cluster
77a95
chmod u+x ./deconfigure_cluster
Index: ssi/deconfigure_cluster
===================================================================
RCS file: /cvsroot/ci-linux/cluster-tools/ssi/deconfigure_cluster,v
retrieving revision 1.1
diff -r1.1 deconfigure_cluster
7a8,13
[ -f /etc/sysconfig/network-scripts/ifcfg-eth0.old ] &&
mv -f /etc/sysconfig/network-scripts/ifcfg-eth0.old /etc/sysconfig/network-scripts/ifcfg-eth0
[ -f /etc/sysconfig/network-scripts/network-functions.old ] &&
mv -f /etc/sysconfig/network-scripts/network-functions.old /etc/sysconfig/network-scripts/network-functions
[ -f /etc/fstab.old ] &&
mv -f /etc/fstab.old /etc/fstab
Brian J. Watson
2002-05-16 23:35:03 UTC
Permalink
Post by Aneesh Kumar K.V
Hi,
The attached patch correct some of the build issues that I faced on a
redhat machine. It takes the backup of all the files before it replaces
it with cluster files.
[snip]
The Cluster Tools build system is such a mess!! Unfortunately I had a
part to play in creating that mess. Your patch helps resolve some of the
problems, but the build system could certainly stand to be redesigned.

I have a few changes to your patch:
- the make line can be removed from the uninstall_ssi rule, since
you moved it to the uninstall rule
- rather than spell out $(UML_ROOT)/etc/sysconfig/network-scripts
in several places, I set $(NETSCRIPTS) equal to it
- I cleaned up my messy logic for calling configure_cluster and
deconfigure_cluster
- there should now be no need to save /etc/fstab unless UML_ROOT
is set
- similarly there's no need to restore /etc/fstab in
deconfigure_cluster

My updated patch is attached. Note that it has _not_ been tested, since
I don't have convenient access to a hardware-based cluster right now.

The permissions problem with configure_cluster and deconfigure_cluster
leads me to believe that the 0.6.5 release doesn't work for hardware
installations. That's what I get for only testing on UML!! :(

In two or three days I'll roll a new release of Cluster Tools and SSI
with these changes. If anyone's found other problems with the 0.6.5
release, please speak up now.
--
Brian Watson | "Now I don't know, but I been told it's
Software Developer | hard to run with the weight of gold,
Open SSI Clustering Project | Other hand I heard it said, it's
Hewlett-Packard Company | just as hard with the weight of lead."
| -Robert Hunter, 1970

mailto:***@hp.com
http://opensource.compaq.com/
Loading...