Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to enable feature defined in a module different from the current one #742

Closed
fabioantonini opened this issue Feb 21, 2017 · 10 comments
Assignees

Comments

@fabioantonini
Copy link
Contributor

Hi all
I have tried to define a new feature in a yang file and then enable the same feature in a different yang file.
The feature has been properly enabled by sysrepoctl, but when I try to set the leaf enabled by if-feature tag the command fails with "Unknown element".
Anyway if I move the feature definition in the same yang file where it is enabled by 'if-feature' statement the operation is successfully completed.
Any suggestion? Has it been fixed in the devel branch?
thanks a lot
best regards
fabio

@fabioantonini
Copy link
Contributor Author

The bug doesn't occur with the devel branch. I close it

@fabioantonini
Copy link
Contributor Author

fabioantonini commented Apr 5, 2017

After more detailed tests we have realized that the problem still occurs.
I have to reopen the issue.

@fabioantonini fabioantonini reopened this Apr 5, 2017
@rkrejci rkrejci self-assigned this Apr 10, 2017
@rkrejci
Copy link
Contributor

rkrejci commented Apr 10, 2017

Hi, can you provide some example? If I understand it correctly, the expected behavior is that sysrepoctl report error because the feature is not defined in the module you provided in the --module argument, right?

@fabioantonini
Copy link
Contributor Author

fabioantonini commented Apr 10, 2017 via email

@rkrejci
Copy link
Contributor

rkrejci commented Apr 10, 2017

How do you call sysrepoctl?

@fabioantonini
Copy link
Contributor Author

fabioantonini commented Apr 10, 2017 via email

@fabioantonini
Copy link
Contributor Author

When I try to set the speed leaf under bplane container I have the following error messages:
sysrepod

[INF] (rp_dt_set_item_wrapper:575) Set item request running datastore, xpath: /tiesse-ethernet:ethernet/bplane/speed
[DBG] (ac_set_identity:161) Switching identity to UID='0' and GID='0' (username: root).
[DBG] (dm_load_data_tree_file:1171) data_tree != null --> validate
[DBG] (dm_load_data_tree_file:1211) Usage count tiesse-ethernet incremented (value=3)
[INF] (dm_load_data_tree_file:1217) Data file /etc/configs/sysrepo/current/data/tiesse-ethernet.running loaded successfully
[DBG] (dm_get_data_info_internal:2747) Module tiesse-ethernet has been loaded
[DBG] (sr_cbuff_enqueue:522) Circular buffer enqueue to position=5, current count=1.
[DBG] (cm_msg_enqueue_cb:1727) New message enqueued into CM message queue.
[DBG] (sr_cbuff_dequeue:538) Circular buffer dequeue, new buffer head=6, count=0.
[DBG] (cm_conn_out_buff_flush:514) Sending 26 bytes of data.
[DBG] (cm_conn_out_buff_flush:520) 26 bytes of data sent.
[DBG] (cm_conn_read_cb:1115) fd 26 readable
[DBG] (cm_conn_read_cb:1128) 26 bytes of data received on fd 26
[DBG] (cm_conn_read_cb:1138) fd 26 would block
[DBG] (cm_conn_in_buff_process:1068) New message of size 22 bytes received.
[DBG] (sr_cbuff_enqueue:522) Circular buffer enqueue to position=1, current count=1.
[DBG] (rp_msg_process:4053) Threads: active=1/4, 1 requests in queue
[DBG] (sr_cbuff_dequeue:538) Circular buffer dequeue, new buffer head=2, count=0.
[DBG] (rp_commit_req_process:1424) Processing commit request.
[DBG] (rp_dt_commit:813) Commit (1/10): process started
[DBG] (dm_ly_log_cb:1341) libyang error: Unknown element "bplane".
[DBG] (dm_validate_data_info:2656) Validation failed for tiesse-ethernet module
[ERR] (rp_dt_commit:819) Data validation failed: Unknown element "bplane".
[DBG] (sr_cbuff_enqueue:522) Circular buffer enqueue to position=6, current count=1.
[DBG] (cm_msg_enqueue_cb:1727) New message enqueued into CM message queue.
[DBG] (sr_cbuff_dequeue:538) Circular buffer dequeue, new buffer head=7, count=0.
[DBG] (cm_conn_out_buff_flush:514) Sending 89 bytes of data.
[DBG] (cm_conn_out_buff_flush:520) 89 bytes of data sent.
[DBG] (rp_worker_thread_execute:3658) Thread id=2051 will wait.

from the client trying to set the leaf
[DBG] (cl_request_process:420) Sending set-item request.
[DBG] (cl_request_process:443) set-item request sent, waiting for response.
[DBG] (cl_request_process:466) set-item response received, processing.
[DBG] (cl_request_process:420) Sending commit request.
[DBG] (cl_request_process:443) commit request sent, waiting for response.
[DBG] (cl_request_process:466) commit response received, processing.
[ERR] (sr_commit:2091) Commit operation failed with 1 error(s).
[ERR] (sysrepo_tschange_xpath:568) Error by sr_commit: Cannot allocate memory
% Error: Validation of the changes failed

hope this can help
thanks
fabio

@rkrejci
Copy link
Contributor

rkrejci commented Apr 10, 2017

Please try to review/test the fix in pull request #783

@fabioantonini
Copy link
Contributor Author

fabioantonini commented Apr 10, 2017 via email

@fabioantonini
Copy link
Contributor Author

This issue can be closed

@rkrejci rkrejci closed this as completed Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants