Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-3423

'ejectNode' is possibly destructive to data

    Details

    • Flagged:
      Release Note

      Description

      The current implementation of 'ejectNode' can be possibly destructive to data if it is run against a node that is in the cluster and responsible for vbuckets.
      We need to a) update the REST API documentation to describe specifically what it is to be used for and b) not allow ejectNode to be run on a node that is serving data

      If absolutely necessary, a 'force' option could be implemented to allow ejection of an active node, but I don't think it's needed at this time.

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        perry Perry Krug added a comment -

        A Pivotal Tracker story has been created for this Issue: http://www.pivotaltracker.com/story/show/13245397

        Show
        perry Perry Krug added a comment - A Pivotal Tracker story has been created for this Issue: http://www.pivotaltracker.com/story/show/13245397
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        I am not sure why this issue is marked as a release note.

        this is a side effect of using ejectNode api which is based on the design and the user need to be aware of when and how they using this rest api call.

        Show
        farshid Farshid Ghods (Inactive) added a comment - I am not sure why this issue is marked as a release note. this is a side effect of using ejectNode api which is based on the design and the user need to be aware of when and how they using this rest api call.
        Hide
        perry Perry Krug added a comment -

        It's a release note because I believe the user needs to be aware that this would cause bad things to happen if done improperly. Until we either update the documentation or prevent the user from doing this, I think it's non-obvious and therefore requires a release note.

        Show
        perry Perry Krug added a comment - It's a release note because I believe the user needs to be aware that this would cause bad things to happen if done improperly. Until we either update the documentation or prevent the user from doing this, I think it's non-obvious and therefore requires a release note.
        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        can we close this as won't fix ?

        Show
        farshid Farshid Ghods (Inactive) added a comment - can we close this as won't fix ?
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        already done apparently

        1. wget O -d --user=Administrator --password=asdasd --post-data="otpNode=n_0@10.17.20.233" http://lh:9000/controller/ejectNode
          Setting --user (user) to Administrator
          Setting --password (password) to asdasd
          Setting --post-data (postdata) to otpNode=n_0@10.17.20.233
          DEBUG output created by Wget 1.14 on linux-gnu.

        URI encoding = ‘UTF-8’
        -2012-08-21 17:19:01- http://lh:9000/controller/ejectNode
        Host ‘lh’ has not issued a general basic challenge.
        Resolving lh (lh)... 127.0.0.1
        Caching lh => 127.0.0.1
        Connecting to lh (lh)|127.0.0.1|:9000... connected.
        Created socket 3.
        Releasing 0x09cb2f48 (new refcount 1).

        --request begin--
        POST /controller/ejectNode HTTP/1.1
        User-Agent: Wget/1.14 (linux-gnu)
        Accept: /
        Host: lh:9000
        Connection: Keep-Alive
        Content-Type: application/x-www-form-urlencoded
        Content-Length: 24

        --request end--
        [POST data: otpNode=n_0@10.17.20.233]
        HTTP request sent, awaiting response...
        --response begin--
        HTTP/1.1 401 Unauthorized
        WWW-Authenticate: Basic realm="Couchbase Server Admin / REST"
        Server: Couchbase Server 2.0.0r_231_gdcd71d5
        Pragma: no-cache
        Date: Wed, 22 Aug 2012 00:19:01 GMT
        Content-Length: 0
        Cache-Control: no-cache

        --response end--
        401 Unauthorized
        Registered socket 3 for persistent reuse.
        ] done.
        Inserted ‘lh’ into basic_authed_hosts
        Disabling further reuse of socket 3.
        Closed fd 3

        --request begin--
        POST /controller/ejectNode HTTP/1.1
        User-Agent: Wget/1.14 (linux-gnu)
        Accept: /
        Host: lh:9000
        Connection: Keep-Alive
        Content-Type: application/x-www-form-urlencoded
        Content-Length: 24
        Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q=

        --request end--
        Failed writing HTTP request: Bad file descriptor.
        Closed fd 3
        Retrying.

        -2012-08-21 17:19:02- (try: 2) http://lh:9000/controller/ejectNode
        Found ‘lh’ in basic_authed_hosts.
        Found lh in host_name_addresses_map (0x9cb2f48)
        Connecting to lh (lh)|127.0.0.1|:9000... connected.
        Created socket 3.
        Releasing 0x09cb2f48 (new refcount 1).

        --request begin--
        POST /controller/ejectNode HTTP/1.1
        User-Agent: Wget/1.14 (linux-gnu)
        Accept: /
        Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q=
        Host: lh:9000
        Connection: Keep-Alive
        Content-Type: application/x-www-form-urlencoded
        Content-Length: 24

        --request end--
        [POST data: otpNode=n_0@10.17.20.233]
        HTTP request sent, awaiting response...
        --response begin--
        HTTP/1.1 400 Bad Request
        Server: Couchbase Server 2.0.0r_231_gdcd71d5
        Pragma: no-cache
        Date: Wed, 22 Aug 2012 00:19:02 GMT
        Content-Length: 29
        Cache-Control: no-cache

        --response end--
        400 Bad Request
        Registered socket 3 for persistent reuse.
        Skipping 29 bytes of body: [Cannot remove active server.
        ] done.
        2012-08-21 17:19:02 ERROR 400: Bad Request.

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - already done apparently wget O -d --user=Administrator --password=asdasd --post-data="otpNode=n_0@10.17.20.233" http://lh:9000/controller/ejectNode Setting --user (user) to Administrator Setting --password (password) to asdasd Setting --post-data (postdata) to otpNode=n_0@10.17.20.233 DEBUG output created by Wget 1.14 on linux-gnu. URI encoding = ‘UTF-8’ - 2012-08-21 17:19:01 - http://lh:9000/controller/ejectNode Host ‘lh’ has not issued a general basic challenge. Resolving lh (lh)... 127.0.0.1 Caching lh => 127.0.0.1 Connecting to lh (lh)|127.0.0.1|:9000... connected. Created socket 3. Releasing 0x09cb2f48 (new refcount 1). -- request begin -- POST /controller/ejectNode HTTP/1.1 User-Agent: Wget/1.14 (linux-gnu) Accept: / Host: lh:9000 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 24 -- request end -- [POST data: otpNode=n_0@10.17.20.233] HTTP request sent, awaiting response... -- response begin -- HTTP/1.1 401 Unauthorized WWW-Authenticate: Basic realm="Couchbase Server Admin / REST" Server: Couchbase Server 2.0.0r_231_gdcd71d5 Pragma: no-cache Date: Wed, 22 Aug 2012 00:19:01 GMT Content-Length: 0 Cache-Control: no-cache -- response end -- 401 Unauthorized Registered socket 3 for persistent reuse. ] done. Inserted ‘lh’ into basic_authed_hosts Disabling further reuse of socket 3. Closed fd 3 -- request begin -- POST /controller/ejectNode HTTP/1.1 User-Agent: Wget/1.14 (linux-gnu) Accept: / Host: lh:9000 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 24 Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q= -- request end -- Failed writing HTTP request: Bad file descriptor. Closed fd 3 Retrying. - 2012-08-21 17:19:02 - (try: 2) http://lh:9000/controller/ejectNode Found ‘lh’ in basic_authed_hosts. Found lh in host_name_addresses_map (0x9cb2f48) Connecting to lh (lh)|127.0.0.1|:9000... connected. Created socket 3. Releasing 0x09cb2f48 (new refcount 1). -- request begin -- POST /controller/ejectNode HTTP/1.1 User-Agent: Wget/1.14 (linux-gnu) Accept: / Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc2Q= Host: lh:9000 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 24 -- request end -- [POST data: otpNode=n_0@10.17.20.233] HTTP request sent, awaiting response... -- response begin -- HTTP/1.1 400 Bad Request Server: Couchbase Server 2.0.0r_231_gdcd71d5 Pragma: no-cache Date: Wed, 22 Aug 2012 00:19:02 GMT Content-Length: 29 Cache-Control: no-cache -- response end -- 400 Bad Request Registered socket 3 for persistent reuse. Skipping 29 bytes of body: [Cannot remove active server. ] done. 2012-08-21 17:19:02 ERROR 400: Bad Request.

          People

          • Assignee:
            alkondratenko Aleksey Kondratenko (Inactive)
            Reporter:
            perry Perry Krug
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes