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

sed command to get RAM for rpm packages is broken

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: installer
    • Security Level: Public
    • Labels:
      None

      Description

      Build 138:
      http://qa.hq.northscale.net/view/2.0.1/job/ubuntu-64-2.0-new-rebalance-tests-P0/325/console

      2013-01-18 05:28:39,371 - root - INFO - command executed successfully
      2013-01-18 05:28:39,371 - root - ERROR - /var/tmp/rpm-tmp.90220: command substitution: line 27: unexpected EOF while looking for matching `''
      2013-01-18 05:28:39,373 - root - ERROR - /var/tmp/rpm-tmp.90220: command substitution: line 28: syntax error: unexpected end of file
      2013-01-18 05:28:39,373 - root - INFO - Minimum RAM required : 4 GB
      2013-01-18 05:28:39,375 - root - INFO - System RAM configured :
      2013-01-18 05:28:39,375 - root - INFO -
      2013-01-18 05:28:39,376 - root - INFO - Minimum number of processors required : 4 cores
      2013-01-18 05:28:39,376 - root - INFO - Number of processors on the system : 4 cores
      2013-01-18 05:28:39,376 - root - INFO -
      2013-01-18 05:28:39,379 - root - INFO - Skipping server start due to INSTALL_DONT_START_SERVER ...
      2013-01-18 05:28:39,379 - root - INFO -
      2013-01-18 05:28:39,380 - root - INFO - You have successfully installed Couchbase Server.
      2013-01-18 05:28:39,380 - root - INFO - Please browse to http://localhost.localdomain:8091/ to configure your server.
      2013-01-18 05:28:39,380 - root - INFO - Please refer to http://couchbase.com for additional resources.
      2013-01-18 05:28:39,381 - root - INFO -
      2013-01-18 05:28:39,381 - root - INFO - Please note that you have to update your firewall configuration to
      2013-01-18 05:28:39,382 - root - INFO - allow connections to the following ports: 11211, 11210, 11209, 4369,
      2013-01-18 05:28:39,382 - root - INFO - 8091, 8092 and from 21100 to 21299.
      2013-01-18 05:28:39,382 - root - INFO -
      2013-01-18 05:28:39,383 - root - INFO - By using this software you agree to the End User License Agreement.
      2013-01-18 05:28:39,383 - root - INFO - See /opt/couchbase/LICENSE.txt.
      2013-01-18 05:28:39,383 - root - INFO -
      2013-01-18 05:28:39,383 - root - INFO - running command.raw /opt/couchbase/bin/cbenable_core_dumps.sh /tmp
      2013-01-18 05:28:39,501 - root - INFO - command executed successfully
      2013-01-18 05:28:39,504 - root - INFO - running command.raw sed -i 's/ulimit -c unlimited/ulimit -c unlimited\n export COUCHBASE_NUM_VBUCKETS=1024/' /opt/couchbase/etc/couchbase_init.d
      2013-01-18 05:28:39,633 - root - INFO - command executed successfully
      2013-01-18 05:28:39,634 - root - INFO - running command.raw /etc/init.d/couchbase-server start
      2013-01-18 05:28:41,408 - root - INFO - command executed successfully
      2013-01-18 05:28:41,409 - root - INFO - Starting couchbase-server[ OK ]
      2013-01-18 05:28:41,410 - root - INFO - wait 5 seconds for membase server to start
      thread installer-thread-10.3.121.107 finished
      installation failed. initializer threads were skipped
      some nodes were not install successfully!

      issue is in commit:

      https://github.com/couchbase/voltron/commit/18fd05f1fa59d685cc5c409edea3f5f9d936e8fd

      now->$ `grep 'MemTotal' /proc/meminfo | sed 's/'s/MemTotal:\s*//g'`
      bash: command substitution: line 1: unexpected EOF while looking for matching `''
      bash: command substitution: line 2: syntax error: unexpected end of file

      should be as in deb file->$ grep 'MemTotal' /proc/meminfo | sed 's/MemTotal:\s*//g'
      16314556 kB

      # Subject Project Status CR V
      For Gerrit Dashboard: &For+MB-7557=message:MB-7557

        Activity

        Hide
        andreibaranouski Andrei Baranouski added a comment -

        $ more rpm-tmp.57383
        set -x

        if test X"$RPM_INSTALL_PREFIX0" = X"" ; then
        RPM_INSTALL_PREFIX0=/opt/couchbase
        fi

        if test X"$RPM_INSTALL_PREFIX1" = X"" ; then
        RPM_INSTALL_PREFIX1=/etc/init.d
        fi

        getent group couchbase >/dev/null || \
        groupadd -r couchbase || exit 1
        getent passwd couchbase >/dev/null || \
        useradd -r -g couchbase -d $RPM_INSTALL_PREFIX0 -s /bin/sh \
        -c "couchbase system user" couchbase || exit 1

        if [ -x $RPM_INSTALL_PREFIX1/couchbase-server ]
        then
        echo "Stopping couchbase-server ..."
        $RPM_INSTALL_PREFIX1/couchbase-server stop || true
        fi

        if [ -d /opt/couchbase ]
        then
        find /opt/couchbase -maxdepth 1 -type l | xargs rm -f || true
        fi

        RAM=`grep 'MemTotal' /proc/meminfo | sed 's/'s/MemTotal:\s*//g'`
        CPU=`grep 'processor' /proc/cpuinfo | sort -u | wc -l`

        cat <<EOF
        Minimum RAM required : 4 GB
        System RAM configured : $RAM

        Minimum number of processors required : 4 cores
        Number of processors on the system : $CPU cores

        EOF

        exit 0

        Show
        andreibaranouski Andrei Baranouski added a comment - $ more rpm-tmp.57383 set -x if test X"$RPM_INSTALL_PREFIX0" = X"" ; then RPM_INSTALL_PREFIX0=/opt/couchbase fi if test X"$RPM_INSTALL_PREFIX1" = X"" ; then RPM_INSTALL_PREFIX1=/etc/init.d fi getent group couchbase >/dev/null || \ groupadd -r couchbase || exit 1 getent passwd couchbase >/dev/null || \ useradd -r -g couchbase -d $RPM_INSTALL_PREFIX0 -s /bin/sh \ -c "couchbase system user" couchbase || exit 1 if [ -x $RPM_INSTALL_PREFIX1/couchbase-server ] then echo "Stopping couchbase-server ..." $RPM_INSTALL_PREFIX1/couchbase-server stop || true fi if [ -d /opt/couchbase ] then find /opt/couchbase -maxdepth 1 -type l | xargs rm -f || true fi RAM=`grep 'MemTotal' /proc/meminfo | sed 's/'s/MemTotal:\s*//g'` CPU=`grep 'processor' /proc/cpuinfo | sort -u | wc -l` cat <<EOF Minimum RAM required : 4 GB System RAM configured : $RAM Minimum number of processors required : 4 cores Number of processors on the system : $CPU cores EOF exit 0
        Show
        bcui Bin Cui (Inactive) added a comment - http://review.couchbase.org/#/c/24059/

          People

          • Assignee:
            bcui Bin Cui (Inactive)
            Reporter:
            andreibaranouski Andrei Baranouski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes