Bug 1008552 - Add support for multiple instances to initscripts
Summary: Add support for multiple instances to initscripts
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-carbon
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jonathan Steffan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-16 15:03 UTC by James Juran
Modified: 2016-07-19 19:27 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 19:27:11 UTC
Type: Bug
Embargoed:


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

Description James Juran 2013-09-16 15:03:48 UTC
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:

Always

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 23:56:28 UTC
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-18 01:02:50 UTC
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 19:55:48 UTC
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 22:00:12 UTC
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 14:43:45 UTC
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 23:06:07 UTC
James,

Would you be willing to rebase this to rawhide and we'll get it applied?

Comment 7 James Juran 2014-12-29 14:33:46 UTC
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 16:55:14 UTC
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 9 Fedora End Of Life 2016-07-19 19:27:11 UTC
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
bug.

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.