[sysrepo-devel] not able to commit

Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) raszabo at cisco.com
Fri Sep 30 10:59:01 UTC 2016


Hi,

I don't think that you are actually using the devel branch:

(sr_commit:1111) Error by processing of commit request.

This log message is produced on line 1111 in MASTER branch: https://github.com/sysrepo/sysrepo/blob/master/src/client_library.c#L1111

whereas in DEVEL branch it is on line 1891: https://github.com/sysrepo/sysrepo/blob/devel/src/client_library.c#L1891

Therefore, the logs you provided are definitely from MASTER, not DEVEL.

As I wrote, this issue has been already addressed in devel. We will merge master to devel next week, so please wait few days.

Thanks,
Rastislav

-----Original Message-----
From: Joan Landry [mailto:JoLandry at advaoptical.com] 
Sent: Friday, September 30, 2016 2:19 AM
To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) <raszabo at cisco.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

I have  sr_get_changes_iter_example.c running where I registered for changes to the running data store
   rc = sr_session_start(conn, SR_DS_RUNNING, SR_SESS_CONFIG_ONLY, &session);

and when I change something and issue a commit I get an error <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-message 
      xmlns:xml="http://www.w3.org/XML/1998/namespace" xml:lang="en">(sr_commit:1111) Error by processing of commit request.</error-message>
  </rpc-error>
</rpc-reply>

and this is what is shown on sysrepo debug:
I have no idea what [DBG] (dm_ly_log_cb:649) libyang error: Unknown element "netconf-state" is, as the only object I changed was in ietf-interfaces.

I am using devel branch of sysrepo.

[DBG] (cm_conn_read_cb:1015) fd 8 readable [DBG] (cm_conn_read_cb:1028) 19 bytes of data received on fd 8 [DBG] (cm_conn_read_cb:1038) fd 8 would block [DBG] (cm_conn_in_buff_process:967) New message of size 15 bytes received.
[DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=2, current count=1.
[DBG] (rp_msg_process:1935) Threads: active=0/4, 1 requests in queue [DBG] (rp_worker_thread_execute:1669) Thread id=140737308886784 signaled.
[DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=3, count=0.
[DBG] (rp_commit_req_process:625) Processing commit request.
[DBG] (rp_dt_commit:683) Commit (1/7): process stared [DBG] (dm_ly_log_cb:649) libyang error: Unknown element "netconf-state".
[DBG] (dm_validate_session_data_trees:1662) Validation failed for ietf-interfaces module [ERR] (rp_dt_commit:690) Data validation failed: Unknown element "netconf-state".
[DBG] (sr_cbuff_enqueue:461) Circular buffer enqueue to position=4, current count=1.
[DBG] (rp_worker_thread_execute:1657) Thread id=140737308886784 will wait.
[DBG] (cm_msg_enqueue_cb:1484) New message enqueued into CM message queue.
[DBG] (sr_cbuff_dequeue:477) Circular buffer dequeue, new buffer head=5, count=0.
[DBG] (cm_conn_out_buff_flush:481) Sending 97 bytes of data.
[DBG] (cm_conn_out_buff_flush:487) 97 bytes of data sent.

-----Original Message-----
From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com]
Sent: Thursday, September 29, 2016 11:12 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

Hi,

As for the issue with commit - the log contains the answer:

[ERR] (dm_commit_load_modified_models:2313) There is a not enabled node in ietf-interfaces module, it can not be committed to the running

Again, you cannot write (commit) anything into running datastore if there is no application subscribed for the changes in running, as descibed here: https://github.com/sysrepo/sysrepo/wiki/Frequently-Asked-Questions-(FAQs)

Regarding the get on netconf-state - I'm not sure whether this is already implemented in Netopeer.

Thanks,
Rastislav

-----Original Message-----
From: Joan Landry [mailto:JoLandry at advaoptical.com]
Sent: Wednesday, September 28, 2016 6:13 PM
To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) <raszabo at cisco.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

I loaded the devel branch and commit does not work - I put in a bug report on commit as it is not working - but with different symptoms.

I also tried a get on ietf-netconf-monitoring and got no data - so is there something I am not initializing correctly?

This is the debug results from net-opeer2
netopeer2-server[31569]: Session 1: received message:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="27"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <source>
      <startup/>
    </source>
    <filter><netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
      </netconf-state>
    </filter>
  </get-config>
</rpc>
netopeer2-server[31569]: (cl_request_process:401) Sending session-switch-ds request.
netopeer2-server[31569]: (cl_request_process:423) session-switch-ds request sent, waiting for response.
netopeer2-server[31569]: (cl_request_process:445) session-switch-ds response received, processing.
netopeer2-server[31569]: (cl_request_process:401) Sending session-refresh request.
netopeer2-server[31569]: (cl_request_process:423) session-refresh request sent, waiting for response.
netopeer2-server[31569]: (cl_request_process:445) session-refresh response received, processing.
netopeer2-server[31569]: Session 1: received message:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="28"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <source>
      <running/>
    </source>
    <filter><netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
      </netconf-state>
    </filter>
  </get-config>
</rpc>
netopeer2-server[31569]: (cl_request_process:401) Sending session-switch-ds request.
netopeer2-server[31569]: (cl_request_process:423) session-switch-ds request sent, waiting for response.
netopeer2-server[31569]: (cl_request_process:445) session-switch-ds response received, processing.
netopeer2-server[31569]: (cl_request_process:401) Sending session-refresh request.
netopeer2-server[31569]: (cl_request_process:423) session-refresh request sent, waiting for response.
netopeer2-server[31569]: (cl_request_process:445) session-refresh response received, processing.
netopeer2-server[31569]: Session 1: received message:
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="29"
  xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <get-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <source>
      <candidate/>
    </source>
    <filter><netconf-state xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">
      </netconf-state>
    </filter>
  </get-config>
</rpc>
netopeer2-server[31569]: (cl_request_process:401) Sending session-switch-ds request.
netopeer2-server[31569]: (cl_request_process:423) session-switch-ds request sent, waiting for response.
netopeer2-server[31569]: (cl_request_process:445) session-switch-ds response received, processing.


Replies:
yangcli root at 10.64.204.119> get-config filter=@t159.flt source=startup RPC Data Reply 27 for session 1:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data/>
</rpc-reply>

yangcli root at 10.64.204.119> get-config filter=@t159.flt source=running RPC Data Reply 28 for session 1:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data/>
</rpc-reply>

yangcli root at 10.64.204.119> get-config filter=@t159.flt source=candidate RPC Data Reply 29 for session 1:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <data/>
</rpc-reply>



-----Original Message-----
From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com]
Sent: Wednesday, September 28, 2016 7:14 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

Hi,

Your issue is somehow connected to the #326, although the syptoms are little bit different. Deep inside of sysrepo they have the same root-case, which has been already fixed in the devel branch.

You don't need to initialize the contents of ietf-netconf-monitoring. Please try the code in the devel branch to see whether it works, or wait few days until it will be merged into master.

Thanks,
Rastislav

-----Original Message-----
From: Joan Landry [mailto:JoLandry at advaoptical.com]
Sent: Wednesday, September 28, 2016 1:02 PM
To: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) <raszabo at cisco.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

>From what I can tell 326 involves a change to a leaf that is declared with a default setting.

The only item I changed in the Candidate was the ietf_interfaces, eth0 description leaf.

When I do a commit on that one change I get an error regarding netconf-state which I think is part of the ietf-netconf-monitoring which I did not modify.

So is this the same issue - or is there something I am not doing correctly with ietf-netconf-monitoring?

Do I need to initialize the contents of ietf-netconf-monitoring?

Also,  when I issue a <get-schema> request, say, 
      <get-schema>
           <identifier>ietf-netconf</identifier>
           <version>2011-06-01</version>
           <format>yang</format>
         </get-schema>

Reply is 

<?xml version="1.0" encoding="utf-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-not-supported</error-tag>
    <error-severity>error</error-severity>
    <error-message xml:lang="en">Request could not be completed because the requested operation is not supported by this implementation.</error-message>
  </rpc-error>
</rpc-reply>

-----Original Message-----
From: Rastislav Szabo -X (raszabo - PANTHEON TECHNOLOGIES at Cisco) [mailto:raszabo at cisco.com]
Sent: Wednesday, September 28, 2016 3:25 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: RE: not able to commit

Hi,

This is a known issue in the current master branch (see https://github.com/sysrepo/sysrepo/issues/326), it is already fixed in the devel branch. Devel will be merged into master in the next few days.

Regerds,
Rastislav

-----Original Message-----
From: sysrepo-devel [mailto:sysrepo-devel-bounces at sysrepo.org] On Behalf Of Joan Landry
Sent: Wednesday, September 28, 2016 2:55 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: [sysrepo-devel] not able to commit

I get the following error when I try to execute commit.


[ERR] (rp_dt_commit:690) Data validation failed: Unknown element "netconf-state".


Any ideas how to resolve this?

I do not know what netconf-state is.
_______________________________________________
sysrepo-devel mailing list
sysrepo-devel at sysrepo.org
http://lists.sysrepo.org/listinfo/sysrepo-devel


More information about the sysrepo-devel mailing list