说明 :现场CAS版本为E0306
现场反馈CAS的CVM管理页面,在虚拟交换机界面出现两个eth3,两个虚拟机绑定在同一个物理网卡上,实际上现场是希望将vswitch0绑定在eh0上,v-app是绑定在eth3上,但是现在两个虚拟交换机同时绑定在eth3上。现场反馈业务并未受影响,虚拟机还可以正常使用。
一、客户操作过程
原本vswitch0绑定在eth0上,但客户在前台更改了vswitch0的物理网卡为eth3,工程师于是通过ilo口将vswitch0的网卡又改回到eth0上,于是出现了上述故障现象:eth3同时绑定v-app和vswith0的虚拟交换机。同时现场反馈并未更换物理网卡,除了上述操作,并无其他操作。
二、信息收集分析
1.参考http://kms.h3c.com/View.aspx?id=57620案例,检查/etc/udev/rules.d/70-persistent-net.rules配置文件。//为了保护客户隐私,将mac地址打码处理
root@cvknode01:/etc/udev/rules.d# cat 70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:02.2/0000:03:00.1 (bnx2x)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:83:3f:e0:82", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.0 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:cb:74:0f:9b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:02.2/0000:03:00.0 (bnx2x)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:83:3f:e0:80", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.3 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:cb:74:0f:9e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.2 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:cb:74:0f:9d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"
# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.1 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="*:*:cb:74:0f:9c", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
2.通过查看CAS系统下的配置文件/etc/network/interfaces查看相应网卡的对应信息。
root@cvknode01:/etc/network# cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 0.0.0.0
netmask 0.0.0.0
auto eth1
iface eth1 inet static
address 0.0.0.0
netmask 0.0.0.0
auto eth2
iface eth2 inet static
address 0.0.0.0
netmask 0.0.0.0
auto eth4
iface eth4 inet static
address 0.0.0.0
netmask 0.0.0.0
auto eth5
iface eth5 inet static
address 0.0.0.0
netmask 0.0.0.0
auto eth3
iface eth3 inet static
address 0.0.0.0
netmask 0.0.0.0
# The primary network interface
auto vswitch0
iface vswitch0 inet static
address 192.168.100.11
netmask 255.255.255.0
network 192.168.100.0
broadcast 192.168.100.255
auto v-app
iface v-app inet static
address 192.168.100.2
netmask 255.255.255.0
gateway 192.168.100.1
3.用ifconfig查看系统的网络信息,将vswitch0的物理网卡信息与/etc/udev/rules.d/70-persistent-net.rules配置文件比较,发现mac地址相同
root@cvknode01:~# ifconfig
eth0 Link encap:Ethernet HWaddr *:*:CB:74:0F:9B
inet6 addr: fe80::**:cbff:fe74:f9b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21099367 errors:0 dropped:0 overruns:0 frame:0
TX packets:42642118 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1421501553 (1355.6 Mb) TX bytes:64416794764 (61432.6 Mb)
Memory:c7360000-c737ffff
vnet1 Link encap:Ethernet HWaddr *:*:41:1D:B3:34
inet6 addr: fe80::**:41ff:fe1d:b334/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:244314 errors:0 dropped:0 overruns:0 frame:0
TX packets:258550 errors:0 dropped:351 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:37642521 (35.8 Mb) TX bytes:79513327 (75.8 Mb)
eth4 Link encap:Ethernet HWaddr *:*:CB:74:0F:9D
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Memory:c7320000-c733ffff
vnet2 Link encap:Ethernet HWaddr *:*:41:1D:CD:41
inet6 addr: fe80::**:41ff:fe1d:cd41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:863571 errors:0 dropped:0 overruns:0 frame:0
TX packets:1734141 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:226509592 (216.0 Mb) TX bytes:263047231 (250.8 Mb)
vnet3 Link encap:Ethernet HWaddr *:*:41:1D:76:C9
inet6 addr: fe80::**:41ff:fe1d:76c9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1665026 errors:0 dropped:0 overruns:0 frame:0
TX packets:790030 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:279376901 (266.4 Mb) TX bytes:197639752 (188.4 Mb)
eth1 Link encap:Ethernet HWaddr *:*:83:3F:E0:80
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:36 Memory:23fff000000-23fff7fffff
eth5 Link encap:Ethernet HWaddr *:*:CB:74:0F:9E
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Memory:c7300000-c731ffff
v-app Link encap:Ethernet HWaddr *:*:83:3F:E0:82
inet addr:192.168.100.2 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: fe80::**:83ff:fe3f:e082/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2980 (2.9 Kb) TX bytes:648 (648.0 b)
eth2 Link encap:Ethernet HWaddr *:*:CB:74:0F:9C
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Memory:c7340000-c735ffff
eth3 Link encap:Ethernet HWaddr *:*:83:3F:E0:82
inet6 addr: fe80::**:83ff:fe3f:e082/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:288 errors:0 dropped:0 overruns:0 frame:0
TX packets:1586 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:74232 (72.4 Kb) TX bytes:73844 (72.1 Kb)
Interrupt:100 Memory:23ffe000000-23ffe7fffff
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:670297 errors:0 dropped:0 overruns:0 frame:0
TX packets:670297 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:116624084 (111.2 Mb) TX bytes:116624084 (111.2 Mb)
vnet0 Link encap:Ethernet HWaddr *:*:41:1D:66:4B
inet6 addr: fe80::**:41ff:fe1d:664b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:3799 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:636 (636.0 b) TX bytes:760647 (742.8 Kb)
vswitch0 Link encap:Ethernet HWaddr *:*:CB:74:0F:9B
inet addr:192.168.100.11 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: fe80::**:83ff:fe3f:e082/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:21095305 errors:0 dropped:0 overruns:0 frame:0
TX packets:4039434 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1125648908 (1073.5 Mb) TX bytes:61865457450 (58999.4 Mb)
三、结论
通过上述分析vswitch0实际上绑定的是eth0,v-app绑定的是eth3,只是显示问题。从配置文件来看,系统对数据的处理是通过实际上绑定的网卡来处理的,只是CAS页面上显示上的问题。CAS显示出现问题的主要原因是客户通过CVM管理页面将vswitch0的物理网卡改为eth3,但是现场工程师改回绑定网卡却不是通过CAS的CVM页面操作的。客户的操作对mysql数据库进行了更改,而现场工程师的操作并未在CAS的CVM页面操作,并未对mysql数据库进行更改,导致出现一个虚拟交换机绑定两个物理网卡的现象。
联系研发通过相关数据库操作命令更改mysql相关表项,将vswitch0的网卡改为eth0,更新mysql数据库后问题解决,显示正常。
建议与总结:
1.CAS是不允许用户更改vswitch0虚拟交换机的,而CAS E0306的版本未禁止用户更改虚拟交换机vswitch0绑定的物理网卡,后期的版本有相关的限制。
2.不建议绕过CAS的CVM管理页面管理虚拟交换机,绕过CVM管理页面的相关操作不会记录在mysql数据库中,会导致CVM管理页面显示异常。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作