openvswitch / of-config

OF-CONFIG interface to Open vSwitch
Other
49 stars 28 forks source link

Issue create_switch.xml #19

Closed patricktomassone closed 9 years ago

patricktomassone commented 9 years ago

I have an issue when try to create a new switch with the following command:

netconf> edit-config --config=create_switch.xml running

NETCONF error: operation-failed (application) - Datastore fails to validate (Extra element logical-switches in interleave ) NETCONF error: operation-failed (application) - Datastore fails to validate (Element capable-switch failed to validate content )

And server side, have the following error:

ofc-server[20580]: RelaxNG validation on subdatastore 846930887 ofc-server[20580]: subdatastore 846930887 fails to validate

rkrejci commented 9 years ago

What is the result of the following command (I expect you are using netopeer-cli): netconf> validate running

And what is the current content of the running datastore, i.e the result of this command: netconf> get-config running

patricktomassone commented 9 years ago

I run netconf> validete running and the rusult is: Result OK

while the result of netconf> get-config running is: result

rkrejci commented 9 years ago

hmm, that's strange. When I apply create_switch.xml from netconf-tests to the same content, I get valid content. Try to force edit-config without validation and then, please share the content of the datastore:

netconf> edit-config --test set --config=create_switch.xml running
netconf> get-config running
patricktomassone commented 9 years ago

With the command netconf> edit-config --test set --config=create_switch.xml running, I solve the problem. Thanks a lot

rkrejci commented 9 years ago

no, you did not :) It just skip validation - run validate command on running after this command, you should get the same error. What is the content of the datastore after the edit-config? With --test set we just will be able to see the data that do not validate and get know why.

patricktomassone commented 9 years ago

Yes but the switch is successfully created.

result1

rkrejci commented 9 years ago

That is strange, now when you run

netconf> validate running

the validation fails, right? Because I can validate the same content successfully. Can you share the first lines of the server verbose messages (until the "OF-CONFIG server successfully initialized" line):

# ofc-server -v 5 -f

And, please, share the program listings not as a picture but as a text, it is much more useful for me. You can also use markdown to keep formatting of the text.

patricktomassone commented 9 years ago

When i run: netconf> valide running the output server side is:

ofc-server[3990]: OpenFlow: connecting to unix://var/run/openvswitch/test-bridge.mgmt 2015-05-06T09:58:47Z|00052|timeval|WARN|Unreasonably long 89137ms poll interval (3ms user, 8ms system) ofc-server[3990]: ovs|00052|timeval|WARN|Unreasonably long 89137ms poll interval (3ms user, 8ms system) 2015-05-06T09:58:47Z|00053|timeval|WARN|faults: 4 minor, 0 major ofc-server[3990]: ovs|00053|timeval|WARN|faults: 4 minor, 0 major 2015-05-06T09:58:47Z|00054|timeval|WARN|disk: 0 reads, 8 writes ofc-server[3990]: ovs|00054|timeval|WARN|disk: 0 reads, 8 writes 2015-05-06T09:58:47Z|00055|timeval|WARN|context switches: 179 voluntary, 29 involuntary ofc-server[3990]: ovs|00055|timeval|WARN|context switches: 179 voluntary, 29 involuntary 2015-05-06T09:58:47Z|00056|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=7bc54294: ofc-server[3990]: ovs|00056|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=7bc54294: 2015-05-06T09:58:47Z|00057|coverage|INFO|txn_unchanged 0.0/sec 0.000/sec 0.0003/sec total: 1 ofc-server[3990]: ovs|00057|coverage|INFO|txn_unchanged 0.0/sec 0.000/sec 0.0003/sec total: 1 2015-05-06T09:58:47Z|00058|coverage|INFO|txn_incomplete 0.4/sec 0.033/sec 0.0017/sec total: 6 ofc-server[3990]: ovs|00058|coverage|INFO|txn_incomplete 0.4/sec 0.033/sec 0.0017/sec total: 6 2015-05-06T09:58:47Z|00059|coverage|INFO|txn_success 0.2/sec 0.017/sec 0.0008/sec total: 3 ofc-server[3990]: ovs|00059|coverage|INFO|txn_success 0.2/sec 0.017/sec 0.0008/sec total: 3 2015-05-06T09:58:47Z|00060|coverage|INFO|poll_fd_wait 1.4/sec 0.300/sec 0.0131/sec total: 47 ofc-server[3990]: ovs|00060|coverage|INFO|poll_fd_wait 1.4/sec 0.300/sec 0.0131/sec total: 47 2015-05-06T09:58:47Z|00061|coverage|INFO|poll_zero_timeout 0.2/sec 0.017/sec 0.0008/sec total: 3 ofc-server[3990]: ovs|00061|coverage|INFO|poll_zero_timeout 0.2/sec 0.017/sec 0.0008/sec total: 3 2015-05-06T09:58:47Z|00062|coverage|INFO|util_xalloc 14.6/sec 12.950/sec 2.0953/sec total: 7543 ofc-server[3990]: ovs|00062|coverage|INFO|util_xalloc 14.6/sec 12.950/sec 2.0953/sec total: 7543 2015-05-06T09:58:47Z|00063|coverage|INFO|vconn_open 2.2/sec 0.183/sec 0.0047/sec total: 17 ofc-server[3990]: ovs|00063|coverage|INFO|vconn_open 2.2/sec 0.183/sec 0.0047/sec total: 17 2015-05-06T09:58:47Z|00064|coverage|INFO|vconn_received 1.6/sec 0.133/sec 0.0028/sec total: 10 ofc-server[3990]: ovs|00064|coverage|INFO|vconn_received 1.6/sec 0.133/sec 0.0028/sec total: 10 2015-05-06T09:58:47Z|00065|coverage|INFO|vconn_sent 1.6/sec 0.133/sec 0.0033/sec total: 12 ofc-server[3990]: ovs|00065|coverage|INFO|vconn_sent 1.6/sec 0.133/sec 0.0033/sec total: 12 2015-05-06T09:58:47Z|00066|coverage|INFO|hmap_pathological 0.4/sec 0.033/sec 0.0072/sec total: 26 ofc-server[3990]: ovs|00066|coverage|INFO|hmap_pathological 0.4/sec 0.033/sec 0.0072/sec total: 26 2015-05-06T09:58:47Z|00067|coverage|INFO|hmap_expand 0.8/sec 0.250/sec 0.0417/sec total: 150 ofc-server[3990]: ovs|00067|coverage|INFO|hmap_expand 0.8/sec 0.250/sec 0.0417/sec total: 150 2015-05-06T09:58:47Z|00068|coverage|INFO|stream_open 2.2/sec 0.183/sec 0.0050/sec total: 18 ofc-server[3990]: ovs|00068|coverage|INFO|stream_open 2.2/sec 0.183/sec 0.0050/sec total: 18 2015-05-06T09:58:47Z|00069|coverage|INFO|46 events never hit ofc-server[3990]: ovs|00069|coverage|INFO|46 events never hit ofc-server[3990]: OpenFlow: test-bridge: successful connection. ofc-server[3990]: OpenFlow: connecting to unix://var/run/openvswitch/ofc-bridge.mgmt ofc-server[3990]: OpenFlow: ofc-bridge: successful connection. ofc-server[3990]: RelaxNG validation on subdatastore 846930887 ofc-server[3990]: Schematron validation on subdatastore 846930887

patricktomassone commented 9 years ago

While the output when i create a new switch with --test set is:

ofc-server[3990]: OpenFlow: connecting to unix://var/run/openvswitch/ofc-bridge.mgmt 2015-05-06T09:57:16Z|00019|timeval|WARN|Unreasonably long 43360ms poll interval (4ms user, 4ms system) ofc-server[3990]: ovs|00019|timeval|WARN|Unreasonably long 43360ms poll interval (4ms user, 4ms system) 2015-05-06T09:57:16Z|00020|timeval|WARN|faults: 54 minor, 0 major ofc-server[3990]: ovs|00020|timeval|WARN|faults: 54 minor, 0 major 2015-05-06T09:57:16Z|00021|timeval|WARN|context switches: 90 voluntary, 76 involuntary ofc-server[3990]: ovs|00021|timeval|WARN|context switches: 90 voluntary, 76 involuntary 2015-05-06T09:57:16Z|00022|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=9e03032f: ofc-server[3990]: ovs|00022|coverage|INFO|Event coverage, avg rate over last: 5 seconds, last minute, last hour, hash=9e03032f: 2015-05-06T09:57:16Z|00023|coverage|INFO|txn_unchanged 0.2/sec 0.017/sec 0.0003/sec total: 1 ofc-server[3990]: ovs|00023|coverage|INFO|txn_unchanged 0.2/sec 0.017/sec 0.0003/sec total: 1 2015-05-06T09:57:16Z|00024|coverage|INFO|txn_incomplete 0.8/sec 0.067/sec 0.0011/sec total: 4 ofc-server[3990]: ovs|00024|coverage|INFO|txn_incomplete 0.8/sec 0.067/sec 0.0011/sec total: 4 2015-05-06T09:57:16Z|00025|coverage|INFO|txn_success 0.4/sec 0.033/sec 0.0006/sec total: 2 ofc-server[3990]: ovs|00025|coverage|INFO|txn_success 0.4/sec 0.033/sec 0.0006/sec total: 2 2015-05-06T09:57:16Z|00026|coverage|INFO|poll_fd_wait 1.8/sec 0.383/sec 0.0064/sec total: 23 ofc-server[3990]: ovs|00026|coverage|INFO|poll_fd_wait 1.8/sec 0.383/sec 0.0064/sec total: 23 2015-05-06T09:57:16Z|00027|coverage|INFO|poll_zero_timeout 0.4/sec 0.033/sec 0.0006/sec total: 2 ofc-server[3990]: ovs|00027|coverage|INFO|poll_zero_timeout 0.4/sec 0.033/sec 0.0006/sec total: 2 2015-05-06T09:57:16Z|00028|coverage|INFO|util_xalloc 160.6/sec 106.367/sec 1.7728/sec total: 6382 ofc-server[3990]: ovs|00028|coverage|INFO|util_xalloc 160.6/sec 106.367/sec 1.7728/sec total: 6382 2015-05-06T09:57:16Z|00029|coverage|INFO|vconn_open 1.2/sec 0.100/sec 0.0017/sec total: 6 ofc-server[3990]: ovs|00029|coverage|INFO|vconn_open 1.2/sec 0.100/sec 0.0017/sec total: 6 2015-05-06T09:57:16Z|00030|coverage|INFO|vconn_received 0.4/sec 0.033/sec 0.0006/sec total: 2 ofc-server[3990]: ovs|00030|coverage|INFO|vconn_received 0.4/sec 0.033/sec 0.0006/sec total: 2 2015-05-06T09:57:16Z|00031|coverage|INFO|vconn_sent 0.8/sec 0.067/sec 0.0011/sec total: 4 ofc-server[3990]: ovs|00031|coverage|INFO|vconn_sent 0.8/sec 0.067/sec 0.0011/sec total: 4 2015-05-06T09:57:16Z|00032|coverage|INFO|hmap_pathological 0.6/sec 0.400/sec 0.0067/sec total: 24 ofc-server[3990]: ovs|00032|coverage|INFO|hmap_pathological 0.6/sec 0.400/sec 0.0067/sec total: 24 2015-05-06T09:57:16Z|00033|coverage|INFO|hmap_expand 3.4/sec 2.150/sec 0.0358/sec total: 129 ofc-server[3990]: ovs|00033|coverage|INFO|hmap_expand 3.4/sec 2.150/sec 0.0358/sec total: 129 2015-05-06T09:57:16Z|00034|coverage|INFO|stream_open 1.4/sec 0.117/sec 0.0019/sec total: 7 ofc-server[3990]: ovs|00034|coverage|INFO|stream_open 1.4/sec 0.117/sec 0.0019/sec total: 7 2015-05-06T09:57:16Z|00035|coverage|INFO|46 events never hit ofc-server[3990]: ovs|00035|coverage|INFO|46 events never hit ofc-server[3990]: OpenFlow: ofc-bridge: successful connection. ofc-server[3990]: OpenFlow: connecting to unix://var/run/openvswitch/ofc-bridge.mgmt ofc-server[3990]: OpenFlow: ofc-bridge: successful connection. ofc-server[3990]: edit-config: create ofc-server[3990]: Creating the node switch ofc-server[3990]: edit-config: default merge ofc-server[3990]: Deleting the node id Running ofc-server[3990]: Creating the node id ofc-server[3990]: OVSDB transaction successful

patricktomassone commented 9 years ago

I don't have errors and obtain the correct configuration.

rkrejci commented 9 years ago

I'm lost in this :( And you ignored my questions so I'm no closer to solve the problem (because you had a problem and maybe still have a problem despite you don't see it).

There are 2 scenarios starting at the same point (maybe after the server start): 1) you run

netconf > edit-config --config create_switch.xml running

and you get validation error, right?

2) you run

netconf > edit-config --test set --config create_switch.xml running
netconf > validate running

and you get ok result? This confuses me, the result should be again error, if scenario 1 fails.

@cejkato2 , do you think that this can be somehow connected with a timing issue when communicating with OVS via OpenFlow protocol?

vinayakpattar commented 5 years ago

Hi, I am running validate running-- which is giving me following error. NETCONF error: operation-failed (application) - Datastore fails to validate (Extra element logical-switches in interleave) NETCONF error: operation-failed (application) - Datastore fails to validate (Element capable-switch failed to validate content) I am starting ofc server as 'sudo ofc-server -v 3 -f'. It would be helpful if anyone can help me out here. Thanks a lot. Vinayak