Skip to content

Conversation

Quentin-M
Copy link

the "down" file does not instruct runit to not start or stop the service, simply that it should be
"normally down".

for example with NGINX_DISABLED:

sv status nginx
run: nginx: (pid 125) 364s, normally down
/ # ps aux|grep nginx
   52 root      0:00 runsv nginx
  125 root      0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
  127 nginx     0:00 nginx: worker process
  128 nginx     0:00 nginx: worker process
  129 nginx     0:00 nginx: worker process
  130 nginx     0:00 nginx: worker process

the "down" file does not instruct runit to not start or stop the service, simply that it should be
"normally down". 

for example with `NGINX_DISABLED`:

```
sv status nginx
run: nginx: (pid 125) 364s, normally down
```

```
/ # ps aux|grep nginx
   52 root      0:00 runsv nginx
  125 root      0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
  127 nginx     0:00 nginx: worker process
  128 nginx     0:00 nginx: worker process
  129 nginx     0:00 nginx: worker process
  130 nginx     0:00 nginx: worker process
```
@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

I would say removing whole directory is that harsh (and unfortunately non-reversable) way to disable service.

@Quentin-M
Copy link
Author

Quentin-M commented Jun 21, 2020

Yes, just a quick hax. Runit docs suggest using creating/deleting symlinks to enable/disable services, this solution is not far from it given we use docker containers - it is absolutely reversible as is, just have to down/up the container, the folder will come back.

@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

Maybe some bug in scripts exist but runit documentation says down file should do exactly that:

If the file service/down exists, runsv does not start ./run immediately. The control interface (see below) can be used to start the service and to give other commands to runsv.

@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

Nah, sorry, don't like this hax. Will do that differently. Thanks for patch though, much appreciated!

@Quentin-M
Copy link
Author

Quentin-M commented Jun 21, 2020 via email

@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

And btw, disabling Nginx breaking all flow somehow, not sure if it's wise to disable it or graphite-web

@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

Ah, found issue, will fix too

@deniszh
Copy link
Member

deniszh commented Jun 21, 2020

I prefer more explicit change, like #144
Thanks!

@deniszh deniszh closed this Jun 21, 2020
@Quentin-M Quentin-M deleted the patch-1 branch June 21, 2020 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants