[sysrepo-devel] rollback on error

Joan Landry JoLandry at advaoptical.com
Mon Nov 28 21:31:20 UTC 2016


The yang was fine - so the failure was not upon the edit-config, but rather upon the commit.

I guess what you are saying is that the rollback on error only pertains to the running data store and in this case the running did not get changed.

I was trying to figure out how a user can delete the contents of the "candidate" data store without having to disconnect and reconnect the session.

Do you know if there is a way to clear the candidate data store - once a user decided it is not what they want or has system level errors in it?



-----Original Message-----
From: Radek Krejčí [mailto:rkrejci at cesnet.cz] 
Sent: Monday, November 28, 2016 9:24 AM
To: Joan Landry <JoLandry at advaoptical.com>; sysrepo-devel at sysrepo.org
Subject: Re: [sysrepo-devel] rollback on error

Hi,

your edit-config on candidate was successful, so the changes are part of your candidate. From your text I'm not sure why the commit failed, respectively what exactly means that the configuration is invalid. Was it because some restriction in YANG module was violated? Then please provide the module and data, because already the edit-config on candidate was supposed to fail. Otherwise (e.g. a validation callback on running returned the information that the data are invalid?), it is IMO a correct behavior - no changes are reflected in running (any partial changes performed before the error are rolled back) and the source of the configuration data (candidate datastore) is unchanged.

Regards,
Radek


Dne 28.11.2016 v 15:10 Joan Landry napsal(a):
>
> I have done an edit-config on candidate - followed by a commit to running.
>
>  
>
> The commit fails as expected - since I put an invalid configuration on purpose.
>
>  
>
> Then I do a get on candidate and still see the original invalid config entry - which I expected should no longer exist.
>
>  
>
> I expected that the candidate data store should not contain the invalid entry.
>
>  
>
> Do you know if rollback on error works or is it possibly  something I am not doing correctly?
>
> thanks
>
>  
>
>
>
> _______________________________________________
> sysrepo-devel mailing list
> sysrepo-devel at sysrepo.org
> http://lists.sysrepo.org/listinfo/sysrepo-devel




More information about the sysrepo-devel mailing list