Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worker_threads not honored entirely? pgrp signals? #688

Closed
teichopsia opened this issue Feb 14, 2012 · 6 comments
Closed

worker_threads not honored entirely? pgrp signals? #688

teichopsia opened this issue Feb 14, 2012 · 6 comments

Comments

@teichopsia
Copy link

hello, with salt 0.9.6 via pip:

when I start the salt-master nondaemonized, I have 8 processes.

when starting the master with worker_threads=1 in the master config file, I still have 8 processes.

when changing the default opt in config.py to 1, I now have 4 processes.

  1. why isn't the configuration setting honored?
  2. is there more recent code to offer a pidfile for the pid that handles signalling the entire process group for graceful shutdown? I recall some pidfile work but didn't see the extent yet.
@thatch45
Copy link
Contributor

Looks to me like it is being honored, the master starts 3 processes and then "n" worker threads. It looks like you have a config error:
worker_threads=1 # not yaml
worker_threads: 1 # correct
please take a look at the config (there should also be an error in the logs)

@thatch45
Copy link
Contributor

I missed #2
I am having issues with zeromq not dying correctly, in the current git HEAD the pidfile for the master records all PIDS

@teichopsia
Copy link
Author

well I was implying assignment, not a direct yaml quote. the configuration is valid and accepted. it's just not being used.

@thatch45
Copy link
Contributor

Hmm, so far I am unable to reproduce the issue, when I change my config I am consistently getting the correct number of processes. Would it be possible to post your master configuration file? I trust that it is correct, but another configuration might be producing a conflict (I have no idea how this might happen, but it is worth taking a look)

@teichopsia
Copy link
Author

actually, closing. found the culprit. the environment pulled in a minion config instead of a master config due to salt unrelated virtualenv setup. due to the shared keywords it wasn't immediately obvious until we did get_opts dumps. sorry about that.

in general the pidfile is intended to be the single process that handles signals for the entire process group. most scripts expect invocations (/proc/cmdline) on subsequent lines and not additional pids.

multiple processes for salt-master is fine but there needs to be a clean way to signal exit of all processes via one pid.

@thatch45
Copy link
Contributor

Thanks, I was wondering what could cause this issue. As for the pidfile, yes, I agree, and I am working on cleaning it up, thanks for your help!

arthurzenika pushed a commit to arthurzenika/salt that referenced this issue Sep 17, 2013
…ssues

Register an encoding error handler in order to force `ascii`
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

No branches or pull requests

2 participants