Hi, I am trying to insert records in ovsdb customized table from within openvswitch but I am facing following issues on calling ovsdb_idl_add_column function :
ovs|01659|util(handler21)|EMER|../lib/ovsdb-idl.c:451: assertion !idl->change_seqno failed in ovsdb_idl_get_mode(). I am using same idl struct which is being initialized in bridge_init() method by vswitchd/bridge.c. I am using following steps to insert record in ovsdb. static void test(const char *name, const char *brname) { const struct ovsrec_open_vswitch *cfg = ovsrec_open_vswitch_first(idl); const struct ovsrec_bridge *br_cfg; if(cfg) { ovsdb_idl_add_column(idl, &ovsrec_bridge_col_test); ovsdb_idl_add_column(idl, &ovsrec_test_col_agent); ovsdb_idl_add_column(idl, &ovsrec_test_col_name); struct bridge *br = bridge_lookup(brname); if(br) { br_cfg = br->cfg; cmd_check_test(br_cfg, name, brname); } } } cmd_add_test(const struct ovsrec_bridge *br, const char *agent, const char *name) { struct ovsrec_test *test; struct ovsdb_idl_txn *txn; txn = ovsdb_idl_txn_create(idl); ovsrec_init(); if(br) { elef = ovsrec_test_insert(txn); ovsrec_test_set_agent(test, agent); ovsrec_test_set_name(test, name); bridge_insert_test(br, test); } ovsdb_idl_txn_commit(txn); ovsdb_idl_txn_destroy(txn); } I added a new command in ovs-vsctl to test the insertion of record in ovsdb which works pretty good, but I am facing issues while adding record from within openvswith code such as ofproto-dpif-xlate.c file. Moreover, I tried the code while omitting the ovsdb_idl_add_column function but it throws following bug in syslog: ovs-vswitchd: ovs|01343|ovsdb_idl(handler20)|ERR|Bug: Attempt to write to a read/write column (test:agent) when explicitly configured not to. ovs|01344|ovsdb_idl(handler20)|ERR|Bug: Attempt to write to a read/write column (test:name) when explicitly configured not to. ovs|01345|ovsdb_idl(handler20)|ERR|Bug: Attempt to write to a read/write column (Bridge:test) when explicitly configured not to. ovs|01346|jsonrpc(handler20)|DBG|unix:/root/root/run/db.sock: send request, method="transact", params=["Open_vSwitch",{"lock":"ovs_vswitchd","op":"assert"},{"uuid-name":"rowd5e645e3_5948_4c63_a223_8fefa7f72763","row":{},"op":"insert","table":"test"}], id=20 I hope someone here could help me resolve this bug or suggest me some workaround. I'll be really grateful for that. Thanks a lot! Kind Regards, David
_______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss