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

memcached admin_user "_admin" isn't changed on upgrade

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.5.3
    • Fix Version/s: 6.0.4, 6.5.1, 7.0.0
    • Component/s: ns_server
    • Labels:
      None
    • Triage:
      Untriaged
    • Is this a Regression?:
      Unknown

      Description

      Prior to 5.0 the memcached admin_user was "_admin". In 5.0 it was changed to "@ns_server" and also other_users were added. But an upgraded doesn't change the admin_user.

      http://src.couchbase.org/source/xref/spock/ns_server/src/ns_config_default.erl#267-268

      On an upgrade admin_user should be changed. And other_users should be added.

        Attachments

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

          Activity

          Hide
          steve.watanabe Steve Watanabe added a comment -

          Also, for customers that are in the situation where they have upgraded and thus have admin audit events, is there a way for them to "clean" these up?  Nodes that are added to the cluster with have @ns_user in their audit events so there's going to be a mix if the _admin ones cannot be changed.  Are there any foreseen "gotchas" that might arise in that situation?

          Show
          steve.watanabe Steve Watanabe added a comment - Also, for customers that are in the situation where they have upgraded and thus have admin audit events, is there a way for them to "clean" these up?  Nodes that are added to the cluster with have @ns _user in their audit events so there's going to be a mix if the _admin ones cannot be changed.  Are there any foreseen "gotchas" that might arise in that situation?
          Hide
          steve.watanabe Steve Watanabe added a comment -

          Change under review: http://review.couchbase.org/#/c/121225/
          was used to build a toy build: http://server.jenkins.couchbase.com/view/Toys/job/toy-unix-simple/904/
          and used on a two node vagrant cluster to do an offline upgrade from 4.6.5 to 5.5.6 to a 6.0.4 build with my fix.

          -rw-r--r-- 1 vagrant vagrant 112878556 May 29  2018 couchbase-server-enterprise-4.6.5-centos7.x86_64.rpm
          -rw-r--r-- 1 vagrant vagrant 232362528 Jan 27 23:17 couchbase-server-enterprise-5.5.6-4739-centos7.x86_64.rpm
          -rw-r--r-- 1 vagrant vagrant 371881744 Jan 27 23:00 couchbase-server-enterprise-6.0.4-10904-centos7.x86_64.rpm
          

          Prior to 6.0.4:

          vagrant@node1-cb465-centos7 ~]$ curl http://localhost:8091/diag/eval -u Administrator:asdasd -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)'
          "_admin"
          

          After booting with my fix:

          [vagrant@node1-cb465-centos7 ~]$ curl http://localhost:8091/diag/eval -u Administrator:asdasd -d 'Config = ns_conf,ns_config:search_node_prop(Config, memcached, admin_user)'
          "@ns_server"
          

          Show
          steve.watanabe Steve Watanabe added a comment - Change under review: http://review.couchbase.org/#/c/121225/ was used to build a toy build: http://server.jenkins.couchbase.com/view/Toys/job/toy-unix-simple/904/ and used on a two node vagrant cluster to do an offline upgrade from 4.6.5 to 5.5.6 to a 6.0.4 build with my fix. -rw-r--r-- 1 vagrant vagrant 112878556 May 29 2018 couchbase-server-enterprise-4.6.5-centos7.x86_64.rpm -rw-r--r-- 1 vagrant vagrant 232362528 Jan 27 23:17 couchbase-server-enterprise-5.5.6-4739-centos7.x86_64.rpm -rw-r--r-- 1 vagrant vagrant 371881744 Jan 27 23:00 couchbase-server-enterprise-6.0.4-10904-centos7.x86_64.rpm Prior to 6.0.4: vagrant@node1-cb465-centos7 ~]$ curl http: //localhost :8091 /diag/eval -u Administrator:asdasd -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)' "_admin" After booting with my fix: [vagrant@node1-cb465-centos7 ~]$ curl http: //localhost :8091 /diag/eval -u Administrator:asdasd -d 'Config = ns_conf,ns_config:search_node_prop(Config, memcached, admin_user)' "@ns_server"
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.0.4-3080 contains ns_server commit d53fc40 with commit message:
          MB-37269 Change memcached admin_user on upgrade

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.0.4-3080 contains ns_server commit d53fc40 with commit message: MB-37269 Change memcached admin_user on upgrade
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.5.1-6099 contains ns_server commit d53fc40 with commit message:
          MB-37269 Change memcached admin_user on upgrade

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.1-6099 contains ns_server commit d53fc40 with commit message: MB-37269 Change memcached admin_user on upgrade
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-7.0.0-1224 contains ns_server commit d53fc40 with commit message:
          MB-37269 Change memcached admin_user on upgrade

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-1224 contains ns_server commit d53fc40 with commit message: MB-37269 Change memcached admin_user on upgrade
          Hide
          Balakumaran.Gopal Balakumaran Gopal added a comment -

          Validated this on 6.0.4-3080.

          [root@node1-cb600-centos7 tmp]# rpm -i couchbase-server-enterprise-4.6.5-centos7.x86_64.rpm
          Minimum RAM required  : 4 GB
          System RAM configured : 0.97 GB
           
          Minimum number of processors required : 4 cores
          Number of processors on the system    : 1 cores
           
           
          You have successfully installed Couchbase Server.
          Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server.
          Please refer to http://couchbase.com for additional resources.
           
          Please note that you have to update your firewall configuration to
          allow connections to the following ports:
          4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11209 to 11211,
          11214, 11215, 18091 to 18093, and from 21100 to 21299.
           
          By using this software you agree to the End User License Agreement.
          See /opt/couchbase/LICENSE.txt.
           
          [root@node1-cb600-centos7 tmp]#  curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)'
          "_admin"[root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 
          4.6.5-4742
          [root@node1-cb600-centos7 tmp]#  curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)'
          "_admin"[root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# rpm -U couchbase-server-enterprise-5.5.6-centos7.x86_64.rpm
          Stopping couchbase-server (via systemctl):                 [  OK  ]
          Minimum RAM required  : 4 GB
          System RAM configured : 0.97 GB
           
          Minimum number of processors required : 4 cores
          Number of processors on the system    : 1 cores
           
          warning: /opt/couchbase/etc/couchdb/local.ini saved as /opt/couchbase/etc/couchdb/local.ini.rpmsave
          Upgrading couchbase-server ...
            /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes 
          Automatic mode: running without interactive questions or confirmations.
          Analysing...
          Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat
          Target node: ns_1@127.0.0.1
          Upgrading from 2.0
           
          Couchbase should not be running.
            Please use: /etc/init.d/couchbase-server stop
           
          Database dir: /opt/couchbase/var/lib/couchbase/data
           
          Buckets to upgrade: default,travel-sample
           
          Checking disk space available for buckets in directory:
            /opt/couchbase/var/lib/couchbase/data
            Free disk bucket space wanted: 0.0
            Free disk bucket space available: 15214264320
            Free disk space factor: 2.0
            Ok.
           
          Analysis complete.
           
          Copying /opt/couchbase/var/lib/couchbase/config/config.dat
              cp /opt/couchbase/var/lib/couchbase/config/config.dat /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat
          Ensuring bucket data directories.
          Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default
              mkdir -p /opt/couchbase/var/lib/couchbase/data/default
          Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/travel-sample
              mkdir -p /opt/couchbase/var/lib/couchbase/data/travel-sample
          Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
              chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
          Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
              chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
           
          Done.
           
          You have successfully installed Couchbase Server.
          Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server.
          Please refer to http://couchbase.com for additional resources.
           
          Please note that you have to update your firewall configuration to
          allow connections to the following ports:
          4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11207, 11209 to 11211,
          11214, 11215, 18091 to 18093, and from 21100 to 21299.
           
          By using this software you agree to the End User License Agreement.
          See /opt/couchbase/LICENSE.txt.
           
          [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 
          5.5.6-4733
          [root@node1-cb600-centos7 tmp]#  curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)'
          "_admin"[root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# 
          [root@node1-cb600-centos7 tmp]# rpm -U  couchbase-server-enterprise-6.0.4-3080-centos7.x86_64.rpm
          Minimum RAM required  : 4 GB
          System RAM configured : 0.97 GB
           
          Minimum number of processors required : 4 cores
          Number of processors on the system    : 1 cores
           
          Upgrading couchbase-server ...
            /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes 
          Automatic mode: running without interactive questions or confirmations.
          Analysing...
          Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat
          Target node: ns_1@127.0.0.1
          Upgrading from 2.0
           
          Couchbase should not be running.
            Please use: /etc/init.d/couchbase-server stop
           
          Database dir: /opt/couchbase/var/lib/couchbase/data
           
          Buckets to upgrade: default,travel-sample
           
          Checking disk space available for buckets in directory:
            /opt/couchbase/var/lib/couchbase/data
            Free disk bucket space wanted: 0.0
            Free disk bucket space available: 14936317952
            Free disk space factor: 2.0
            Ok.
           
          Analysis complete.
           
          Copying /opt/couchbase/var/lib/couchbase/config/config.dat
              cp /opt/couchbase/var/lib/couchbase/config/config.dat /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat
          Copying /opt/couchbase/var/lib/couchbase/config/dist_cfg
              cp /opt/couchbase/var/lib/couchbase/config/dist_cfg /opt/couchbase/bin/install/../../var/lib/couchbase/config/dist_cfg
          Ensuring bucket data directories.
          Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default
              mkdir -p /opt/couchbase/var/lib/couchbase/data/default
          Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/travel-sample
              mkdir -p /opt/couchbase/var/lib/couchbase/data/travel-sample
          Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
              chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
          Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data
              chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data
           
          Done.
           
          You have successfully installed Couchbase Server.
          Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server.
          Please refer to http://couchbase.com for additional resources.
           
          Please note that you have to update your firewall configuration to
          allow connections to the following ports:
          4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11207, 11209 to 11211,
          11214, 11215, 18091 to 18093, and from 21100 to 21299.
           
          By using this software you agree to the End User License Agreement.
          See /opt/couchbase/LICENSE.txt.
           
          [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 
          6.0.4-3080
          [root@node1-cb600-centos7 tmp]#  curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)'
          "@ns_server"[root@node1-cb600-centos7 tmp]# 
          

          Show
          Balakumaran.Gopal Balakumaran Gopal added a comment - Validated this on 6.0.4-3080. [root@node1-cb600-centos7 tmp]# rpm -i couchbase-server-enterprise-4.6.5-centos7.x86_64.rpm Minimum RAM required : 4 GB System RAM configured : 0.97 GB   Minimum number of processors required : 4 cores Number of processors on the system : 1 cores     You have successfully installed Couchbase Server. Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server. Please refer to http://couchbase.com for additional resources.   Please note that you have to update your firewall configuration to allow connections to the following ports: 4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11209 to 11211, 11214, 11215, 18091 to 18093, and from 21100 to 21299.   By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt.   [root@node1-cb600-centos7 tmp]# curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)' "_admin"[root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 4.6.5-4742 [root@node1-cb600-centos7 tmp]# curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)' "_admin"[root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# rpm -U couchbase-server-enterprise-5.5.6-centos7.x86_64.rpm Stopping couchbase-server (via systemctl): [ OK ] Minimum RAM required : 4 GB System RAM configured : 0.97 GB   Minimum number of processors required : 4 cores Number of processors on the system : 1 cores   warning: /opt/couchbase/etc/couchdb/local.ini saved as /opt/couchbase/etc/couchdb/local.ini.rpmsave Upgrading couchbase-server ... /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes Automatic mode: running without interactive questions or confirmations. Analysing... Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat Target node: ns_1@127.0.0.1 Upgrading from 2.0   Couchbase should not be running. Please use: /etc/init.d/couchbase-server stop   Database dir: /opt/couchbase/var/lib/couchbase/data   Buckets to upgrade: default,travel-sample   Checking disk space available for buckets in directory: /opt/couchbase/var/lib/couchbase/data Free disk bucket space wanted: 0.0 Free disk bucket space available: 15214264320 Free disk space factor: 2.0 Ok.   Analysis complete.   Copying /opt/couchbase/var/lib/couchbase/config/config.dat cp /opt/couchbase/var/lib/couchbase/config/config.dat /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat Ensuring bucket data directories. Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default mkdir -p /opt/couchbase/var/lib/couchbase/data/default Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/travel-sample mkdir -p /opt/couchbase/var/lib/couchbase/data/travel-sample Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data   Done.   You have successfully installed Couchbase Server. Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server. Please refer to http://couchbase.com for additional resources.   Please note that you have to update your firewall configuration to allow connections to the following ports: 4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11207, 11209 to 11211, 11214, 11215, 18091 to 18093, and from 21100 to 21299.   By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt.   [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 5.5.6-4733 [root@node1-cb600-centos7 tmp]# curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)' "_admin"[root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# [root@node1-cb600-centos7 tmp]# rpm -U couchbase-server-enterprise-6.0.4-3080-centos7.x86_64.rpm Minimum RAM required : 4 GB System RAM configured : 0.97 GB   Minimum number of processors required : 4 cores Number of processors on the system : 1 cores   Upgrading couchbase-server ... /opt/couchbase/bin/install/cbupgrade -c /opt/couchbase/var/lib/couchbase/config -a yes Automatic mode: running without interactive questions or confirmations. Analysing... Previous config.dat file is /opt/couchbase/var/lib/couchbase/config/config.dat Target node: ns_1@127.0.0.1 Upgrading from 2.0   Couchbase should not be running. Please use: /etc/init.d/couchbase-server stop   Database dir: /opt/couchbase/var/lib/couchbase/data   Buckets to upgrade: default,travel-sample   Checking disk space available for buckets in directory: /opt/couchbase/var/lib/couchbase/data Free disk bucket space wanted: 0.0 Free disk bucket space available: 14936317952 Free disk space factor: 2.0 Ok.   Analysis complete.   Copying /opt/couchbase/var/lib/couchbase/config/config.dat cp /opt/couchbase/var/lib/couchbase/config/config.dat /opt/couchbase/bin/install/../../var/lib/couchbase/config/config.dat Copying /opt/couchbase/var/lib/couchbase/config/dist_cfg cp /opt/couchbase/var/lib/couchbase/config/dist_cfg /opt/couchbase/bin/install/../../var/lib/couchbase/config/dist_cfg Ensuring bucket data directories. Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/default mkdir -p /opt/couchbase/var/lib/couchbase/data/default Ensuring bucket data directory: /opt/couchbase/var/lib/couchbase/data/travel-sample mkdir -p /opt/couchbase/var/lib/couchbase/data/travel-sample Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data Ensuring dbdir owner/group: /opt/couchbase/var/lib/couchbase/data chown -R couchbase:couchbase /opt/couchbase/var/lib/couchbase/data   Done.   You have successfully installed Couchbase Server. Please browse to http://node1-cb600-centos7.vagrants:8091/ to configure your server. Please refer to http://couchbase.com for additional resources.   Please note that you have to update your firewall configuration to allow connections to the following ports: 4369, 8091 to 8094, 9100 to 9105, 9998, 9999, 11207, 11209 to 11211, 11214, 11215, 18091 to 18093, and from 21100 to 21299.   By using this software you agree to the End User License Agreement. See /opt/couchbase/LICENSE.txt.   [root@node1-cb600-centos7 tmp]# cat /opt/couchbase/VERSION.txt 6.0.4-3080 [root@node1-cb600-centos7 tmp]# curl http://localhost:8091/diag/eval -u Administrator:password -d 'Config = ns_config:get(),ns_config:search_node_prop(Config, memcached, admin_user)' "@ns_server"[root@node1-cb600-centos7 tmp]#
          Hide
          build-team Couchbase Build Team added a comment -

          Build couchbase-server-6.6.0-7519 contains ns_server commit d53fc40 with commit message:
          MB-37269 Change memcached admin_user on upgrade

          Show
          build-team Couchbase Build Team added a comment - Build couchbase-server-6.6.0-7519 contains ns_server commit d53fc40 with commit message: MB-37269 Change memcached admin_user on upgrade

            People

            Assignee:
            steve.watanabe Steve Watanabe
            Reporter:
            steve.watanabe Steve Watanabe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty