Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A5D7A1032B for ; Mon, 6 Jan 2014 08:42:52 +0000 (UTC) Received: (qmail 4810 invoked by uid 500); 6 Jan 2014 08:42:48 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 4782 invoked by uid 500); 6 Jan 2014 08:42:43 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 4774 invoked by uid 99); 6 Jan 2014 08:42:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jan 2014 08:42:42 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bchesneau@gmail.com designates 209.85.216.50 as permitted sender) Received: from [209.85.216.50] (HELO mail-qa0-f50.google.com) (209.85.216.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Jan 2014 08:42:36 +0000 Received: by mail-qa0-f50.google.com with SMTP id k15so1157625qaq.2 for ; Mon, 06 Jan 2014 00:42:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=Pmq3wBA8o6XjuIC4esNhIaJCteCpIUdOzmOGYKyTwAk=; b=J4HL/sancrtszx2WIG6CadZ0pv5ChRKg5E9vz/qFI3Pl8d0Ov/0eD4b3OM7Ow8nO21 78DNlSFZLehNKx9ChY4/w1hf2uHU1LbHuvAD1SN3XUo1bFWlqV/fdBkFmMzr5vceJysB icJJ6TTPdpzoe4Xl9jEkGxzNZq4+SHK8GiW69ofw5DcZQWRHPnLRGs7W6bypkAjZ8vYQ s4s9s81gdYcGpZ2bpPykcPGVkizE44N9HotANdJOsRsZmO/xsDParlzGWkX1zGNGGEY7 jUHtGhG3cHy+hJPfzQz1BgMHcD5voGqw73CUO1YqHZdOWMljmncbZf+cxXXPl1tEtr1l 0uoQ== X-Received: by 10.224.20.202 with SMTP id g10mr175042146qab.66.1388997736011; Mon, 06 Jan 2014 00:42:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.96.56.73 with HTTP; Mon, 6 Jan 2014 00:41:55 -0800 (PST) In-Reply-To: References: From: Benoit Chesneau Date: Mon, 6 Jan 2014 09:41:55 +0100 Message-ID: Subject: Re: [jira] [Commented] (COUCHDB-2016) Plugins meet BigCouch To: "dev@couchdb.apache.org" Content-Type: multipart/alternative; boundary=001a11c2c83ca61d9c04ef493cc8 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c2c83ca61d9c04ef493cc8 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On Sun, Jan 5, 2014 at 2:53 PM, Jan Lehnardt (JIRA) wrote= : > > [ > https://issues.apache.org/jira/browse/COUCHDB-2016?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D138625= 58#comment-13862558] > > Jan Lehnardt commented on COUCHDB-2016: > --------------------------------------- > > I talked this over a bit with [~rnewson]. > > Money quote: =93 so couchdb plugins are erlang applications that= we > have scripting to ease their integration into the couchdb release (and th= e > inverse).=94 > I suggested that a long time ago and imo that's a good idea, see below my comments > > There are multiple issues intermingled here: > > 1. How to (un)install and start a CouchDB Plugin on an installation that > uses Erlang Releases (BigCouch & rcouch & up)? > 2. How to ensure a plugin gets installed into every node of a cluster? > > 3. How to cleanly upgrade a plugin when you upgrade a node (state recovery, and others termination things. > > As for 1., Erlang Releases can be upgraded to newer versions while they > are running. A plugin installation is simply an upgrade to a newer releas= e. > The difference from regular release updates is that these releases would = be > triggered by CouchDB itself (e.g. the couch_plugins application). We woul= d > have to figure out how to do version numbers in this case and everything > else that retains Erlang Release semantics. > This is where there is a problem if we consider to have legit release vs custom release. With custom release there are no problem, the users constructs its release and set the initial version number then they choose which applications to upgrade. In legit releases, we are providing the relup, deciding which apps to upgrade/remove etc... The idea I had but I didn't have time to implement it yet was to construct the relup dynamically on upgrade by merging the "core" relup containing all the base and telling how to upgrade with a user relup only taking care about the plugins. In that case a "make relup" will construct the final relup file and upgrade the release. Each release will be numbered "X.Y.Z-custom-P" or something. Where P is the local release version increment that is used for the plugin actions (add/remove/upgrade/resetr) and X.Y.Z the base version number (apache-couchdb) By using this system, a plugin could provide its own relup. An "update" action will update the local relup file and then update the release. > 2. Installation of plugins should be done on each node separately. Once a > plugin is installed on all nodes, the nodes can be upgraded as per 1. to > activate the plugin. The API for this could disallow installation and > upgrade if the cluster is in a unhealthy state. That way, we don=92t have= to > worry about nodes that don=92t receive an update instruction. Allowing th= is > for unhealthy clusters could be tackled later, but is punted on for now. > I disagree. The user should not have to care about where the nodes are. Imo once a plugin is installed the code should be sent to each nodes. The release upgrade could then be handled from one node, eventually depending on the zone, so a user could batch N upgrade and if anything wrong happen rollback. In the same vein a node should be able to tell its current state to the api request saying if it can accept this call or not (the plugin have been upgraded or not). One another reason to version our Rest API btw. (small details, the title should be "Plugins meet Erlang Releases" because some people will also have these problems with a cluster of isolated couchdb erlang nodes ;) > > > > Plugins meet BigCouch > > ------------------- > > > > Key: COUCHDB-2016 > > URL: https://issues.apache.org/jira/browse/COUCHDB-2016 > > Project: CouchDB > > Issue Type: New Feature > > Components: Plugins > > Reporter: Jan Lehnardt > > > > Currently Plugins don=92t work with BigCouch. Two options that I can se= e > so far: > > 1. Find a way to dynamically install plugins into a cluster, surviving > offline nodes that get a delayed installation on recovery (or only allow > plugins into a fully online cluster). > > 2. Make plugin building a static affair where plugins are installed wit= h > the rest of CouchDB as an Erlang release and do not allow dynamic updates > of apps. > > I=92d prefer 1, but any other options are welcome too. > > > > -- > This message was sent by Atlassian JIRA > (v6.1.5#6160) > --001a11c2c83ca61d9c04ef493cc8--