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

"Jonathan Hansford" <jonathan@hansfords.net> Mon, 14 January 2019 15:16 UTC

Return-Path: <jonathan@hansfords.net>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 9F5E11228B7 for <netconf@ietfa.amsl.com>; Mon, 14 Jan 2019 07:16:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=hansfords.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zI7K0tnKKcT6 for <netconf@ietfa.amsl.com>; Mon, 14 Jan 2019 07:16:42 -0800 (PST)
Received: from mail.myfast.site (mail.myfast.site [109.203.117.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 23E9F124B0C for <netconf@ietf.org>; Mon, 14 Jan 2019 07:16:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hansfords.net; s=default; h=Content-Transfer-Encoding:Content-Type: Mime-Version:Reply-To:References:In-Reply-To:Message-Id:Date:Cc:Subject:To: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=FmJvDVt8sKJnG62FQXsdx8GKqetPp6oTmxOH11kMKRA=; b=oqScu0TifW1rkXQ6MySUec/c2x LANLn+59uJQkImLNa+uB/Oh41aJ8OQTxIDeSQSsoAaoFYEYaoP635c6++jCDIYL9VSA6GB6n3qwqQ pPJ2DHj1FJ15ixz8rcGyHMM932NVU/q8hAy87ResBbHBj7PE43uDRNPHDD0lo18IbKycMT3E67rDK no76bF1DBcLUWTMCL+by931pwZj2g+pqYlEprkCwMp3pDSAMlUanFhTkEuKVHfYQEnKTsSu98G9/P 5YDAOC4GEg6jXKGpb+se5/aiHaYxJlRsTqdbbPrWVqUFd7edShGjDwZsujKgsL45jv4ueQWvo68ok 5Nrp2tVw==;
Received: from [51.52.247.166] (port=60883 helo=[172.16.1.65]) by mail.myfast.site with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from <jonathan@hansfords.net>) id 1gj3yi-00GZOJ-GZ; Mon, 14 Jan 2019 15:16:40 +0000
From: "Jonathan Hansford" <jonathan@hansfords.net>
To: "Martin Bjorklund" <mbj@tail-f.com>
Cc: netconf@ietf.org
Date: Mon, 14 Jan 2019 15:16:47 +0000
Message-Id: <emaa9a60e2-f15d-4158-a75a-5d9e7215cd82@morpheus>
In-Reply-To: <20190114.142342.615845671480649604.mbj@tail-f.com>
References: <em106ef27b-c989-4e0b-b819-413fef852d53@morpheus> <20190114.142342.615845671480649604.mbj@tail-f.com>
Reply-To: "Jonathan Hansford" <jonathan@hansfords.net>
User-Agent: eM_Client/7.2.34062.0
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Antivirus: Avast (VPS 190114-0, 14/01/2019), Outbound message
X-Antivirus-Status: Clean
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - mail.myfast.site
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - hansfords.net
X-Get-Message-Sender-Via: mail.myfast.site: authenticated_id: jonathan@hansfords.net
X-Authenticated-Sender: mail.myfast.site: jonathan@hansfords.net
X-Source:
X-Source-Args:
X-Source-Dir:
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/2XNCYiOqcWOarmU6oENreHMfH_c>
Subject: Re: [Netconf] Is there a problem with confirmed commits?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Network Configuration WG mailing list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Jan 2019 15:16:43 -0000

The candidate can be locked because the changes have been committed, 
just not confirmed.

------ Original Message ------
From: "Martin Bjorklund" <mbj@tail-f.com>;
To: jonathan@hansfords.net
Cc: netconf@ietf.org
Sent: 14/01/2019 13:23:42
Subject: Re: [Netconf] Is there a problem with confirmed commits?

>"Jonathan Hansford" <jonathan@hansfords.net>; 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
>          back.
>
>       *  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.
>
>
>/martin
>
>
>>  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.
>>  https://www.avast.com/antivirus