Bug 1227776 - warning message on service carbon-cache start
Summary: warning message on service carbon-cache start
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-carbon
Version: el6
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Piotr Popieluch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-03 13:19 UTC by Michael Nagy
Modified: 2015-07-08 17:07 UTC (History)
4 users (show)

Fixed In Version: python-carbon-0.9.12-3.el6.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-08 17:07:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Nagy 2015-06-03 13:19:22 UTC
Description of problem:

Running 'service carbon-cache start' causes an error/warning message even though it works.

Version-Release number of selected component (if applicable):

python-carbon.noarch 0.9.12-3.el6

How reproducible:

With the carbon-cache service not running, issue the command:

  sudo service carbon-cache start

Steps to Reproduce:
1. install the python-carbon package if not already installed
2. stop the carbon-cache service if already running (sudo service carbon-cache stop)
3. start the carbon-cache service (sudo service carbon-cache start)

Actual results:

Starting carbon-cache: /usr/bin/dirname: extra operand `start.pid'
Try `/usr/bin/dirname --help' for more information.
Starting carbon-cache (instance a)
                                                           [  OK  ]

Expected results:

Starting carbon-cache: Starting carbon-cache (instance a)
                                                           [  OK  ]
Additional info:

Because of the error/warning message, running the service start as part of, for instance, a logrotate cron job causes the job to flag an error and, for instance, send an email to the system administrator each time the logrotate job runs.  This is highly annoying!

Reordering the parameters to the daemon call in the start() function in /etc/init.d/carbon-cache as follows resolves the problem:

start() {
    [ -f $CONFIG ] || exit 6
    [ -x $exec ] || exit 5
    echo -n $"Starting `basename $exec`: "
    daemon "$exec --config=$CONFIG --pidfile=$pidfile --logdir=$LOG_DIR start"
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

Change the daemon line to put the start parameter first and all is well:

    daemon "$exec start --config=$CONFIG --pidfile=$pidfile --logdir=$LOG_DIR"

This works around a parsing error in /etc/rc.d/init.d/functions (which is sourced by /etc/init.d/carbon-cache), specifically in the __pids_var_run() function called by the daemon() function.  In __pids_var_run() there is this line:

    local base=${1##*/}

which parses the first parameter to attempt to extract the filename.  Unfortunately, the first parameter is not a clean filepath/filename, but has the trailing 'start' appended, which causes the parsing to return a bad result.

Comment 1 Fedora Update System 2015-06-11 21:31:22 UTC
python-carbon-0.9.12-3.el6.1 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-carbon-0.9.12-3.el6.1

Comment 2 Piotr Popieluch 2015-06-11 21:36:09 UTC
Thank you for reporting!

position of start is moved to beginning in all three init files for el6. This will be pushed to testing repo soon. Please test for any regressions and leave feedback.

Comment 3 Fedora Update System 2015-06-13 19:35:18 UTC
Package python-carbon-0.9.12-3.el6.1:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-carbon-0.9.12-3.el6.1'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6675/python-carbon-0.9.12-3.el6.1
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2015-07-08 17:07:28 UTC
python-carbon-0.9.12-3.el6.1 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.