Re: 11.0 stuck on high network load

2016-09-05 Thread Slawa Olhovchenkov
On Sun, Sep 04, 2016 at 06:46:12PM -0700, hiren panchasara wrote:

> On 09/05/16 at 12:57P, Slawa Olhovchenkov wrote:
> > I am try using 11.0 on Dual E5-2620 (no X2APIC).
> > Under high network load and may be addtional conditional system go to
> > unresponsible state -- no reaction to network and console (USB IPMI
> > emulation). INVARIANTS give to high overhad. Is this exist some way to
> > debug this?
> 
> Can you panic it from console to get to db> to get backtrace and other
> info when it goes unresponsive?

no
no reaction

> Cheers,
> Hiren


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: 11.0 stuck on high network load

2016-09-05 Thread Warner Losh
On Mon, Sep 5, 2016 at 1:43 AM, Slawa Olhovchenkov  wrote:
> On Sun, Sep 04, 2016 at 06:46:12PM -0700, hiren panchasara wrote:
>
>> On 09/05/16 at 12:57P, Slawa Olhovchenkov wrote:
>> > I am try using 11.0 on Dual E5-2620 (no X2APIC).
>> > Under high network load and may be addtional conditional system go to
>> > unresponsible state -- no reaction to network and console (USB IPMI
>> > emulation). INVARIANTS give to high overhad. Is this exist some way to
>> > debug this?
>>
>> Can you panic it from console to get to db> to get backtrace and other
>> info when it goes unresponsive?
>
> no
> no reaction

So the canonical 'ipmitool chassis power diag' doesn't send an NMI to
get you to the debugger?

I've seen this at Netflix on one variant of our flash offload box with
a Intel e5-2697v2 running with the Chelsio driver. We're working
around it by having fewer receive threads than CPUs in the system. The
only way the boxes would come back was with watchdog. The load was
streaming video > ~36Gbps out 4 lagged 10G ports. Console is totally
unresponsive as well. This is on our FreeBSD-10 stable based fork.
>From my debugging, we go from totally fine as far as I can tell from
ps, etc in the moments leading to the hang to being totally wedged. It
seems a very sudden-onset condition. Sound at all familiar?

Warner
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: 11.0 stuck on high network load

2016-09-05 Thread Slawa Olhovchenkov
On Mon, Sep 05, 2016 at 10:14:59AM -0600, Warner Losh wrote:

> On Mon, Sep 5, 2016 at 1:43 AM, Slawa Olhovchenkov  wrote:
> > On Sun, Sep 04, 2016 at 06:46:12PM -0700, hiren panchasara wrote:
> >
> >> On 09/05/16 at 12:57P, Slawa Olhovchenkov wrote:
> >> > I am try using 11.0 on Dual E5-2620 (no X2APIC).
> >> > Under high network load and may be addtional conditional system go to
> >> > unresponsible state -- no reaction to network and console (USB IPMI
> >> > emulation). INVARIANTS give to high overhad. Is this exist some way to
> >> > debug this?
> >>
> >> Can you panic it from console to get to db> to get backtrace and other
> >> info when it goes unresponsive?
> >
> > no
> > no reaction
> 
> So the canonical 'ipmitool chassis power diag' doesn't send an NMI to
> get you to the debugger?

Don't try (and don't know about this).
Can you some explain?
Is this FreeBSD by default catch NMI and enter to debugger?
How to interoperable with USB stack (I am beware USB keyboard may be locked)?

> I've seen this at Netflix on one variant of our flash offload box with
> a Intel e5-2697v2 running with the Chelsio driver. We're working
> around it by having fewer receive threads than CPUs in the system. The
> only way the boxes would come back was with watchdog. The load was
> streaming video > ~36Gbps out 4 lagged 10G ports. Console is totally
> unresponsive as well. This is on our FreeBSD-10 stable based fork.
> >From my debugging, we go from totally fine as far as I can tell from
> ps, etc in the moments leading to the hang to being totally wedged. It
> seems a very sudden-onset condition. Sound at all familiar?
> 
> Warner

Not sure.
This is less power box and can be servered only 20Gbit, using Intel
card (lagg 2x10H). Day ago I am using on this box 10-STABLE w/o such
issuse. (Not cleancly remember, may be some month ago this box crashed
by this issuse -- at the that time I am don't have any ideas about crash)

May be stuck caused by some poor (too big) memory request from nginx
(atempt parsing some malformed files). Or frequent nginx core dump
(from this malformed files).

11.0 on two different more power box servered from 40 to 55Gbit w/o stuck.
But w/o malformed files (t.e. w/o bogus memory request and w/o nginx
crash). Not sure about correlation.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: 11.0 stuck on high network load

2016-09-05 Thread Warner Losh
On Mon, Sep 5, 2016 at 10:46 AM, Slawa Olhovchenkov  wrote:
> On Mon, Sep 05, 2016 at 10:14:59AM -0600, Warner Losh wrote:
>
>> On Mon, Sep 5, 2016 at 1:43 AM, Slawa Olhovchenkov  wrote:
>> > On Sun, Sep 04, 2016 at 06:46:12PM -0700, hiren panchasara wrote:
>> >
>> >> On 09/05/16 at 12:57P, Slawa Olhovchenkov wrote:
>> >> > I am try using 11.0 on Dual E5-2620 (no X2APIC).
>> >> > Under high network load and may be addtional conditional system go to
>> >> > unresponsible state -- no reaction to network and console (USB IPMI
>> >> > emulation). INVARIANTS give to high overhad. Is this exist some way to
>> >> > debug this?
>> >>
>> >> Can you panic it from console to get to db> to get backtrace and other
>> >> info when it goes unresponsive?
>> >
>> > no
>> > no reaction
>>
>> So the canonical 'ipmitool chassis power diag' doesn't send an NMI to
>> get you to the debugger?
>
> Don't try (and don't know about this).
> Can you some explain?

The BCM sends the NMI to the CPU.

> Is this FreeBSD by default catch NMI and enter to debugger?

Yes.

> How to interoperable with USB stack (I am beware USB keyboard may be locked)?

I've just done serial console, so I'm not sure. I think that it works...

>> I've seen this at Netflix on one variant of our flash offload box with
>> a Intel e5-2697v2 running with the Chelsio driver. We're working
>> around it by having fewer receive threads than CPUs in the system. The
>> only way the boxes would come back was with watchdog. The load was
>> streaming video > ~36Gbps out 4 lagged 10G ports. Console is totally
>> unresponsive as well. This is on our FreeBSD-10 stable based fork.
>> >From my debugging, we go from totally fine as far as I can tell from
>> ps, etc in the moments leading to the hang to being totally wedged. It
>> seems a very sudden-onset condition. Sound at all familiar?
>>
>> Warner
>
> Not sure.
> This is less power box and can be servered only 20Gbit, using Intel
> card (lagg 2x10H). Day ago I am using on this box 10-STABLE w/o such
> issuse. (Not cleancly remember, may be some month ago this box crashed
> by this issuse -- at the that time I am don't have any ideas about crash)

OK.

> May be stuck caused by some poor (too big) memory request from nginx
> (atempt parsing some malformed files). Or frequent nginx core dump
> (from this malformed files).

OK. We're using nginx too, with our modified sendfile.

> 11.0 on two different more power box servered from 40 to 55Gbit w/o stuck.
> But w/o malformed files (t.e. w/o bogus memory request and w/o nginx
> crash). Not sure about correlation.

In our case it seems like a timing issue between too many threads. The
same hardware can handle 1x40G no probem...

Warner
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: 11.0 stuck on high network load

2016-09-05 Thread Slawa Olhovchenkov
On Mon, Sep 05, 2016 at 11:50:28AM -0600, Warner Losh wrote:

> > How to interoperable with USB stack (I am beware USB keyboard may be 
> > locked)?
> 
> I've just done serial console, so I'm not sure. I think that it works...

IPMI or hardware?

> >> I've seen this at Netflix on one variant of our flash offload box with
> >> a Intel e5-2697v2 running with the Chelsio driver. We're working
> >> around it by having fewer receive threads than CPUs in the system. The
> >> only way the boxes would come back was with watchdog. The load was
> >> streaming video > ~36Gbps out 4 lagged 10G ports. Console is totally
> >> unresponsive as well. This is on our FreeBSD-10 stable based fork.
> >> >From my debugging, we go from totally fine as far as I can tell from
> >> ps, etc in the moments leading to the hang to being totally wedged. It
> >> seems a very sudden-onset condition. Sound at all familiar?
> >>
> >> Warner
> >
> > Not sure.
> > This is less power box and can be servered only 20Gbit, using Intel
> > card (lagg 2x10H). Day ago I am using on this box 10-STABLE w/o such
> > issuse. (Not cleancly remember, may be some month ago this box crashed
> > by this issuse -- at the that time I am don't have any ideas about crash)
> 
> OK.
> 
> > May be stuck caused by some poor (too big) memory request from nginx
> > (atempt parsing some malformed files). Or frequent nginx core dump
> > (from this malformed files).
> 
> OK. We're using nginx too, with our modified sendfile.

I am don't use sendfile and use ZFS.

> > 11.0 on two different more power box servered from 40 to 55Gbit w/o stuck.
> > But w/o malformed files (t.e. w/o bogus memory request and w/o nginx
> > crash). Not sure about correlation.
> 
> In our case it seems like a timing issue between too many threads. The
> same hardware can handle 1x40G no probem...

I am already reconfigure NIC to have total number of recive thread as
half of total CPU cores. I am don't see high number of AIO tasks
immediate before stuck (around 100).
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Jenkins build is back to stable : FreeBSD_stable_10 #377

2016-09-05 Thread jenkins-admin
See 

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


AIO not working on NFS share - ? Regression

2016-09-05 Thread Jim Ohlstein

Hello,

For sometime now we've used a backend (non-internet accessible) server 
to generate static content that is shared via NFS to a front-end server 
for internet access. Both machines use ZFS exclusively.


The webserver is nginx and we had AIO set to on, with the AIO module 
built into the kernel.In 10.x it "just worked".


About two weeks ago I upgraded that backend machine to 11-STABLE in 
order to start building packages for 11. I've just updated it again to 
r305417. I don't recall it not working as expected.


More recently I upgraded the front-end machine to 11-STABLE @r305311. 
Since then, AIO is not working and I get a critical error in the nginx 
logs like this:


2016/09/05 15:58:02 [crit] 21145#0: *649 aio_read("/path/to/file") 
failed (45: Operation not supported) while sending response to client ...


In 11 AIO is built into the kernel by default, and I have confirmed that 
it works as expected in files from a local file system. Since the 
webserver isn't aware that the file system in question is shared via 
NFS, it seems this is an operating system issue.


--
Jim Ohlstein
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: AIO not working on NFS share - ? Regression

2016-09-05 Thread Alan Somers
Just to get your webserver out of the picture, could you please try
running the aio test suite on an NFS share?  Do it like this:
$ cd /usr/tests/sys/aio
$ export TMPFS=/path/to/some/nfs/share
$ kyua test

-Alan

On Mon, Sep 5, 2016 at 2:14 PM, Jim Ohlstein  wrote:
> Hello,
>
> For sometime now we've used a backend (non-internet accessible) server to
> generate static content that is shared via NFS to a front-end server for
> internet access. Both machines use ZFS exclusively.
>
> The webserver is nginx and we had AIO set to on, with the AIO module built
> into the kernel.In 10.x it "just worked".
>
> About two weeks ago I upgraded that backend machine to 11-STABLE in order to
> start building packages for 11. I've just updated it again to r305417. I
> don't recall it not working as expected.
>
> More recently I upgraded the front-end machine to 11-STABLE @r305311. Since
> then, AIO is not working and I get a critical error in the nginx logs like
> this:
>
> 2016/09/05 15:58:02 [crit] 21145#0: *649 aio_read("/path/to/file") failed
> (45: Operation not supported) while sending response to client ...
>
> In 11 AIO is built into the kernel by default, and I have confirmed that it
> works as expected in files from a local file system. Since the webserver
> isn't aware that the file system in question is shared via NFS, it seems
> this is an operating system issue.
>
> --
> Jim Ohlstein
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: AIO not working on NFS share - ? Regression

2016-09-05 Thread Konstantin Belousov
On Mon, Sep 05, 2016 at 02:26:30PM -0600, Alan Somers wrote:
> Just to get your webserver out of the picture, could you please try
> running the aio test suite on an NFS share?  Do it like this:
> $ cd /usr/tests/sys/aio
> $ export TMPFS=/path/to/some/nfs/share
> $ kyua test
By default, unsafe aio is disabled, i.e. aio where the operation is not
really async and can usurp kernel thread for indefinite amount of time.
Non-local filesystems accesses are classified as unsafe, since their
completion is controlled by remote host.

> 
> -Alan
> 
> On Mon, Sep 5, 2016 at 2:14 PM, Jim Ohlstein  wrote:
> > Hello,
> >
> > For sometime now we've used a backend (non-internet accessible) server to
> > generate static content that is shared via NFS to a front-end server for
> > internet access. Both machines use ZFS exclusively.
> >
> > The webserver is nginx and we had AIO set to on, with the AIO module built
> > into the kernel.In 10.x it "just worked".
> >
> > About two weeks ago I upgraded that backend machine to 11-STABLE in order to
> > start building packages for 11. I've just updated it again to r305417. I
> > don't recall it not working as expected.
> >
> > More recently I upgraded the front-end machine to 11-STABLE @r305311. Since
> > then, AIO is not working and I get a critical error in the nginx logs like
> > this:
> >
> > 2016/09/05 15:58:02 [crit] 21145#0: *649 aio_read("/path/to/file") failed
> > (45: Operation not supported) while sending response to client ...
> >
> > In 11 AIO is built into the kernel by default, and I have confirmed that it
> > works as expected in files from a local file system. Since the webserver
> > isn't aware that the file system in question is shared via NFS, it seems
> > this is an operating system issue.
> >
> > --
> > Jim Ohlstein
> > ___
> > freebsd-stable@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> > To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
> ___
> freebsd-stable@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: AIO not working on NFS share - ? Regression

2016-09-05 Thread Jim Ohlstein

Hello,

On 09/05/2016 04:34 PM, Konstantin Belousov wrote:

On Mon, Sep 05, 2016 at 02:26:30PM -0600, Alan Somers wrote:

Just to get your webserver out of the picture, could you please try
running the aio test suite on an NFS share?  Do it like this:
$ cd /usr/tests/sys/aio
$ export TMPFS=/path/to/some/nfs/share
$ kyua test

By default, unsafe aio is disabled, i.e. aio where the operation is not
really async and can usurp kernel thread for indefinite amount of time.
Non-local filesystems accesses are classified as unsafe, since their
completion is controlled by remote host.


Setting vfs.aio.enable_unsafe to 1 solved the problem, though I don't 
recall this being necessary in the past.


Thanks for the quick responses and fix.





-Alan

On Mon, Sep 5, 2016 at 2:14 PM, Jim Ohlstein  wrote:

Hello,

For sometime now we've used a backend (non-internet accessible) server to
generate static content that is shared via NFS to a front-end server for
internet access. Both machines use ZFS exclusively.

The webserver is nginx and we had AIO set to on, with the AIO module built
into the kernel.In 10.x it "just worked".

About two weeks ago I upgraded that backend machine to 11-STABLE in order to
start building packages for 11. I've just updated it again to r305417. I
don't recall it not working as expected.

More recently I upgraded the front-end machine to 11-STABLE @r305311. Since
then, AIO is not working and I get a critical error in the nginx logs like
this:

2016/09/05 15:58:02 [crit] 21145#0: *649 aio_read("/path/to/file") failed
(45: Operation not supported) while sending response to client ...

In 11 AIO is built into the kernel by default, and I have confirmed that it
works as expected in files from a local file system. Since the webserver
isn't aware that the file system in question is shared via NFS, it seems
this is an operating system issue.


--
Jim Ohlstein
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: unionfs bugs, a partial patch and some comments [Was: Re: 1-BETA3 Panic: __lockmgr_args: downgrade a recursed lockmgr nfs @ /usr/local/share/deploy-tools/RELENG_11/src/sys/fs/unionfs/union_vnops.c

2016-09-05 Thread Rick Macklem
Harry Schmalzbauer  wrote:
>Bezüglich Rick Macklem's Nachricht vom 18.08.2016 02:03 (localtime):
>>  Kostik wrote:
>> [stuff snipped]
>>> insmnque() performs the cleanup on its own, and that default cleanup isnot 
>>> suitable >for the situation.  I think that insmntque1() would betterfit 
>>> your requirements, your >need to move the common code into a helper.It 
>>> seems that >unionfs_ins_cached_vnode() cleanup could reuse it.
>> 
>> I've attached an updated patch (untested like the last one). This one 
>> creates a
>> custom version insmntque_stddtr() that first calls unionfs_noderem() and then
>> does the same stuff as insmntque_stddtr(). This looks like it does the 
>> required
>> stuff (unionfs_noderem() is what the unionfs VOP_RECLAIM() does).
>> It switches the node back to using its own v_vnlock that is exclusively 
>> locked,
>> among other things.
>
>Thanks a lot, today I gave it a try.
>
>With this patch, one reproducable panic can still be easily triggered:
>I have directory A unionfs_mounted under directory B.
>Then I mount_unionfs the same directory A below another directory C.
>panic: __lockmgr_args: downgrade a recursed lockmgr nfs @
>/usr/local/share/deploy-tools/RELENG_11/src/sys/fs/unionfs/union_vnops.c:1905
>Result is this backtrace, hardly helpful I guess:
>
>#1  0x80ae5fd9 in kern_reboot (howto=260) at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:366
>#2  0x80ae658b in vpanic (fmt=, ap=optimized out>)
>at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:759
>#3  0x80ae63c3 in panic (fmt=0x0) at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_shutdown.c:690
>#4  0x80ab7ab7 in __lockmgr_args (lk=,
>flags=, ilk=, wmesg=optimized out>,
>pri=, timo=, file=optimized out>, line=)
>  >   at /usr/local/share/deploy-tools/RELENG_11/src/sys/kern/kern_lock.c:992
>#5  0x80ba510c in vop_stdlock (ap=) at
>lockmgr.h:98
>#6  0x8111932d in VOP_LOCK1_APV (vop=,
>a=) at vnode_if.c:2087
>#7  0x80a18cfc in unionfs_lock (ap=0xfe007a3ba6a0) at
>vnode_if.h:859
>#8  0x8111932d in VOP_LOCK1_APV (vop=,
>a=) at vnode_if.c:2087
>#9  0x80bc9b93 in _vn_lock (vp=,
>flags=66560, file=, line=) at
>vnode_if.h:859
>#10 0x80a18460 in unionfs_readdir (ap=) at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/fs/unionfs/union_vnops.c:1531
>#11 0x81118ecf in VOP_READDIR_APV (vop=,
>a=) at vnode_if.c:1822
>#12 0x80bc6e3b in kern_getdirentries (td=,
>fd=, buf=0x800c3d000 bounds>,
>count=, basep=0xfe007a3ba980, residp=0x0)
>at vnode_if.h:758
>#13 0x80bc6bf8 in sys_getdirentries (td=0x0,
>uap=0xfe007a3baa40) at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/kern/vfs_syscalls.c:3940
>#14 0x80fad6b8 in amd64_syscall (td=,
>traced=0) at subr_syscall.c:135
>#15 0x80f8feab in Xfast_syscall () at
>/usr/local/share/deploy-tools/RELENG_11/src/sys/amd64/amd64/exception.S:396
>#16 0x00452eea in ?? ()
>Previous frame inner to this frame (corrupt stack?
Ok, I finally got around to looking at this and the panic() looks like a pretty 
straightforward
bug in the unionfs code.
- In unionfs_readdir(), it does a vn_lock(..LK_UPGRADE) and then later in the 
code
  vn_lock(..LK_DOWNGRADE) if it did the upgrade. (At line#1531 as noted in the 
backtrace.)
  - In unionfs_lock(), it sets LK_CANRECURSE when it is the rootvp and 
LK_EXCLUSIVE.
   (So it allows recursive acquisition in this case.)
--> Then it would call vn_lock(..LK_DOWNGRADE), which would panic if it has 
recursed.

Now, I'll admit unionfs_lock() is too obscure for me to understand, but...
Is it necessary to vn_lock(..LK_DOWNGRADE) or can unionfs_readdir() just return
with the vnode exclusively locked?
(It would be easy to change the code to avoid the vn_lock(..LK_DOWNGRADE) call
 when it has done the vn_lock(..LK_EXCLUSIVE) after vn_lock(..LK_UPGRADE) 
fails.)

rick

>I ran your previous patch with for some time.
>Similarly, mounting one directory below a 2nd mountpount crashed the
>machine (forgot to config dumpdir, so can't compare backtrace with the
>current patch).
>Otherwise, at least with the previous patch, I haven't had any other
>panic for about one week.
>
>Thanks,
>
>-Harry
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: ue1 and ue2 swinging

2016-09-05 Thread Eric A. Borisch
On Sunday, September 4, 2016, Nenhum_de_Nos 
wrote:

> On Sun, 4 Sep 2016 00:00:38 -0500
> "Eric A. Borisch" > wrote:
>
> > On Sat, Sep 3, 2016 at 11:28 PM, Eric A. Borisch  > wrote:
> > > On Saturday, September 3, 2016, Nenhum_de_Nos <
> math...@eternamente.info >
> > > wrote:
> > >>
> > >> On Fri, 2 Sep 2016 13:05:45 -0300
> > >> "Nenhum_de_Nos" > wrote:
> > >>
> > >> >
> > >> > On Thu, September 1, 2016 23:34, Eric A. Borisch wrote:
> > >> > > Matheus,
> > >> > >
> > >> > > I had a very similar problem, which led me to throw this together:
> > >> > >
> > >> > > https://github.com/eborisch/ethname
> > >> > >
> > >> > > I think the comments in it are fairly complete, let me know if
> > >> > > anything
> > >> > > doesn't make sense.
> > >> > >
> > >> > > Perhaps there is an easier way, but most discussions I found
> ended in
> > >> > > "you
> > >> > > could rename them on boot" - which is what this rc.d script does.
> I
> > >> > > use it
> > >> > > on my home router to great effect. (I rename the adapters to
> cable and
> > >> > > priv
> > >> > > just to make firewall rules etc. even clearer.)
> > >> > >
> > >> > >  - Eric
> > >> >
> > >> > Eric,
> > >> >
> > >> > great hint there, I will try it later when I get home and report
> back
> > >> > here. Thanks!
> > >> >
> > >> > matheus
> > >>
> > >> Hi Eric,
> > >>
> > >> I tried it and something is not working here, I suppose. I have the
> > >> /usr/local/etc/ifmap, the ethname is on /usr/local/etc/rc.d, and if I
> run it
> > >> past boot it works fine. But on reboot it doesn't. Is this the
> inteded way
> > >> or am I missing something?
> > >>
> > >> thanks,
> > >>
> > >> matheus
> > >
> > >
> > > You have ethname_enabled="YES" and ethname_devices="ue0 ue1" (or
> whichever
> > > devices you want renamed) in your rc.conf; their original names, not
> what
> > > you want them to become?
> > >
> > > If you have console access, can you try running it manually? I'll
> double
> > > check in a bit that the version on github matches what I'm running.
> > >
> > >   - Eric
> >
> > I'm running (and have been running) the version on github verbatim with
> success.
> >
> > Does 'service -e | grep ethname' return the path the ethname? If not,
> > put the 'ethname' script chmod-ed 555 and owned by root into
> > /usr/local/etc/rc.d ...
> >
> > I'm also running 11.0RC2, but on amd64; I don't think that should be
> > the issue, especially if you can run it manually via 'service ethname
> > start'.
> >
> >  - Eric
>
> Eric,
>
> I think all things are fine here:
>
> root@bee:~ # service -e | grep eth
> /usr/local/etc/rc.d/ethname
> root@bee:~ # cat /etc/rc.conf | grep ethn
> ethname_enable="YES"
> ethname_devices="ue1 ue2"
> root@bee:~ # ls -l /usr/local/etc/rc.d/ethname
> -r-xr-xr-x  1 root  wheel  3119 Sep  2 20:28 /usr/local/etc/rc.d/ethname
> root@bee:~ # cat /usr/local/etc/ifmap
>
> #b8:27:eb:fe:5a:e5 lan
> 00:00:00:00:00:00 net
> 00:00:0:00:00:01 cabo
> root@bee:~ # /usr/local/etc/rc.d/ethname restart
> tempdev0
> tempdev1
> cabo
> net
> root@bee:~ #
>
>
> I don't get it working right after boot, despite service -e returns it.
>
> after running on terminal I get it fine then.
>
> any hints?
>
> thanks!
>
> matheus
>

Bringing back to the list for resolution.

The ueN (axe based) devices were not quite up yet on this system when the
renaming script was run. I've updated (on github) the script to wait for
the requested devices to appear (with configurable timeout), as well as
added notes regarding making sure the drivers for the devices you wish to
rename are either compiled in, or loaded via loader.conf, such that we
aren't dependent upon devd to do so.

I'd love some feedback on the script if anyone else has a use case for it /
wants to kick the tires, and then I'll file a PR to add to ports.

  - Eric
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"