netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netconsole fun
@ 2012-12-10 14:17 Peter Hurley
  2012-12-11  4:51 ` Cong Wang
  0 siblings, 1 reply; 25+ messages in thread
From: Peter Hurley @ 2012-12-10 14:17 UTC (permalink / raw)
  To: netdev

Now that netpoll has been disabled for slaved devices, is there a
recommended method of running netconsole on a machine that has a slaved
device?

I ask because it seems pretty difficult to get netconsole running even
on a machine that has multiple physical interfaces, only one of which is
slaved.

I scoured the documentation but didn't find anything relevant (does
Documentation/networking/netconsole.txt need a patch?). AFAICT, the last
discussion ended here back in June '11
http://lkml.indiana.edu/hypermail/linux/kernel/1106.1/03185.html with
"Looks like we need to teach the tun-tap driver to support netpoll that
shouldn't be too hard. I'll send up a patch shortly
Neil"

Any help or pointers provided would be much appreciated.

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 25+ messages in thread
* netconsole fun
@ 2012-12-10 18:00 Peter Hurley
  0 siblings, 0 replies; 25+ messages in thread
From: Peter Hurley @ 2012-12-10 18:00 UTC (permalink / raw)
  To: netdev

Is there a recommended method of running netconsole on a machine that
has a slaved device?

I ask because it seems pretty difficult to get netconsole running even
on a machine that has multiple physical interfaces, only one of which is
slaved.

I scoured the documentation but didn't find anything relevant (does
documentation/networking/netconsole.txt need a patch?). AFAICT, the last
discussion ended here back in June '11
http://lkml.indiana.edu/hypermail/linux/kernel/1106.1/03185.html 

Any help or pointers provided would be much appreciated.

Regards,
Peter Hurley

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: netconsole fun
@ 2013-05-05  0:59 Neil Horman
  0 siblings, 0 replies; 25+ messages in thread
From: Neil Horman @ 2013-05-05  0:59 UTC (permalink / raw)
  To: Peter Hurley; +Cc: Cong Wang, netdev, David Miller

Thanks for clarifying.  Glad to hear you got it working.  If your doing a lot of custom initramfs work, a distro dump package would be worth your investigation, as they have likely covered a lot of ground that you're traversing.

Best
Neil


Peter Hurley <peter@hurleysoftware.com> wrote:

>On 04/29/2013 02:21 PM, Neil Horman wrote:
>> On Mon, Apr 29, 2013 at 01:28:45PM -0400, Peter Hurley wrote:
>>> On Mon, 2012-12-17 at 09:20 -0500, Neil Horman wrote:
>>>> On Sat, Dec 15, 2012 at 09:13:58AM -0500, Peter Hurley wrote:
>>>>> On Fri, 2012-12-14 at 09:20 -0500, Neil Horman wrote:
>>>>>> Ah!  I'm sorry, I didn't realize this was really about getting netconsole up
>>>>>> early in the boot, rather than just getting it up robustly using the startup
>>>>>> script.
>>>>>
>>>>> Well, it's both but I should have been clearer here. Sorry about that.
>>>>>
>>>>>> If thats the case, then I would recommend that you modify the initramfs
>>>>>> to do something simmilar to the startup script (since thats where the netconsole
>>>>>> module will get loaded anyway).  You can write a script there that will let you
>>>>>> specify the destination ip address and figure out the output dev based on the
>>>>>> routing tables.  If you're using dracut to build your initramfs, then this
>>>>>> should be pretty straightforward.
>>>>>
>>>>> When I get some more free time I'll experiment with this approach.
>>>>>
>>>>> Just to clarify something from earlier in the discussion:
>>>>>
>>>>> On Thu, 2012-12-13 at 13:08 -0500, Neil Horman wrote:
>>>>>> On Thu, Dec 13, 2012 at 09:49:31AM -0500, Peter Hurley wrote:
>>>>> ....
>>>>>>> There is an unforeseen consequence of the patch: it breaks device
>>>>>>> renaming because the device will already be in use by netconsole. Which
>>>>>>> is the whole problem with userspace device renaming to begin with...
>>>>>>>
>>>>>> That is bad, but see above, the netconsole service can work around this for you,
>>>>>> allowing you to never have to specify a particular device at all.
>>>>>
>>>>> The breakage is a normal consequence of being able to load netconsole
>>>>> before the udev rules that do device renaming. The same thing would
>>>>> happen modifying initramfs.
>>>>>
>>>>> Basically, once netconsole attaches to a device, that device cannot be
>>>>> renamed. Unfortunately, the default udev behavior messes things up
>>>>> further because it will try to do this:
>>>>>    eth0->eth1
>>>>>    eth1->eth0
>>>>> which means neither device will be renamed.
>>>>>
>>>>> Maybe the net core should just implement persistent device names ;)
>>>>>
>>>> Theres no good way for the kernel to do that, as persistent naming in this case
>>>> is a matter of user policy, not kernel hardware management (i.e. do you want a
>>>> network name to follow a mac address, a pci slot, or the network its connected
>>>> to)?  You can use smbios to get some modicum of persistent device naming
>>>> currently, but I don't recall if that requires udev rules to implement as well
>>>>
>>>> You're best bet is to simply make your initramfs more robust.  I understand what
>>>> you're saying regarding renaming after you've taken a reference on a device not
>>>> being possible, but you can run udev within the initramfs, and do your renaming
>>>> prior to your netconsole load.
>>>
>>> Hi Neil,
>>>
>>> I plan to re-submit 'netconsole: allow mac addr to specify local
>>> interface device' which you originally objected to because you asserted
>>> that the same effect could be obtained through udev scripts in the
>>> initramfs.
>>>
>>> When you shot down this patch, did you actually try what you suggested
>>> in the initramfs or were you just hypothesizing that it would possible?
>>>
>> I've not tried specifically what want to do, no, but I've done interface
>> renaming plenty of times in the initramfs back when I did kdump work (we had to
>> rename devices in the initramfs to align them with whatever udev renamed them to
>> once we pivot_root-ed to the rootfs).
>>
>> I presume you're sending me this note because you've for some reason decided
>> that doing this in the initramfs isn't feasible?  I'm happy to help you through
>> it if you like.
>
>Neil,
>
>I owe you an apology.
>
>Performing the udev device renaming and modprobing netconsole
>with the renamed device interface is indeed possible within initramfs.
>Once I had managed to get udev device renaming working in the initramfs,
>I had confused myself regarding which interface went with which MAC address.
>
>Have a good weekend.
>
>Regards,
>Peter Hurley
>
>

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2013-05-05  0:59 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10 14:17 netconsole fun Peter Hurley
2012-12-11  4:51 ` Cong Wang
2012-12-11 14:19   ` Peter Hurley
2012-12-11 14:30     ` Neil Horman
2012-12-11 15:16       ` Peter Hurley
2012-12-11 16:45         ` Neil Horman
2012-12-11 17:17           ` Peter Hurley
2012-12-11 21:19             ` Neil Horman
2012-12-12 20:59           ` Peter Hurley
2012-12-13 10:33             ` Cong Wang
2012-12-13 12:36             ` Neil Horman
2012-12-13 14:49               ` Peter Hurley
2012-12-13 18:08                 ` Neil Horman
2012-12-13 19:27                   ` Peter Hurley
2012-12-13 21:17                     ` Neil Horman
2012-12-13 22:24                       ` Peter Hurley
2012-12-14 14:20                         ` Neil Horman
2012-12-15 14:13                           ` Peter Hurley
2012-12-17 14:20                             ` Neil Horman
2013-04-29 17:28                               ` Peter Hurley
2013-04-29 18:21                                 ` Neil Horman
2013-04-30  2:44                                   ` Cong Wang
2013-05-03 19:07                                   ` Peter Hurley
  -- strict thread matches above, loose matches on Subject: below --
2012-12-10 18:00 Peter Hurley
2013-05-05  0:59 Neil Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).