Bug 1008552 - Add support for multiple instances to initscripts
Add support for multiple instances to initscripts
Product: Fedora
Classification: Fedora
Component: python-carbon (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Jonathan Steffan
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-09-16 11:03 EDT by James Juran
Modified: 2016-07-19 15:27 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 15:27:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
add support for multiple carbon-aggregator instances (2.46 KB, patch)
2013-09-16 11:03 EDT, James Juran
no flags Details | Diff
add support for multiple carbon daemon instances (7.31 KB, patch)
2013-09-17 21:02 EDT, James Juran
no flags Details | Diff
support multiple instances (10.60 KB, patch)
2013-09-30 18:00 EDT, James Juran
no flags Details | Diff
add support for multiple carbon daemon instances (10.03 KB, patch)
2013-10-01 10:43 EDT, James Juran
no flags Details | Diff

  None (edit)
Description James Juran 2013-09-16 11:03:48 EDT
Created attachment 798309 [details]
add support for multiple carbon-aggregator instances

Description of problem:

Can't run multiple carbon-aggregator instances without modifying initscript.

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

I'm using python-carbon-0.9.12-1.el6.noarch, but support for multiple carbon-aggregator instances is not present in rawhide packages either.

How reproducible:


Steps to Reproduce:
1. Configure multiple carbon-aggregator instances in /etc/carbon/carbon.conf.
2. Restart carbon-aggregator service

Actual results:

Multiple carbon-aggregator instances running

Expected results:

Only one carbon-aggregator instance running

Additional info:

Patch attached. Should apply to both master and el6 branches. Inspired by the upstream initscript (https://raw.github.com/graphite-project/carbon/master/distro/redhat/init.d/carbon-aggregator), but minimizes the changes to the current version.
Comment 1 Jonathan Steffan 2013-09-17 19:56:28 EDT
Thanks for the bug report. I've been aware of the upstream init scripts able to run multiple instances and have not taken the time to port this into the init script shipped (wanted to address the CVE first.)

I will work on an update that includes the needed changes to support this and will submit and update once graphite-web-0.9.12-2 goes stable.
Comment 2 James Juran 2013-09-17 21:02:50 EDT
Created attachment 799025 [details]
add support for multiple carbon daemon instances

Thank you for looking at this. I've since added support for multiple instances of carbon-relay and carbon-cache as well, in the same style. I'm currently running these in production.
Comment 3 James Juran 2013-09-24 15:55:48 EDT
One issue I haven't yet solved is that the old processed don't die with the automatic service restart, because they are done with the new initscript but the PID files are in the old format.
Comment 4 James Juran 2013-09-30 18:00:12 EDT
Created attachment 805568 [details]
support multiple instances

I found that log files from multiple instances were stomping on each other. To avoid this, the initscripts need to not pass --logdir, which will let each instance create its own subdir of LOG_DIR to have its own set of log files.

I still have not come up with a good way to transition from the currently-released package. We could:

1) In the %pre script, do "service <daemontype> stop". That would stop the old one, but then the new version wouldn't automatically start.

2) Put code in the initscripts' stop functions to also stop old-style instances. This would work but would leave the initscripts cluttered forever.

If you have another idea that's better on how to do this, please let me know.
Comment 5 James Juran 2013-10-01 10:43:45 EDT
Created attachment 806019 [details]
add support for multiple carbon daemon instances

Merge changes now committed for bug 1013813 to make this easier to apply.
Comment 6 Jonathan Steffan 2014-11-22 18:06:07 EST

Would you be willing to rebase this to rawhide and we'll get it applied?
Comment 7 James Juran 2014-12-29 09:33:46 EST
I'm unlikely to have time to do this and retest in the near future. Also, I haven't solved the issue mentioned in comment 3, which I think needs to be solved before this change is broadly released.

If someone would like to take this bug and run with it please go ahead; otherwise I'll update the patch when I can.
Comment 8 Jaroslav Reznik 2015-03-03 11:55:14 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
Comment 9 Fedora End Of Life 2016-07-19 15:27:11 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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