Hi Troy,

thanks for the fast response. I'll attach my current "work spec" and
a tiny patch. Besides the changes described here, the spec is also
an attempt to make it possible to build the ia32e kernel module from it.
I just built a working 1.2.13 client + module for ia32e with it :) but
it's definitely work in progress - I'm not sure I understood that
"redhat-fix.h" trick.

>> - Shouldn't we go for 1.2.13? I think there's at least one fix for
>>   deadlocks on SMP clients in there.
>> 
>
> Part of me says yes, part of me says no.
> The yes part says, that's a great idea, we'll get the latest and all it's 
> fixes.
> The no part of me says - We've got alot of patches in it for building, and we 
> just got the X86_64 aklog bug fixed.  It's stable on alot of machines.  I'm 
> not sure I want to mess with it.
>
> So while I like the idea, I would really like to have more testing.  I don't 
> feel comfortable that we would have enough time to test it good before S.L. 
> 3.0.4 comes out.
> How about we get 3.0.4 out and then get to work on this?

Fine. I didn't want to press for getting any (major) changes in for 3.0.4.

>> - Shouldn't openafs-client require wget, since that's used in the
>>   init script?
>> 
>
> Done
>
> On a similar note.  Do you have any ideas one a better way for this. Jarek 
> brought up the point that wget is doing a tcp ping, while AFS really is using 
> UDP.  So if someone set's up their firewall to just do udp, this is still 
> going to fail.

You could use something like "rxdebug $server -noconnections". The timeout
for this is 20 seconds, but there's a prominent "#define TIMEOUT 20" in 
rxdebug.c, so I guess one could build a modified version for this purpose.
Alas, the *debug commands are broken on 64bit :-(

>> - There are two fileserver implementations: The one installed by default
>>   which is using pthreads, and one using LWP (AFS' "lightweight process"
>>   implementation) which is built (in src/viced) but not installed by
>>   default.
>> 
>>   The former one is supposed to be a bit faster, but rumour says the
>>   latter one may be a bit more stable (all I know for sure is that we
>>   are using the LWP version on our linux file servers, and it *is*
>>   stable - I haven't tried the pthreaded one yet).
>> 
>>   I propose to package both of them (as fileserver.{pt|lwp}) and make
>>   fileserver a link (to fileserver.pt, for backward compatibility).
>> 
>> - The following configure options are foreseen to be activated in the
>>   spec, but they're all off, and I think they should be on:
>> 
>>   --enable-bitmap-later
>> 
>>      This delays vnode bitmap creation by the fileserver until a volume
>>      is accessed the first time, instead of creating them all when the
>>      volumes are attached (during fileserver startup). I think most
>>      sites are using this on their fileservers nowadays.
>> 
>>   --enable-fast-restart
>> 
>>      This does not change the default fileserver behaviour in any way,
>>      but allows adding -DontSalvage to the salvager options for an fs
>>      instance. Corrupted volumes will be taken offline upon attach, to
>>      be salvaged manually later on.
>> 
>>   --enable-bos-restricted-mode
>> 
>>      Again, this just adds a runtime option but does not affect default
>>      behaviour.
>> 
>> - The following configure options are not foreseen to be activated in the
>>   spec, but I think they should, and they should be on:
>> 
>>   --enable-full-vos-listvol-switch
>> 
>>      Adds a "-format" switch to the "vos listvol" and "vos examine"
>>      commands (complete & parseable output). I really need this...
>> 
>>   --enable-bos-new-config
>> 
>>      I haven't used this yet, but I may want to eventually (bosserver
>>      will read BosConfig.new upon restart, if it exists).
>> 
>
> See above talking about not enough testing time for 3.0.4.
> This is something that you will need to send to me the spec file, and 
> changes.  You clearly know what your doing, and I would probrubly mess things 
> up.

See the demo spec:

* For the fileserver, we have to do this in %install (after
    dest/root.server has been copied):

     # lwp fileserver
     mv $RPM_BUILD_ROOT%{_prefix}/afs/bin/fileserver \
        $RPM_BUILD_ROOT%{_prefix}/afs/bin/fileserver.pt
     install -m 755 src/viced/fileserver \
        $RPM_BUILD_ROOT%{_prefix}/afs/bin/fileserver.lwp
     ln -s fileserver.pt $RPM_BUILD_ROOT%{_prefix}/afs/bin/fileserver

    and change %{_prefix}/afs/bin/fileserver to
    %{_prefix}/afs/bin/fileserver* in the server packages' %files section.

* For the extra configure options, we need to change these defines

     # OpenAFS configuration options
     %define enable_bitmap_later 0
     %define enable_bos_restricted_mode 0
     %define enable_fast_restart 0

    into this:

     # OpenAFS configuration options
     %define enable_bitmap_later 1
     %define enable_bos_restricted_mode 1
     %define enable_bos_new_config 1
     %define enable_fast_restart 1
     %define enable_full_vos_listvol_switch 1

    and in %build, add to the config_opts= statement accordingly:

     config_opts="--enable-redhat-buildsys \
     %if %{enable_bitmap_later}
     	--enable-bitmap-later \
     %endif
     %if %{enable_bos_restricted_mode}
  	--enable-bos-restricted-mode \
     %endif
     %if %{enable_fast_restart}
  	--enable-fast-restart \
     %endif
     %if %{enable_full_vos_listvol_switch}
  	--enable-full-vos-listvol-switch \
     %endif
     %if %{enable_bos_new_config}
  	--enable-bos-new-config \
     %endif
  	--enable-transarc-paths"

>> - The "livesys" executable should at least be packaged. Probably the
>>   "sys" executable should be replaced by a (hard) link to livesys.
>> 
>
> You'll have to send me the changes to let me know what you mean.

Simply add it to the openafs-file-list:

    #
    # create filelist
    #
    grep -v "^#" >openafs-file-list <<EOF-openafs-file-list
    %{_bindir}/afsmonitor
    ...
    %{_bindir}/scout
    %{_bindir}/sys
    %{_bindir}/livesys     <----------
    %{_bindir}/tokens
    ...
    %{_sbindir}/vos
    EOF-openafs-file-list

And if you feel like it, replace sys with it entirely.

>> - There's a number of additional tools for tuning, debugging and recovery.
>>   Most of them are built during a normal "make", but not installed by
>>   "make dest". A few have to be built explicitly.
>> 
>>   I propose collecting these in /usr/afs/debug and packaging them into
>>   a new "openafs-debug" package. Most of us will hopefully never need
>>   it, but once you do it's not the time for finding out how to get to
>>   them.
>> 
>
> Sure,
> Can you send me the changes for the spec file.  I don't know if the changes 
> will make it in to 3.0.4, but we can try.

It's in the demo spec as well: Besides the tiny

    Patch301: openafs-1.2.10-twiddle.patch

and an unconditional

    %patch301 -p0

in %prep, it takes

    %package debug
    Summary: OpenAFS additional debugging utilities
    Requires: openafs = %{PACKAGE_VERSION}
    Group: Networking/Filesystems

    %description debug
    The AFS distributed filesystem.  AFS is a distributed filesystem
    allowing cross-platform sharing of files among multiple computers.
    Facilities are provided for access control, authentication, backup and
    administrative management.

    This package provides additional tools useful for understanding and
    debugging the client and server. It is completely optional.

plus this in %build:

    # additional debugging tools
    make -C src/venus twiddle
    make -C src/venus whatfid
    make -C src/tests dumptool
    make -C src/tests afsdump_scan

plus this in %install:

# extra debugging tools

    mkdir -p $RPM_BUILD_ROOT%{_prefix}/afs/debug
    for i in \
      src/viced/cbd \
      src/viced/fsprobe \
      src/viced/check_sysid \
      src/auth/setkey \
      src/fsprobe/fsprobe_test \
      src/rxdebug/rxdumptrace \
      src/venus/twiddle \
      src/venus/whatfid \
      src/venus/test/getinitparams \
      src/tests/dumptool \
      src/tests/afsdump_scan \
      src/ubik/utst_client \
      src/ubik/utst_server \
      src/vlserver/cnvldb \
      src/vlserver/vlclient \
      src/ptserver/readgroup \
      src/ptserver/readpwd \
      src/ptserver/testpt \
      src/ptserver/db_verify \
      src/kauth/rebuild \
       ;do
      install -p -m 755 $i $RPM_BUILD_ROOT%{_prefix}/afs/debug
    done

plus a %files section:

    %files debug
    %defattr(-,root,root)
    %{_prefix}/afs/debug
    %{_prefix}/vice/etc/C

(the /usr/vice/etc/C/afszcm.cat is a message catalog needed for making
various kinds of dumps human readable).

Cheers,
  	Stephan

-- 

   ----------------------------------------------------
| Stephan Wiesand  |                                |
|                  |                                |
| DESY     - DV -  | phone  +49 33762 7 7370        |
| Platanenallee 6  | fax    +49 33762 7 7216        |
| 15738 Zeuthen    |                                |
| Germany          |                                |
   ----------------------------------------------------