To monitor the new kernel launched, google's netoopsbackport is added to its kernel. If there is a kernel panic in production, the stack information of the panic is sent to the log server for debugging and repair.
The day before yesterday, hongchuan reported that the previous online netoops used the bond slave network port as the dev for sending messages. After the 2.6.32-220 kernel was launched, the system reported that:
"Eth0 is a slave device, aborting ."
I found the redhat changes from 2.6.32-131 to 2.6.32-220, and found this patch from Wang Cong:
Commit 0c1ad04aecb975f2a2014e1bc5a2fa23923ecbd9
Author: WANG Cong www.2cto.com
Date: Thu Jun 9 00:28:13 2011-0700
Netpoll: prevent netpoll setup on slave devices
In commit 8d8fc29d02a33e4bd5f4fa47823c1fd1_346093
(Netpoll: disable netpoll when enslave a device), we automatically
Disable netpoll when the underlying device is being enslaved,
We also need to prevent people from setuping netpoll on
Devices that are already enslaved.
Signed-off-by: WANG Cong <www.2cto.com>
Signed-off-by: David S. Miller <www.2cto.com>
Diff -- git a/net/core/netpoll. c B/net/core/netpoll. c
Index 2d7d6d4 .. 42ea4b0 100644
--- A/net/core/netpoll. c
++ B/net/core/netpoll. c
@-792,6 + 792,12 @ int netpoll_setup (struct netpoll * np)
Return-ENODEV;
}
+ If (ndev-> master ){
+ Printk (KERN_ERR "% s: % s is a slave device, aborting. \ n ",
+ Np-> name, np-> dev_name );
+ Return-EBUSY;
+}
+
If (! Netif_running (ndev )){
Unsigned long atmost, atleast;
Since then, netpoll will not be able to use the slave device (netpoll is used for netoops), but I wonder why it can't be used now, so I sent an email asking Wang Cong why he cannot use the slave device now, the answer is:
"Because the slave device does not have an IP address, www.2cto.com"
In addition, Wang encountered the same problem with netconsole in redhat. He could only switch to the master network port.
Our netoops can only follow the same rules and use bond0 for dev.