RE: SATA to CF -- great for embedded DFly firewalls

2006-08-12 Thread James Mansion
:Is Dragonfly easy to configure for readonly root?

Sure.  How do you think the CD boots ?

I didn't say 'can it' I said 'easy'. Is it a) documented
and b) trivial - or is it one of these 'work through the
rc scripts in the boot process yourself and work it out'
jobs?

Sort of thing I'm looking for is a boot param that I can
default to 'readonly-root' and override with 'readonly-root=no'
for when I screw up the image.

James





Default PATH in login.conf

2006-08-12 Thread Francois Tigeot
Hi,

I have been bitten by a PATH issue when trying to configure a remote X
terminal.

The default PATH in /etc/login.conf includes /usr/X11R6/bin and not
/usr/pkg/xorg/bin

Shouldn't this be updated to reflect the new pkgsrc installation
directories ?

-- 
Francois Tigeot


Re: Default PATH in login.conf

2006-08-12 Thread Bill Hacker

Francois Tigeot wrote:

Hi,

I have been bitten by a PATH issue when trying to configure a remote X
terminal.

The default PATH in /etc/login.conf includes /usr/X11R6/bin and not
/usr/pkg/xorg/bin

Shouldn't this be updated to reflect the new pkgsrc installation
directories ?



Should not *both* be removed unless/until one of those suicide-kits is actually 
installed?  '~/games' as well, while we are cleaning up old mistakes.


Bill Hacker



RE: SATA to CF -- great for embedded DFly firewalls

2006-08-12 Thread Matthew Dillon

::Is Dragonfly easy to configure for readonly root?
:
:Sure.  How do you think the CD boots ?
:
:I didn't say 'can it' I said 'easy'. Is it a) documented
:and b) trivial - or is it one of these 'work through the
:rc scripts in the boot process yourself and work it out'
:jobs?
:
:Sort of thing I'm looking for is a boot param that I can
:default to 'readonly-root' and override with 'readonly-root=no'
:for when I screw up the image.
:
:James

Well, you can always boot single-user (boot -s).  The root filesystem
will be mounted read-only and no service will be started.

It is also a good idea to store a backup kernel image on slash.  Even
though 'make installkernel' will rename /kernel to /kernel.old, it is
a good idea to have a working kernel stored as /kernel.bak so you can
'boot /kernel.bak' in case you blow up the installed kernel.

If you need temporary writable filesytems, e.g. for /tmp and /var/tmp,
mount_mfs can be used.

-Matt



Re: Default PATH in login.conf

2006-08-12 Thread Matthew Dillon

:..
: I have been bitten by a PATH issue when trying to configure a remote X
: terminal.
: 
: The default PATH in /etc/login.conf includes /usr/X11R6/bin and not
: /usr/pkg/xorg/bin
: 
: Shouldn't this be updated to reflect the new pkgsrc installation
: directories ?
: 
:
:Should not *both* be removed unless/until one of those suicide-kits is 
actually 
:installed?  '~/games' as well, while we are cleaning up old mistakes.
:
:Bill Hacker

Nah.  Convenience is important.  I've fixed the default in the sources
for HEAD.

-Matt
Matthew Dillon 
[EMAIL PROTECTED]


RE: SATA to CF -- great for embedded DFly firewalls

2006-08-12 Thread James Mansion
Well, you can always boot single-user (boot -s).  The root filesystem
will be mounted read-only and no service will be started.

That wasn't quite what I had in mind either, though thank you for
your time.

Have you looked at Puppy linux or SLAX (or the linux-live scripts?)

These make it rather easy to run from compact flash or an arbitrary
readonly source, and then have a means to store small customisations
back.

I'm *assuming* that the setup for the CDROM isn't generic enough
to handle that sort of thing - or is it?

(If I had broadband I'd download and try it - but I just have iSDN
so getting ISOs for the hell of it is a chore).

James





dfly (1.6.1) nfs server does not like to export subdirs for non-fs exports

2006-08-12 Thread Tomaž Borštnar

Aug 12 22:26:31 machine mountd[4146]: -alldirs requested but 
/net/nfs-exports/10.200.200.10 is not a filesystem mountpoint
Aug 12 22:26:31 machine mountd[4146]: bad exports list line 
/net/nfs-exports/10.200.200.10 -alldirs  -maproot

So no luck in flexible exporting for me?

Tomaž


Re: Postfix suddenly stopped working

2006-08-12 Thread Jon Hamilton
Matthew Dillon [EMAIL PROTECTED], said on Thu Jul 27, 2006 [07:14:53 PM]:
} 
} With postfix stuck, do:
} 
} /usr/local/bin/vnodeinfo -a  /tmp/outfile
} 
} Then look for vnode information structures containing LOCKS or BLKED
} entries that might be related to the problem.
} 
} If there are no blocked locks then it could be a race in our POSIX
} locking sleep/wakeup code.

I ran with -HEAD built from a couple of weeks ago and did not see a
reoccurrance of the postfix queue sticking.  Last night, I went back
to 

DragonFly woodstock.nethamilton.net 1.7.0-PREVIEW DragonFly 1.7.0-PREVIEW #6: 
Sat Aug 12 12:07:04 CDT 2006 [EMAIL 
PROTECTED]:/usr/obj/usr/src/sys/WOODSTOCK  i386

with a build/installkernel and installworld.

To my surprise, the symptom popped back up this morning.  I checked the source,
and found that the patch above hadn't been applied.  I applied the patch and 
rebuilt and installed the kernel, and the queue got stuck again this 
afternoon.

I ran vnodeinfo as above, and after ripping out the non-locked stuff from
the output the results are at http://www.nethamilton.net/lock_debug/stuck1.txt
(which is pre-patch) and http://www.nethamilton.net/lock_debug/stuck2.txt 
(post-patch).  I'm not sure what this is trying to tell me aside from 
confirming that postfix is holding a lock on unix.local.  

A couple of questions:
1) is this a different problem, since it's occurring even after I applied 
   the patch?
2) what can I do to diagnose further?  

I'm happy to fiddle around to gather info on this, but need a little 
hand holding in terms of exactly what to do.  

-- 

   Jon Hamilton 
   [EMAIL PROTECTED]


Re: Postfix suddenly stopped working

2006-08-12 Thread Matthew Dillon

:I ran with -HEAD built from a couple of weeks ago and did not see a
:reoccurrance of the postfix queue sticking.  Last night, I went back
:to 
:
:DragonFly woodstock.nethamilton.net 1.7.0-PREVIEW DragonFly 1.7.0-PREVIEW #6: 
Sat Aug 12 12:07:04 CDT 2006 [EMAIL 
PROTECTED]:/usr/obj/usr/src/sys/WOODSTOCK  i386
:
:with a build/installkernel and installworld.
:
:To my surprise, the symptom popped back up this morning.  I checked the source,
:and found that the patch above hadn't been applied.  I applied the patch and 
:rebuilt and installed the kernel, and the queue got stuck again this 
:afternoon.

There are two commits and I'm not sure whether you applied both of them.
kern/kern_lockf.c 1.32 and 1.33 both need to be applied.

PREVIEW isn't HEAD.  I will slip the PREVIEW tag for those two commits
right now.  If you scrap your manual patch and resync with preview you
should get both patches.

:I ran vnodeinfo as above, and after ripping out the non-locked stuff from
:the output the results are at http://www.nethamilton.net/lock_debug/stuck1.txt
:(which is pre-patch) and http://www.nethamilton.net/lock_debug/stuck2.txt 
:(post-patch).  I'm not sure what this is trying to tell me aside from 
:confirming that postfix is holding a lock on unix.local.  
:
:A couple of questions:
:1) is this a different problem, since it's occurring even after I applied 
:   the patch?
:2) what can I do to diagnose further?  
:
:I'm happy to fiddle around to gather info on this, but need a little 
:hand holding in terms of exactly what to do.  
:
:-- 
:
:   Jon Hamilton 
:   [EMAIL PROTECTED]

From the information you posted I'm guessing that a lock did not get
released, which is symptom of the 1.32 commit (the patch I emailed you
was the 1.33 commit, but PREVIEW did not have 1.32 OR 1.33).

I have included the diff between 1.31 and 1.33 of kern_lockf.c below
for reference but if you update to the latest preview you should
get the patches automatically.

-Matt
Matthew Dillon 
[EMAIL PROTECTED]

Index: kern_lockf.c
===
RCS file: /cvs/src/sys/kern/kern_lockf.c,v
retrieving revision 1.31
retrieving revision 1.33
diff -u -r1.31 -r1.33
--- kern_lockf.c27 May 2006 02:03:17 -  1.31
+++ kern_lockf.c3 Aug 2006 16:06:15 -   1.33
@@ -38,7 +38,7 @@
  *
  * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
  * $FreeBSD: src/sys/kern/kern_lockf.c,v 1.25 1999/11/16 16:28:56 phk Exp $
- * $DragonFly: src/sys/kern/kern_lockf.c,v 1.31 2006/05/27 02:03:17 dillon Exp 
$
+ * $DragonFly: src/sys/kern/kern_lockf.c,v 1.33 2006/08/03 16:06:15 dillon Exp 
$
  */
 
 #include sys/param.h
@@ -239,8 +239,15 @@
 
switch(ap-a_op) {
case F_SETLK:
-   ap-a_vp-v_flag |= VMAYHAVELOCKS;
+   /*
+* NOTE: It is possible for both lf_range and lf_blocked to
+* be empty if we block and get woken up, but another process
+* then gets in and issues an unlock.  So VMAYHAVELOCKS must
+* be set after the lf_setlock() operation completes rather
+* then before.
+*/
error = lf_setlock(lock, owner, type, flags, start, end);
+   ap-a_vp-v_flag |= VMAYHAVELOCKS;
break;
 
case F_UNLCK:
@@ -683,7 +690,7 @@
 * Extend brange to cover range and scrap range.
 */
brange-lf_end = range-lf_end;
-   brange-lf_flags |= brange-lf_flags  F_NOEND;
+   brange-lf_flags |= range-lf_flags  F_NOEND;
TAILQ_REMOVE(lock-lf_range, range, lf_link);
if (range-lf_flags  F_POSIX)
--count;
@@ -753,20 +760,23 @@
 }
 
 /*
- * Wakeup pending lock attempts.
+ * Wakeup pending lock attempts.  Theoretically we can stop as soon as
+ * we encounter an exclusive request that covers the whole range (at least
+ * insofar as the sleep code above calls lf_wakeup() if it would otherwise
+ * exit instead of loop), but for now just wakeup all overlapping
+ * requests.  XXX
  */
 static void
 lf_wakeup(struct lockf *lock, off_t start, off_t end)
 {
struct lockf_range *range, *nrange;
+
TAILQ_FOREACH_MUTABLE(range, lock-lf_blocked, lf_link, nrange) {
if (lf_overlap(range, start, end) == 0)
continue;
TAILQ_REMOVE(lock-lf_blocked, range, lf_link);
range-lf_flags = 1;
wakeup(range);
-   if (range-lf_start = start  range-lf_end = end)
-   break;
}
 }
 


Re: Postfix suddenly stopped working

2006-08-12 Thread Jon Hamilton
Matthew Dillon [EMAIL PROTECTED], said on Sat Aug 12, 2006 [04:58:32 PM]:
} 
} :I ran with -HEAD built from a couple of weeks ago and did not see a
} :reoccurrance of the postfix queue sticking.  Last night, I went back
} :to 
} :
} :DragonFly woodstock.nethamilton.net 1.7.0-PREVIEW DragonFly 1.7.0-PREVIEW 
#6: Sat Aug 12 12:07:04 CDT 2006 [EMAIL 
PROTECTED]:/usr/obj/usr/src/sys/WOODSTOCK  i386
} :
} :with a build/installkernel and installworld.
} :
} :To my surprise, the symptom popped back up this morning.  I checked the 
source,
} :and found that the patch above hadn't been applied.  I applied the patch and 
} :rebuilt and installed the kernel, and the queue got stuck again this 
} :afternoon.
} 
} There are two commits and I'm not sure whether you applied both of them.
} kern/kern_lockf.c 1.32 and 1.33 both need to be applied.
} 
} PREVIEW isn't HEAD.  I will slip the PREVIEW tag for those two commits
} right now.  If you scrap your manual patch and resync with preview you
} should get both patches.

Right; I normally follow -PREVIEW and only went to HEAD a couple of weeks
ago because it was necessary to get vnodeinfo built.  I was under the 
impression that you had slipped the tag early this week to capture these
two commits (well, I didn't realize there were two, and that's sure to be
why my manual application of one of the two didn't resolve the issue).

[...]

} I have included the diff between 1.31 and 1.33 of kern_lockf.c below
} for reference but if you update to the latest preview you should
} get the patches automatically.

No worries; I'll sync up and build again.  Thanks.

-- 

   Jon Hamilton 
   [EMAIL PROTECTED]


Re: dfly (1.6.1) nfs server does not like to export subdirs for non-fs exports

2006-08-12 Thread Matthew Dillon

:Aug 12 22:26:31 machine mountd[4146]: -alldirs requested but 
/net/nfs-exports/10.200.200.10 is not a filesystem mountpoint
:Aug 12 22:26:31 machine mountd[4146]: bad exports list line 
/net/nfs-exports/10.200.200.10 -alldirs  -maproot
:
:So no luck in flexible exporting for me?
:
:Tomaž

You are trying to export a NFS mounted filesystem?  I don't think that
ever worked.  The NFS filesystem doesn't have any of the
file-handle-to-vnode conversion functions necessary to be exportable.
It's questionable whether it would be a good idea anyway.

-Matt
Matthew Dillon 
[EMAIL PROTECTED]