Re: [Netconf] Does <discard-changes> do the same thing as <copy-config>-ing 'running' to 'candidate'?
Attila Vangel <vangel.attila@gmail.com> Fri, 25 May 2018 12:01 UTC
Return-Path: <vangel.attila@gmail.com>
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 3CC57126C26 for <netconf@ietfa.amsl.com>; Fri, 25 May 2018 05:01:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 zLk40R272Ki3 for <netconf@ietfa.amsl.com>; Fri, 25 May 2018 05:01:37 -0700 (PDT)
Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 19A5A1204DA for <netconf@ietf.org>; Fri, 25 May 2018 05:01:37 -0700 (PDT)
Received: by mail-io0-x22d.google.com with SMTP id z5-v6so3615883iob.8 for <netconf@ietf.org>; Fri, 25 May 2018 05:01:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZCuEBZZrwFVo9tUyrQpG7Wl5jdFSKNz7kOsTzh3pZw0=; b=qRKM0YbU50R9GgaEUbqilu0X51m/C+sxiwkiypmco2ABxdmvlrFj9WHkt03qbSBYaB Uuh5Crgxa9CFXXp/iesSKz3AeYKgJOLjyk34PYx2vMMjMPBGNoxGYueTeqXA3slfTjcE FMvznmQC5g10S8AypbVBFZDDIG8HxSL/s3co8oQyC86lNgPIcATX8uDxB9QujdkhEshD ZUiJlpD/mfjpT1NT7b2ljiQ0UEq7jMLX38628lp+5hBPaYFdBiV0kGmFueOyuuAe8Q74 bQg6M66FxYj64SWBMbYLybdUEQsQGAyVvfPeh+iFho1ibPAFRdvFzfgJK3JOCHsuE+lO tzPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZCuEBZZrwFVo9tUyrQpG7Wl5jdFSKNz7kOsTzh3pZw0=; b=tHKzE+6PbXxtzROuiQlC5PheJ4VZIR0tq0OAmeR7aPwwfU6n6zNZ8B6OCHQrK6aRF4 eFRF2ktIg8zLvTJYkyN2aa4VZtN5EwpDlUBgyLmvrtR2GTWAEsNN3AmM6zaT38cNcCb6 MgL1+cmFaPBhJcpNlkUJb7ABRcfm1PzwoHd27JVJyAQIAaOgkeRhIkLcTmUTp8KSczed O/qYr1ulkIuNkZ2wHedMMhzSzN9Ig2M4I2YpAQbuK1FhF6+8b8wiCJ5Z51ODoxpCg4xo mg7IgF/aLwVx/eG18AWbISlUI/6r1THlDHNMgJFrk7KUqjXRWjN2p13KG0Lxn2vpF/Jv y/Wg==
X-Gm-Message-State: ALKqPwfJlhZDmo5F/KYESK7Kyouzrh/k/2ToG5Ok3eWIoA2Zzf57YmEG ttY0dWJCx/XQHPUMJCB6o1sc6SF6IzQV9sUoQGU=
X-Google-Smtp-Source: ADUXVKIhy1rIEkGlHcAtnk+Fay36OjpU99KVt65XO4ezQ8xe8MwyRvjVKpc7Rg/s/mCIvuZKJ9jp3nTnc3sonFbqu4c=
X-Received: by 2002:a6b:2882:: with SMTP id o124-v6mr1827110ioo.68.1527249691862; Fri, 25 May 2018 05:01:31 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:ac0:9ed7:0:0:0:0:0 with HTTP; Fri, 25 May 2018 05:01:31 -0700 (PDT)
In-Reply-To: <20180525122148.jz296uxlw0w4448w@webmail.eurecom.fr>
References: <CAGSQd2-_S+5-ZmzbPB10DBch7ns8M=X8w5-0H4j+7TRk7USJpA@mail.gmail.com> <20180525122148.jz296uxlw0w4448w@webmail.eurecom.fr>
From: Attila Vangel <vangel.attila@gmail.com>
Date: Fri, 25 May 2018 14:01:31 +0200
Message-ID: <CAGSQd2_i+KWiU2gqKq8qBPKWO1DZ_nu13b3-nQYDb1qT43OPZQ@mail.gmail.com>
To: Ariel Otilibili Anieli <otilibil@eurecom.fr>
Cc: netconf@ietf.org
Content-Type: multipart/alternative; boundary="0000000000005defe7056d06876f"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/-Vdl_3YdpNF8_gITZjxrlr_3e0Q>
Subject: Re: [Netconf] Does <discard-changes> do the same thing as <copy-config>-ing 'running' to 'candidate'?
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.22
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: Fri, 25 May 2018 12:01:44 -0000
Hi Ariel, Thanks for the quick turnaround! See my comment below. On Fri, May 25, 2018 at 12:21 PM, Ariel Otilibili Anieli < otilibil@eurecom.fr> wrote: > Hi Attila, > > Comments below. > > Regards, > Ariel > > Quoting Attila Vangel <vangel.attila@gmail.com>: > > Hi, >> >> N00b question on netconf. Could somebody please clarify? >> >> 1. Does <discard-changes> ( >> https://tools.ietf.org/html/rfc6241#section-8.3.4.2) have totally the >> same >> effect as <copy-config>-ing 'running' to 'candidate'? >> > No. > >> >> "This operation discards any uncommitted changes by resetting the >> candidate configuration with the content of the running >> configuration." >> >> If so, was it introduced as a shorter alternative of copying? >> If not, what is the difference between them? >> > <copy-config> copies the content of a datastore to another, whatever it > is; <discard-changes> discards the changes made on the 'candidate' > datastore. > In this case the description for <discard-changes> is incorrect in RFC, because it states: "resetting the candidate configuration with the content of the running configuration" (see above). So looks like this is a bug in the RFC. Anyway, I get the point now. Attila > >> 2. I got confused because I watched a tutorial on youtube which used both >> commands, first <discard-changes> before locking any config datastores, >> and >> <copy-config>-ing 'running' to 'candidate' after locking these datastores. >> (The assumption in this example is that the device supports 'candidate'.) >> > I suppose they wanted to edit 'candidate' from 'running', that's why they > <copy-config> before edition. > >> >> 3. For the first time I was puzzled why to do <discard-changes> before >> doing any locking, but then I read in the RFC that lock would fail if >> 'candidate' was "dirty" (https://tools.ietf.org/html/rfc6241#section-7.5 >> ): >> >> A lock MUST NOT be granted if any of the following conditions is >> true: >> >> * A lock is already held by any NETCONF session or another >> entity. >> >> * The target configuration is <candidate>, it has already been >> modified, and these changes have not been committed or rolled >> back. >> >> <...> >> >> Another thing on <lock> > >> But still I am not sure about 1. If these commands do the same thing, >> using >> <copy-config> in this tutorial was just for showcasing doing it yet >> another >> way in 2.? >> >> (I was not sure whether to share the link for the tutorial, maybe it >> would look like as advertising the company/author who did the >> tutorial.) >> >> Best regards, >> Attila >> >> > > > ------------------------------------------------------------ > ------------------- > This message was sent using EURECOM Webmail: http://webmail.eurecom.fr > >
- [Netconf] Does <discard-changes> do the same thin… Attila Vangel
- Re: [Netconf] Does <discard-changes> do the same … Ariel Otilibili Anieli
- Re: [Netconf] Does <discard-changes> do the same … Attila Vangel
- Re: [Netconf] Does <discard-changes> do the same … Ariel Otilibili Anieli
- Re: [Netconf] Does <discard-changes> do the same … Robert Wilton
- Re: [Netconf] Does <discard-changes> do the same … Attila Vangel