-
Notifications
You must be signed in to change notification settings - Fork 257
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
Problems with watchers when mixing upper and lower cases #927
Comments
Thank you for your report :) . I can reproduce your issue, and I think that your solution would fix it (maybe we should add an intermediary variable though, like Could you open a Pull-Request ? |
One thought, what happens if a user has watchers with the same name but different case? Something like this: [watcher:some_process]
cmd=sleep 100
[watcher:some_PROCESS]
cmd=ping 8.8.8.8 This is allowed by Circus, so my solution could have undesirable effects, stopping both processes when any of these commands are issued: circusctl stop some_process
circusctl stop some_PROCESS
circusctl stop soMe_prOcess
... I'm not really sure what's the best solution. Avoid matching lowercase could be one (remove Thanks |
I don't think that circus has ever been consistent regarding case sensitivity. The current behavior (forcing lowercase when given as an argument) is clearly wrong, but we have three options here:
I would go for option 1 as I can't think of any real world example where one would have two watchers with the same name but cased differently. |
Match lower case when start/stop/restart a watcher
Fixed by #929 |
There are still issues with watchers when mixing upper and lower case names. On master at 610195a try the following.
First:
Then, in another shell:
In yet another shell:
I think option 3 in k4nar's comment above is necessary, not just extra credit, and recommend:
If others can contribute to the list of normalization requirements, I'm willing to prepare a pull request. Here are the requirements I am aware of so far:
Are there more? |
Alternatively, I see no problem with removing the space/underscore replacement in |
Hi,
in circus 0.10 the default behaviour when stopping a watcher via
circusctl
was to match the name of the watcher against the name provided in command line using simple string matching. Now in 0.12.1 the default is to match using glob.That's a good feature, but now, if you give the exact name of the watcher, the
stop
command (start
andrestart
too) fails with:That's because the matching is against the lowercase name of the watcher. I would fix it making lowercase both parameters in
circus/commands/restart.py
, changing the existing code:to
Regards
The text was updated successfully, but these errors were encountered: