Hi : )

I'm facing an weird behavior regarding on role change.
When I send a role message to change the role of one specific switch, all switches change to this role.

I think the problem is when open vSwitch mount the transaction message to send to ovsdb.

A simple test is, start a mininet network with 4 switches, linear topo.
stop s1, and start it again.

Look Controller table, before and after stop and start switch s1.

Before Stop:
sudo ovsdb-client dump tcp:192.168.1.200:5000 Controller
Controller table
2ab2e756-cc3a-47d6-9421-1b69ae035be0 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="40"*, state=ACTIVE} "tcp:192.168.1.215:6653" 333dc741-daa2-472c-9c9d-8337dead0318 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="40"*, state=ACTIVE} "tcp:192.168.1.215:6653" bcb46630-8509-485e-a7c0-c5df7cfa8141 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="40",* state=ACTIVE} "tcp:192.168.1.215:6653" dc0e199a-cd0c-4077-93b8-3b5d265f4b25 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="40"*, state=ACTIVE} "tcp:192.168.1.215:6653"


After stop and start switch S1:
2ab2e756-cc3a-47d6-9421-1b69ae035be0 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="200"*, state=ACTIVE} "tcp:192.168.1.215:6653" 333dc741-daa2-472c-9c9d-8337dead0318 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="200"*, state=ACTIVE} "tcp:192.168.1.215:6653" bcb46630-8509-485e-a7c0-c5df7cfa8141 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="200"*, state=ACTIVE} "tcp:192.168.1.215:6653" dc0e199a-cd0c-4077-93b8-3b5d265f4b25 [] [] [] [] {} [] true [] [] [] 1000 {} master {*sec_since_connect="200"*, state=ACTIVE} "tcp:192.168.1.215:6653"


The sec_since_connection of S1 should differs from the others, right?
As you can see they are all the same.

============================================

Here I'll show when I use different roles. S1:master, S2:slave, S3:master and S4 slave.

2017-04-25T05:59:50.947Z|44091|vconn|DBG|tcp:192.168.1.215:6653: received: OFPT_ROLE_REQUEST (OF1.4) (xid=0x26):*role=master* generation_id=0 2017-04-25T05:59:50.953Z|44092|vconn|DBG|tcp:192.168.1.215:6653: sent (Success): OFPT_ROLE_REPLY (OF1.4) (xid=0x26): role=master generation_id=0 2017-04-25T05:59:50.953Z|44093|vconn|DBG|tcp:192.168.1.215:6653: received: OFPT_ROLE_REQUEST (OF1.4) (xid=0x24): *role=slave* generation_id=0 2017-04-25T05:59:50.954Z|44094|vconn|DBG|tcp:192.168.1.215:6653: sent (Success): OFPT_ROLE_REPLY (OF1.4) (xid=0x24): role=slave generation_id=0 2017-04-25T05:59:50.954Z|44097|vconn|DBG|tcp:192.168.1.215:6653: received: OFPT_ROLE_REQUEST (OF1.4) (xid=0x22): *role=master* generation_id=0 2017-04-25T05:59:50.955Z|44098|vconn|DBG|tcp:192.168.1.215:6653: sent (Success): OFPT_ROLE_REPLY (OF1.4) (xid=0x22): role=master generation_id=0 2017-04-25T05:59:50.955Z|44099|vconn|DBG|tcp:192.168.1.215:6653: received: OFPT_ROLE_REQUEST (OF1.4) (xid=0x28):*role=slave *generation_id=0 2017-04-25T05:59:50.955Z|44100|vconn|DBG|tcp:192.168.1.215:6653: sent (Success): OFPT_ROLE_REPLY (OF1.4) (xid=0x28): role=slave generation_id=0

2017-04-25T05:59:53.906Z|44179|jsonrpc|DBG|tcp:192.168.1.200:5000: send request, method="transact", params=["Open_vSwitch",{"lock":"ovs_vswitchd","op":"assert"},{"where":[["_uuid","==",["uuid","bcb46630-8509-485e-a7c0-c5df7cfa8141"]]],"row":{"is_connected":true,"status":["map",[["last_error","Connection refused"],["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]]*,"role":"master"*},"op":"update","table":"Controller"},{"where":[["_uuid","==",["uuid","333dc741-daa2-472c-9c9d-8337dead0318"]]],"row":{"is_connected":true,"status":["map",[["last_error","Connection refused"],["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*},"op":"update","table":"Controller"},{"where":[["_uuid","==",["uuid","8b31bb89-8206-466f-a3b5-5c57e98ecb27"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",0],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",0],["tx_bytes",7742],["tx_dropped",0],["tx_errors",0],["tx_packets",98]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","c210e14b-84b2-4dde-96a4-f55c11e1cb17"]]],"row":{"is_connected":true,"status":["map",[["last_error","Connection refused"],["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]]*,"role":"master"*},"op":"update","table":"Controller"},{"where":[["_uuid","==",["uuid","b7fea95b-c3b4-44e0-ab41-3f048b3accf7"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",7742],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",98],["tx_bytes",0],["tx_dropped",0],["tx_errors",0],["tx_packets",0]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","49955bd4-9353-4eb4-bf6a-008a3f087c4c"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",0],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",0],["tx_bytes",7900],["tx_dropped",0],["tx_errors",0],["tx_packets",100]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","9b64ef6c-0625-4a0b-b7e8-ed6e7587582f"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",7742],["rx_crc_err",0],["rx _dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",98],["tx_bytes",0],["tx_dropped",0],["tx_errors",0],["tx_packets",0]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","7b98e1d4-abcc-4dd5-a092-e6331761a2a3"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",7900],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",100],["tx_bytes",0],["tx_dropped",0],["tx_errors",0],["tx_packets",0]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","2ab2e756-cc3a-47d6-9421-1b69ae035be0"]]],"row":{"is_connected":true,"status":["map",[["last_error","Connection refused"],["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*},"op":"update","table":"Controller"},{"where":[["_uuid","==",["uuid","49a488ce-5335-4d25-a0f7-0c652c774fae"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",0],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",0],["tx_bytes",7742],["tx_dropped",0],["tx_errors",0],["tx_packets",98]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","84130607-162d-4e29-8f9d-bc67079259dd"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",0],["rx_crc_err",0],["rx_dropped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",0],["tx_bytes",7900],["tx_dropped",0],["tx_errors",0],["tx_packets",100]]]},"op":"update","table":"Interface"},{"where":[["_uuid","==",["uuid","a440437f-eaf4-4b46-b2ff-b79743b66321"]]],"row":{"statistics":["map",[["collisions",0],["rx_bytes",0],["rx_crc_err",0],["rx_dr opped",0],["rx_errors",0],["rx_frame_err",0],["rx_over_err",0],["rx_packets",0],["tx_bytes",7742],["tx_dropped",0],["tx_errors",0],["tx_packets",98]]]},"op":"update","table":"Interface"}], id=1549

2017-04-25T05:59:53.908Z|44183|jsonrpc|DBG|tcp:192.168.1.200:5000: received notification, method="update2", params=["f59c188f-a945-4022-8d6a-655e3f01c41d",{"Controller":{"bcb46630-8509-485e-a7c0-c5df7cfa8141":{"modify":{"is_connected":true,"status":["map",[["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*}},"333dc741-daa2-472c-9c9d-8337dead0318":{"modify":{"is_connected":true,"status":["map",[["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*}},"2ab2e756-cc3a-47d6-9421-1b69ae035be0":{"modify":{"is_connected":true,"status":["map",[["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*}},"c210e14b-84b2-4dde-96a4-f55c11e1cb17":{"modify":{"is_connected":true,"status":["map",[["sec_since_connect","3"],["sec_since_disconnect","4"],["state","ACTIVE"]]],*"role":"master"*}}},"Interface":{"49a488ce-5335-4d25-a0f7-0c652c774fae":{"modify":{"statistics":["map",[["tx_bytes",7742],["tx_packets",98]]]}},"49955bd4-9353-4eb4-bf6a-008a3f087c4c":{"modify":{"statistics":["map",[
["tx_bytes",7900],["tx_packets",100]]]}},"9b64ef6c-0625-4a0b-b7e8-ed6e7587582f":{"modify":{"statistics":["map",[["rx_bytes",7742],["rx_packets",98]]]}},"7b98e1d4-abcc-4dd5-a092-e6331761a2a3":{"modify":{"statistics":["map",[["rx_bytes",7900],["rx_packets",100]]]}},"84130607-162d-4e29-8f9d-bc67079259dd":{"modify":{"statistics":["map",[["tx_bytes",7900],["tx_packets",100]]]}},"8b31bb89-8206-466f-a3b5-5c57e98ecb27":{"modify":{"statistics":["map",[["tx_bytes",7742],["tx_packets",98]]]}},"a440437f-eaf4-4b46-b2ff-b79743b66321":{"modify":{"statistics":["map",[["tx_bytes",7742],["tx_packets",98]]]}},"b7fea95b-c3b4-44e0-ab41-3f048b3accf7":{"modify":{"statistics":["map",[["rx_bytes",7742],["rx_packets",98]]]}}}}]


The roles are defined regarding on the last role, If I define the last switch as slave, all switches become slave, if i define master, all switches become master.

==========================================
Info:

ovs-vswitchd (Open vSwitch) 2.7.0
ovs-vsctl (Open vSwitch) 2.7.0
DB Schema 7.14.0
Linux version 3.13.0-116-generic (buildd@lcy01-03) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #163-Ubuntu SMP Fri Mar 31 14:13:22 UTC 2017
system@ovs-system:
        lookups: hit:18 missed:782 lost:1
        flows: 4
        masks: hit:1372 total:2 hit/pkt:1.72
        port 0: ovs-system (internal)
        port 1: s1-eth2
        port 2: s1-eth1
        port 3: s1 (internal)
        port 4: s2-eth2
        port 5: s2-eth3
        port 6: s2-eth1
        port 7: s2 (internal)
        port 8: s3-eth2
        port 9: s3-eth1
        port 10: s3-eth3
        port 11: s3 (internal)
        port 12: s4-eth1
        port 13: s4-eth2
        port 14: s4 (internal)

Regards: )

--
Att,

Tulio Ribeiro - LaSIGE.

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to