Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: dev

Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart

 

 

Cherokee dev RSS feed   Index | Next | Previous | View Threaded


codesite-noreply at google

Feb 8, 2010, 1:37 AM

Post #1 of 9 (657 views)
Permalink
Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart

Status: New
Owner: ----

New issue 732 by useboxnet: cherokee-admin doesn't notice why cherokee
failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

Steps to reproduce:

1. In a virtual server setup a rule based on a header check.
2. Write an invalid regex, ei: for a hader check, *.\.example\.dom (*. is
wrong, it should be .*)
3. Do a gracefully restart

cherokee-admin doesn't check the regex, and when cherokee tries to
reestat it refuses to do so (I suppose because I can't compile the wrong
crafted regex).

I suppose there are other ways to reproduce the same behavior.

cherokee-admin should show information when cherokee refuses to restart,
that would help the user to realize what went wrong (in the case of a
regex it could be a problem hard to beat).

I don't know if this is a RFE, but it looks like a bug for me.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 11, 2010, 3:43 PM

Post #2 of 9 (638 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #1 on issue 732 by skarcha: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

Here is a patch that do not exactly fixes this bug, but can deal with
invalid regular
expressions, so it helps to maintain the sanity of the configuration.

Comments?


Attachments:
admin_regex_check.patch 3.2 KB

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 12:20 AM

Post #3 of 9 (630 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Updates:
Status: Started
Owner: skarcha
Labels: Type-Defect Component-Admin OpSys-All

Comment #2 on issue 732 by alobbs: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

Nice approach! ✚1 :-)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 1:49 AM

Post #4 of 9 (630 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #3 on issue 732 by useboxnet: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

I can't test the patch right now, but seems a good idea (so python regex are
compatible with the internal PCRE of cherokee, I dind't know it).

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 2:05 AM

Post #5 of 9 (633 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #4 on issue 732 by alobbs: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

@useboxnet That's an excellent point. As a matter of fact, Python regexs
and PCRE
regexs are different.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 2:18 AM

Post #6 of 9 (636 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #5 on issue 732 by skarcha: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

Well, it's not 100% compatible, but it cover a high number of cases. If
anyone find a
*real* case where it doesn't work, then maybe it worth to do it 100%
compatible.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 3:21 AM

Post #7 of 9 (638 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #6 on issue 732 by useboxnet: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

According wikipedia, python regex is a derivative of perl regex, being PCRE
compatible with perl itself... it may work :)

I would prefer that cherokee-admin was aware of the problem when cherokee
can
restart, because it would cover other cases.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

Feb 12, 2010, 8:16 AM

Post #8 of 9 (631 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Comment #7 on issue 732 by alobbs: cherokee-admin doesn't notice why
cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

I've just come up with another (kinda hacky) solution:

==========
from ctypes import *
try:
lib = CDLL('libpcre.dylib')
except OSError:
lib = CDLL('libpcre.so')

pcre_compile = lib.pcre_compile
pcre_compile.restype = c_void_p
pcre_compile.argtypes = [c_char_p, c_int, c_char_p, c_char_p, c_char_p]

error_s = ""
error_n = ""

for regex in ["^example$", "*."]:
re = lib.pcre_compile (regex, 0, error_s, error_n, None)
print "% 10s - %s" %(regex, ('FAIL','OK')[bool(re)])
==========


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev


cherokee at googlecode

May 9, 2010, 12:30 PM

Post #9 of 9 (426 views)
Permalink
Re: Issue 732 in cherokee: cherokee-admin doesn't notice why cherokee failed to gracefully restart [In reply to]

Updates:
Status: Duplicate
Mergedinto: 811

Comment #8 on issue 732 by ste...@konink.de: cherokee-admin doesn't notice
why cherokee failed to gracefully restart
http://code.google.com/p/cherokee/issues/detail?id=732

Also an admin validator issue.

_______________________________________________
Cherokee-dev mailing list
Cherokee-dev [at] lists
http://lists.octality.com/listinfo/cherokee-dev

Cherokee dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.