Re: [OpenAFS] vos listaddr problem?

2008-05-28 Thread Christopher D. Clausen
Lars Schimmer <[EMAIL PROTECTED]> wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi!
>
> While trying to get the afsss.pl script to run I found a glitch with
> vos listaddr.
>
> As done via help from the #openafs chat I managed to get my cell back
> to run with vos syncvldb (all fileservers)  after a IP change of the
> servers.
>
> Now a vos listaddr shows:
> trinculo.cgv.tu-graz.ac.at
> deimos.cgv.tu-graz.ac.at
> phobos.cgv.tu-graz.ac.at

I get:

C:\>vos listaddrs  -cell cgv.tugraz.at
trinculo.cgv.tu-graz.ac.at
deimos.cgv.tu-graz.ac.at
phobos.cgv.tu-graz.ac.at
host6968.igd.fhg.de

> But a vos listvldb shows two filserver more (oberon.cgv.tugraz and
> host6968.igd.fhg.de)
> Even a vos exa user.schimmer tells the two fileservers are active
> (and I can access the volumes on those two fileservers).
> And I can do vos syncvldb host6968.igd.fhg.de and a vos listaddr shows
> nothing of that fileserver afterwards.
>
> Did I miss something?

One of those fileservers isn't accessible on the live internet, right? 
I wonder if that has something to do with it.



Re: [OpenAFS] Reduce mount point/symlink name space abuse

2008-05-28 Thread Jeffrey Altman

Rainer Toebbicke wrote:

(remark: I'm speaking Unix here, I don't know about symlinks in Windows 
nor how the cache manager handles them there).


Windows CM treats symlinks and mount points in exactly the same way
as the Unix CM does.  However, since there are no native symlinks on
Windows, a pioctl call is always used.




smime.p7s
Description: S/MIME Cryptographic Signature


[OpenAFS] vos listaddr problem?

2008-05-28 Thread Lars Schimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

While trying to get the afsss.pl script to run I found a glitch with vos
listaddr.

As done via help from the #openafs chat I managed to get my cell back to
run with vos syncvldb (all fileservers)  after a IP change of the servers.

Now a vos listaddr shows:
trinculo.cgv.tu-graz.ac.at
deimos.cgv.tu-graz.ac.at
phobos.cgv.tu-graz.ac.at

But a vos listvldb shows two filserver more (oberon.cgv.tugraz and
host6968.igd.fhg.de)
Even a vos exa user.schimmer tells the two fileservers are active (and I
can access the volumes on those two fileservers).
And I can do vos syncvldb host6968.igd.fhg.de and a vos listaddr shows
nothing of that fileserver afterwards.

Did I miss something?

MfG,
Lars Schimmer
- --
- -
TU Graz, Institut für ComputerGraphik & WissensVisualisierung
Tel: +43 316 873-5405   E-Mail: [EMAIL PROTECTED]
Fax: +43 316 873-5402   PGP-Key-ID: 0x4A9B1723
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPSVhmWhuE0qbFyMRAmJwAJsEhljg8l660A+rFGp1gk7/3qYQqwCfTGc5
fgLxfCs2B/sHD4w0/GbwAFg=
=lgzI
-END PGP SIGNATURE-
___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info


Re: [OpenAFS] AFS Perl under debian lenny - correction

2008-05-28 Thread Lars Schimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi!

As a tip from Derrick I changed all error_message to afs_error_message
in AFS.xs and now it looks partly better.

t/BOSok 4/32# Failed test (t/BOS.t at line 31)
t/BOSok 32/32# Looks like you failed 1 tests of 32.
t/BOSdubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 5
Failed 1/32 tests, 96.88% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-
---
t/BOS.t1   256321   3.12%  5
Failed 1/1 test scripts, 0.00% okay. 1/32 subtests failed, 96.88% okay.
make[2]: *** [test_dynamic] Error 2
make[2]: Leaving directory `/afs/cgv.tugraz.at/tmp/AFS-2.4.0/src/BOS'
make[1]: *** [test] Error 2
make[1]: Leaving directory `/afs/cgv.tugraz.at/tmp/AFS-2.4.0/src'
make: *** [test] Error 2

and the afsss.pl script still runs a segmentation fault.


MfG,
Lars Schimmer
- --
- -
TU Graz, Institut für ComputerGraphik & WissensVisualisierung
Tel: +43 316 873-5405   E-Mail: [EMAIL PROTECTED]
Fax: +43 316 873-5402   PGP-Key-ID: 0x4A9B1723
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIPSHumWhuE0qbFyMRAnGuAJ4l6s66UZb5eShtWEzAjhyTe7AowACfSL6C
5aFPW/wusV8qp8zBYdifHKU=
=PPfr
-END PGP SIGNATURE-
___
OpenAFS-info mailing list
OpenAFS-info@openafs.org
https://lists.openafs.org/mailman/listinfo/openafs-info


[OpenAFS] Reduce mount point/symlink name space abuse

2008-05-28 Thread Rainer Toebbicke
As people ever trying to create a symlink to a file starting with '%' 
or '#' (either by finger trouble, using Gnome, or on purpose) have 
certainly already experienced: this does not work as expected. The 
target is assumed to be a volume name in those cases, and is normally 
useless and difficult to get rid of unless it happens to correspond to 
a valid volumme name.


However, since eons "fs mkmount" (the official way) creates mount 
points not only starting with a '%' or a '#', but also ending with in 
a '.' (dot)!


Worse, on 'input' a mount is only recognized if it corresponds to the 
strict format imposed by fs mkmount, hence every now and then we end 
up with mount points which are not recognized as such by the cache 
manager, and become, de facto, unusable and unremovable.


With the attached patch symlinks to targets starting with '%' or '#' 
are henceforth only interpreted as mount points when they also end in 
a '.' (dot). Still ugly, but this reduces the part of the name space 
carved out for "fs mkmount". 'ln -s %hash percent' now works and the 
link works normally afterwards. (sigh, linking to '%hash.'remains 
problematic - the correct solution would involve a special "create 
mount" system call).


(remark: I'm speaking Unix here, I don't know about symlinks in 
Windows nor how the cache manager handles them there).


The patch also updates the salvager so that it deals correctly with 
the dead bodies created over the years by this discrepancy.



--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Rainer Toebbicke
European Laboratory for Particle Physics(CERN) - Geneva, Switzerland
Phone: +41 22 767 8985   Fax: +41 22 767 7155
--- openafs/src/afs/VNOPS/afs_vnop_symlink.c.o1 2005-10-15 04:33:12.0 
+0200
+++ openafs/src/afs/VNOPS/afs_vnop_symlink.c2008-03-27 14:44:58.0 
+0100
@@ -107,7 +107,7 @@
 InStatus.Mask = AFS_SETMODTIME | AFS_SETMODE;
 InStatus.ClientModTime = osi_Time();
 alen = strlen(atargetName);/* we want it to include the null */
-if (*atargetName == '#' || *atargetName == '%') {
+if ( (*atargetName == '#' || *atargetName == '%') && alen > 1 && 
atargetName[alen-1] == '.') {
InStatus.UnixModeBits = 0644;   /* mt pt: null from "." at end */
if (alen == 1)
alen++; /* Empty string */
--- openafs/src/vol/vol-salvage.c.o12008-01-07 10:01:37.0 +0100
+++ openafs/src/vol/vol-salvage.c   2008-03-27 13:53:28.0 +0100
@@ -3035,27 +3035,47 @@
 } else {
if (ShowSuid && (vnodeEssence->modeBits & 06000))
Log("FOUND suid/sgid file: %s/%s (%u.%u %05o) author %u (vnode %u 
dir %u)\n", dir->name ? dir->name : "??", name, vnodeEssence->owner, 
vnodeEssence->group, vnodeEssence->modeBits, vnodeEssence->author, vnodeNumber, 
dir->vnodeNumber);
-   if (ShowMounts && (vnodeEssence->type == vSymlink)
+   if (/* ShowMounts && */ (vnodeEssence->type == vSymlink)
&& !(vnodeEssence->modeBits & 0111)) {
int code, size;
-   char buf[1024];
+   char buf[1025];
IHandle_t *ihP;
FdHandle_t *fdP;
 
IH_INIT(ihP, fileSysDevice, dir->dirHandle.dirh_handle->ih_vid,
vnodeEssence->InodeNumber);
fdP = IH_OPEN(ihP);
-   assert(fdP != NULL);
+   if (fdP == NULL) {
+   Log("ERROR %s could not open mount point vnode %u\n", 
dir->vname, vnodeNumber);
+   IH_RELEASE(ihP);
+   return;
+   }
size = FDH_SIZE(fdP);
-   assert(size != -1);
-   memset(buf, 0, 1024);
+   if (size < 0) {
+   Log("ERROR %s mount point has invalid size %d, vnode %u\n", 
dir->vname, size, vnodeNumber);
+   FDH_REALLYCLOSE(fdP);
+   IH_RELEASE(ihP);
+   return;
+   }
+   
if (size > 1024)
size = 1024;
code = FDH_READ(fdP, buf, size);
-   assert(code == size);
-   Log("In volume %u (%s) found mountpoint %s/%s to '%s'\n",
-   dir->dirHandle.dirh_handle->ih_vid, dir->vname,
-   dir->name ? dir->name : "??", name, buf);
+   if (code == size) {
+   buf[size] = '\0';
+   if ( (*buf != '#' && *buf != '%') || buf[strlen(buf)-1] != '.' 
) {
+   Log("Volume %u (%s) mount point %s/%s to '%s' invalid, %s 
to symbolic link\n",
+   dir->dirHandle.dirh_handle->ih_vid, dir->vname, 
dir->name ? dir->name : "??", name, buf,
+   Testing ? "would convert" : "converted");
+   vnodeEssence->modeBits |= 0111;
+   vnodeEssence->changed = 1;
+   } else if (ShowMounts) Log("In volume %u (%s) found mountpoint 
%s/%s to '%s'\n",
+   dir->dirHandle.dirh_handle->ih_vid, dir->vname,
+   dir->name ? dir->name : "??"