[ovs-discuss] assertion !idl->change_seqno failed in ovsdb_idl_get_mode()

david jhon djhon9813 at gmail.com
Fri Apr 24 07:46:06 UTC 2015


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
    struct ovsrec_test *test;
    struct ovsdb_idl_txn *txn;
    txn = ovsdb_idl_txn_create(idl);

      elef = ovsrec_test_insert(txn);
      ovsrec_test_set_agent(test, agent);
      ovsrec_test_set_name(test, name);
      bridge_insert_test(br, test);

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,

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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20150424/4d8a9fc1/attachment-0002.html>

More information about the discuss mailing list