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

cbcollect_info lacks privileges to access initargs in non-root installs of couchbase-server

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.5.0
    • 5.0.0
    • ns_server
    • None
    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      On running cbcollect_info on a Centos VM running 5.0.0-testing (setup via Vagrant), from the command line as a non-privileged user a series of cascading failures were observed that seem to be triggered by the lack of permissions to read the initargs.

      8<-------------------------------------------------------------8<

      Failed to read initargs:

      {error,eacces}

      Found dump-guts: /opt/couchbase/bin/dump-guts

      Checking for server guts in /opt/couchbase/var/lib/couchbase/initargs...

      Failed to read initargs:

      {error,eacces}

      Found dump-guts: /opt/couchbase/bin/dump-guts

      Checking for server guts in /home/vagrant/Library/Application Support/Couchbase/var/lib/couchbase/initargs...

      Failed to read initargs:

      {error,enoent}

      Couldn't read server guts. Using some default values.

      I/O error(2): No such file or directory

      curl: (7) Failed to connect to 127.0.0.1 port 80: Connection refused

      8<-------------------------------------------------------------8<

       

      One of the problems that this causes is 

      Directory structure (['ls', '-lRai', '/']) - Exit code 2

      wherein because cbcollect_info was unable to construct the 'root' directory from initargs it defaults to '/' which then tries to ls over the entire host filesystem (as it is mounted into the vagrant VM) which fails after a really long time due to lack of permissions.

       

      Given this, cbcollect_info should probably fail if it is unable to read the initargs.

      Attachments

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

        Activity

          People

            steve.watanabe Steve Watanabe
            amit.krishnan Amit Krishnan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty