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

RESTCONF -Candidate Roll Back #9

Closed
sdj38 opened this issue Jan 22, 2018 · 1 comment
Closed

RESTCONF -Candidate Roll Back #9

sdj38 opened this issue Jan 22, 2018 · 1 comment

Comments

@sdj38
Copy link

sdj38 commented Jan 22, 2018

Hi Olof,

Doing some tests with POST and RESTCONF we found that if a commit does not validate against the backend it still gets stored in the candidate DB but not in the running DB. POST/DELETE/PUT should roll back the candidate DB if it does not validate.

Here is output from /var/log/messages

Jan 22 17:40:09 localhost clixon_backend[1335]: transaction_commit: 158: Config error: Invalid sw_if_index
Jan 22 17:40:09 localhost clixon_restconf[21077]: Commit failed. Edit and try again or discard changes: protocol invalid-value Invalid sw_if_index
This makes it so any HTTP request fails until the DB is cleared or fixed.

@olofhagsand
Copy link
Member

Stephen,
Fixed by commit 6c7554d - rollback on commit errors in restconf
This error was triggered by an error in the commit rule.
To be picky: it is better to make such checks in the validation callbacks.
I changed the restconf call so that errors in commit and in validate both rollback, not only validate.

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