rccontrol autostart service

gildas.fargeas's Avatar

gildas.fargeas

14 Oct, 2015 02:09 PM

Hi,
I use systemd to start rccontrol at boot and restart all instances at once (if that's ever necessary !) but I cannot find a way to tell rccontrol to restart an instance automatically.
When enterprise or vcsserver is killed, the service does not restart automatically ? I can always use another systemd service for that but it seems redundant with the supposed supervisor behaviour !
Thanks in advance for your answer

note:
autostart is set to true in my supervisor.ini and I only have the basic options in my rccontrol.ini:

; my .rccontrol.ini
[instance:vcsserver-1]
start_at_boot = True
[instance:enterprise-1]
start_at_boot = True
  1. Support Staff 1 Posted by develop on 14 Oct, 2015 02:55 PM

    develop's Avatar

    Hi Gildas,

    The start_at_boot flag inside of the rccontrol.ini translates into the autostart flag inside of the supervisor.ini file. However for the behaviour you are looking for the autorestart = true entry would also need to the added to the supervisor.ini file.

    The reason we don't set this is that all instances should be managed through the 'rccontrol start/stop/restart' commands after the initial rccontrol self-init boot hook. Currently you can't modify the supervisor.ini directly either as it will be overwritten. That said we recognise that folks want to tweak the settings for their environment and in the upcoming Control version 1.2.3 we will be introducing the ability for per-instance supervisor customisations.

    I hope that clarifies the current situation. There is a larger RCE/RCC release in the pipeline but I expect RCC 1.2.3 to follow shortly afterwards this month.

    Cheers,
    Oliver

  2. 2 Posted by gildas.fargeas on 14 Oct, 2015 03:18 PM

    gildas.fargeas's Avatar

    Yes it does clarify the rccontrol behaviour.
    However, I wonder what is your preferred way of checking the server status then ? The rccontrol status can be parsed but I'd prefer using a more reliable way to check that.
    With Rhodecode 2, we used sysV+monit+puppet to check that the service was running but now I thought on relying mostly on rccontrol (and systemd for the initial launch of rccontrol)
    Do you use a more elegant way to check the instances status ?

  3. Support Staff 3 Posted by develop on 14 Oct, 2015 04:02 PM

    develop's Avatar

    In-house we are actually using the Appenlight tool to perform monitoring & reporting. I'm told that your company is aware we are developing this and may be interested in helping to Beta test it when ready :)

    Internally rccontrol status is using the RPC mechanism of supervisor to query the state using their API. This is an interesting possibility if you don't want to be parsing but want to talk to supervisord directly. For Rhode Code Enterprise specifically you can access http:///_admin/ping. This will do an internal check to see if the application is able to service requests. Doing a curl on this location would also be a good check to see that everything is up and running.

  4. 4 Posted by gildas.fargeas on 12 May, 2017 09:32 AM

    gildas.fargeas's Avatar

    I close this as it is outdated in our setup.
    We use a systemd unit to check rccontrol status and launch with rccontrol self-init.

  5. gildas.fargeas closed this discussion on 12 May, 2017 09:32 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

23 Nov, 2017 03:02 PM
21 Nov, 2017 06:38 PM
03 Oct, 2017 08:26 PM
03 Oct, 2017 05:48 PM
28 Sep, 2017 05:55 PM