Re: [Netconf] Is there a problem with confirmed commits?

Martin Bjorklund <> Mon, 14 January 2019 13:23 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 25BA6131063 for <>; Mon, 14 Jan 2019 05:23:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id zP-RlwllEgqv for <>; Mon, 14 Jan 2019 05:23:44 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 25E7F131060 for <>; Mon, 14 Jan 2019 05:23:44 -0800 (PST)
Received: from localhost (unknown []) by (Postfix) with ESMTPSA id 3459B1AE0443; Mon, 14 Jan 2019 14:23:43 +0100 (CET)
Date: Mon, 14 Jan 2019 14:23:42 +0100 (CET)
Message-Id: <>
From: Martin Bjorklund <>
In-Reply-To: <em106ef27b-c989-4e0b-b819-413fef852d53@morpheus>
References: <em106ef27b-c989-4e0b-b819-413fef852d53@morpheus>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=utf-8
Content-Transfer-Encoding: base64
Archived-At: <>
Subject: Re: [Netconf] Is there a problem with confirmed commits?
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 14 Jan 2019 13:23:46 -0000

"Jonathan Hansford" <> wrote:
> Hi,
> No one seems to be responding to my email and proposed erratum around
> the subject of confirmed commits (apart from Martin), but I would
> really like to know it I am missing something here. As far as I can
> tell, session termination during a confirmed commit leads to
> unpredictable behaviour and I would like to know whether anyone is
> using confirmed commits and how (if at all) they address the issues
> outlined below. My assumptions are that locks are used and
> :writable-running is not supported.
> If the <candidate> and <running> configuration datastores are locked
> to prevent concurrent access, and a confirmed commit sequence is
> interrupted by the session terminating, the locks will automatically
> be released but the server MUST NOT accept a lock on <running> from
> any session if another session has an ongoing confirmed
> <commit>. Consequently, after session termination no client can
> acquire a <lock> on <running>, not even the one that initiated the
> confirmed <commit>, until after the confirmed <commit> has timed
> out. However, if the confirmed <commit> included the <persist>
> parameter, the original client could still issue a <commit> using the
> persist-id to complete the sequence prior to the timeout, even without
> a lock.
> Of course, the problem now is the race for the new lock on
> <candidate>.

According to 7.5, a lock is not granted if:

      *  The target configuration is <candidate>, it has already been
         modified, and these changes have not been committed or rolled

      *  The target configuration is <running>, and another NETCONF
         session has an ongoing confirmed commit (Section 8.4).

So I think that it will not be possible to take the lock on either
datastore in this situation.


> If the original client is successful then all is
> good. But if a new client locks <candidate> before the timeout on the
> confirmed commit, whether or not they precede <lock> with
> <discard-changes>, <candidate> will be the same as <running> and the
> new client will pick up everything from the previous session. However,
> the client won’t be able to lock <running> until after the timeout, at
> which point <running> reverts but <candidate> still represents the
> previous session. If the client tries to lock <candidate> after the
> timeout, <running> will have reverted and the lock will only be
> granted after a <discard-changes> which will cause the <candidate> to
> revert. So, depending on when the lock on <candidate> occurs relative
> to the confirmed commit timeout, the client could be editing
> <candidate> in one of two states. Further, before the timeout on the
> confirmed commit, even if the new client has locked candidate, the
> original client could still issue a confirming commit (they don’t need
> a lock on <candidate> to do so) which would persistently commit any
> edits made by the new client. NOTE: it is not the use of the
> persist-id that introduces this behaviour; a new client would have the
> same problem even if a confirmed commit was not intended to persist
> beyond a session termination.
> If the server also supports the :startup capability then, if the
> session termination was due to the server rebooting, the behaviour
> above would be further complicated by <running> now containing the
> configuration from the <startup> configuration datastore.
> Am I right?
> Jonathan
> ---
> This email has been checked for viruses by Avast antivirus software.