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

Mailing List Archive: Apache: Dev

httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)

 

 

First page Previous page 1 2 Next page Last page  View All Apache dev RSS feed   Index | Next | Previous | View Threaded


Zisis.Lianas at consol

Mar 5, 2012, 7:46 AM

Post #1 of 30 (4297 views)
Permalink
httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)

Hi,

I think there is an issue in mod_slotmem_shm / mod_proxy_balancer
with httpd 2.4.x when building and installing as root, but trying
to run httpd as standard unix-user.

Scenario:
my httpd is installed as 'root' in /root/httpd-2.4.1/, permissions
root:root/0755. When I create a 'user' httpd.conf and load slotmem_shm_module,
proxy_module, proxy_http_module and proxy_balancer_module and do some
balancer configuration, the httpd doesn't come up. Error log (trace8):
[Mon Mar 05 11:36:40.739013 2012] [proxy_balancer:debug] [pid 27793:tid
140642808817440] mod_proxy_balancer.c(751): AH01178: Doing balancers create: 544, 1 (6)
[Mon Mar 05 11:36:40.739054 2012] [proxy_balancer:emerg] [pid 27793:tid
140642808817440] (13)Permission denied: AH01179: balancer slotmem_create failed
[Mon Mar 05 11:36:40.739080 2012] [:emerg] [pid 27793:tid
140642808817440] AH00020: Configuration Failed, exiting


In strace you can see that httpd is trying to create mutex(?) files in
installation root directory, which belongs to user 'root' and is not
writeable for other users:
open("/root/httpd-2.4.1/s29df2056", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)


I tried to change the mutex location with the mutex directive and
"proxy-balancer-shm", but that doesn't work:
Mutex file:/tmp/ proxy-balancer-shm
Syntax seems to be OK, but this configuration item is ignored completely.


config extraction:
ServerRoot "/root/httpd-2.4.1"

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so

Mutex file:/tmp/ proxy-balancer-shm

<Proxy balancer://default>
BalancerMember http://appserver1.localhost:3001 route=0
BalancerMember http://appserver2.localhost:3001 route=1
ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
</Proxy>

ProxyPassMatch /servlet/ balancer://default/
ProxyPassReverse / balancer://default/



My quick hack to get my apache instance started:
--- httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
+++ httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
@@ -269,7 +269,10 @@
}
if (name) {
if (name[0] != '/') {
- fname = ap_server_root_relative(pool, name);
+ char file_name[100];
+ strcpy(file_name, "/tmp/");
+ strcat(file_name, name);
+ fname = file_name;
}
else {
fname = name;


I think it would make sense to check why the mutex configuration of
proxy-balancer-shm is ignored.



Best regards,
Zisis


ruediger.pluem at vodafone

Mar 5, 2012, 8:16 AM

Post #2 of 30 (4162 views)
Permalink
RE: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

The files that you see in strace are not mutex files. Hence the mutex directive cannot
work here. The correct fix would be IMHO another directive (either for mod_proxy or better
for mod_proxy_balancer) to allow defining a directory where these shared memory
files should be created.

Regards

Rüdiger

> -----Original Message-----
> From: Zisis Lianas > Sent: Montag, 5. März 2012 16:47
> To: dev [at] httpd
> Subject: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)
>
> Hi,
>
> I think there is an issue in mod_slotmem_shm / mod_proxy_balancer
> with httpd 2.4.x when building and installing as root, but trying
> to run httpd as standard unix-user.
>
> Scenario:
> my httpd is installed as 'root' in /root/httpd-2.4.1/, permissions
> root:root/0755. When I create a 'user' httpd.conf and load
> slotmem_shm_module,
> proxy_module, proxy_http_module and proxy_balancer_module and do some
> balancer configuration, the httpd doesn't come up. Error log (trace8):
> [Mon Mar 05 11:36:40.739013 2012] [proxy_balancer:debug] [pid 27793:tid
> 140642808817440] mod_proxy_balancer.c(751): AH01178: Doing balancers
> create: 544, 1 (6)
> [Mon Mar 05 11:36:40.739054 2012] [proxy_balancer:emerg] [pid 27793:tid
> 140642808817440] (13)Permission denied: AH01179: balancer
> slotmem_create failed
> [Mon Mar 05 11:36:40.739080 2012] [:emerg] [pid 27793:tid
> 140642808817440] AH00020: Configuration Failed, exiting
>
>
> In strace you can see that httpd is trying to create mutex(?) files in
> installation root directory, which belongs to user 'root' and is not
> writeable for other users:
> open("/root/httpd-2.4.1/s29df2056", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No
> such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CLOEXEC) = -1 ENOENT (No
> such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC,
> 0666) = -1 EACCES (Permission denied)
>
>
> I tried to change the mutex location with the mutex directive and
> "proxy-balancer-shm", but that doesn't work:
> Mutex file:/tmp/ proxy-balancer-shm
> Syntax seems to be OK, but this configuration item is ignored
> completely.
>
>
> config extraction:
> ServerRoot "/root/httpd-2.4.1"
>
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
> LoadModule lbmethod_byrequests_module
> modules/mod_lbmethod_byrequests.so
>
> Mutex file:/tmp/ proxy-balancer-shm
>
> <Proxy balancer://default>
> BalancerMember http://appserver1.localhost:3001 route=0
> BalancerMember http://appserver2.localhost:3001 route=1
> ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
> </Proxy>
>
> ProxyPassMatch /servlet/ balancer://default/
> ProxyPassReverse / balancer://default/
>
>
>
> My quick hack to get my apache instance started:
> --- httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> +++ httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> @@ -269,7 +269,10 @@
> }
> if (name) {
> if (name[0] != '/') {
> - fname = ap_server_root_relative(pool, name);
> + char file_name[100];
> + strcpy(file_name, "/tmp/");
> + strcat(file_name, name);
> + fname = file_name;
> }
> else {
> fname = name;
>
>
> I think it would make sense to check why the mutex configuration of
> proxy-balancer-shm is ignored.
>
>
>
> Best regards,
> Zisis


jim at apache

Mar 5, 2012, 10:15 AM

Post #3 of 30 (4157 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

What system is this... I'm assuming that your shm impl does an
actual file connection for the shm instance...

On Mar 5, 2012, at 10:46 AM, Zisis Lianas wrote:

> Hi,
>
> I think there is an issue in mod_slotmem_shm / mod_proxy_balancer
> with httpd 2.4.x when building and installing as root, but trying
> to run httpd as standard unix-user.
>
> Scenario:
> my httpd is installed as 'root' in /root/httpd-2.4.1/, permissions
> root:root/0755. When I create a 'user' httpd.conf and load slotmem_shm_module,
> proxy_module, proxy_http_module and proxy_balancer_module and do some
> balancer configuration, the httpd doesn't come up. Error log (trace8):
> [Mon Mar 05 11:36:40.739013 2012] [proxy_balancer:debug] [pid 27793:tid
> 140642808817440] mod_proxy_balancer.c(751): AH01178: Doing balancers create: 544, 1 (6)
> [Mon Mar 05 11:36:40.739054 2012] [proxy_balancer:emerg] [pid 27793:tid
> 140642808817440] (13)Permission denied: AH01179: balancer slotmem_create failed
> [Mon Mar 05 11:36:40.739080 2012] [:emerg] [pid 27793:tid
> 140642808817440] AH00020: Configuration Failed, exiting
>
>
> In strace you can see that httpd is trying to create mutex(?) files in
> installation root directory, which belongs to user 'root' and is not
> writeable for other users:
> open("/root/httpd-2.4.1/s29df2056", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)
>
>
> I tried to change the mutex location with the mutex directive and
> "proxy-balancer-shm", but that doesn't work:
> Mutex file:/tmp/ proxy-balancer-shm
> Syntax seems to be OK, but this configuration item is ignored completely.
>
>
> config extraction:
> ServerRoot "/root/httpd-2.4.1"
>
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
> LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
>
> Mutex file:/tmp/ proxy-balancer-shm
>
> <Proxy balancer://default>
> BalancerMember http://appserver1.localhost:3001 route=0
> BalancerMember http://appserver2.localhost:3001 route=1
> ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
> </Proxy>
>
> ProxyPassMatch /servlet/ balancer://default/
> ProxyPassReverse / balancer://default/
>
>
>
> My quick hack to get my apache instance started:
> --- httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> +++ httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> @@ -269,7 +269,10 @@
> }
> if (name) {
> if (name[0] != '/') {
> - fname = ap_server_root_relative(pool, name);
> + char file_name[100];
> + strcpy(file_name, "/tmp/");
> + strcat(file_name, name);
> + fname = file_name;
> }
> else {
> fname = name;
>
>
> I think it would make sense to check why the mutex configuration of
> proxy-balancer-shm is ignored.
>
>
>
> Best regards,
> Zisis
>


Zisis.Lianas at consol

Mar 5, 2012, 10:53 AM

Post #4 of 30 (4155 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

I can reproduce this on SuSE Linux Enterprise 11sp1 (x86_64,
2.6.32.12-0.7-xen) and Ubuntu 11.04 (x86_64, 2.6.38.x).



----- Ursprüngliche Mail -----
Von: "Jim Jagielski" <jim [at] apache>
An: dev [at] httpd
Gesendet: Montag, 5. März 2012 19:15:03
Betreff: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)

What system is this... I'm assuming that your shm impl does an
actual file connection for the shm instance...

On Mar 5, 2012, at 10:46 AM, Zisis Lianas wrote:

> Hi,
>
> I think there is an issue in mod_slotmem_shm / mod_proxy_balancer
> with httpd 2.4.x when building and installing as root, but trying
> to run httpd as standard unix-user.
>
> Scenario:
> my httpd is installed as 'root' in /root/httpd-2.4.1/, permissions
> root:root/0755. When I create a 'user' httpd.conf and load slotmem_shm_module,
> proxy_module, proxy_http_module and proxy_balancer_module and do some
> balancer configuration, the httpd doesn't come up. Error log (trace8):
> [Mon Mar 05 11:36:40.739013 2012] [proxy_balancer:debug] [pid 27793:tid
> 140642808817440] mod_proxy_balancer.c(751): AH01178: Doing balancers create: 544, 1 (6)
> [Mon Mar 05 11:36:40.739054 2012] [proxy_balancer:emerg] [pid 27793:tid
> 140642808817440] (13)Permission denied: AH01179: balancer slotmem_create failed
> [Mon Mar 05 11:36:40.739080 2012] [:emerg] [pid 27793:tid
> 140642808817440] AH00020: Configuration Failed, exiting
>
>
> In strace you can see that httpd is trying to create mutex(?) files in
> installation root directory, which belongs to user 'root' and is not
> writeable for other users:
> open("/root/httpd-2.4.1/s29df2056", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)
>
>
> I tried to change the mutex location with the mutex directive and
> "proxy-balancer-shm", but that doesn't work:
> Mutex file:/tmp/ proxy-balancer-shm
> Syntax seems to be OK, but this configuration item is ignored completely.
>
>
> config extraction:
> ServerRoot "/root/httpd-2.4.1"
>
> LoadModule proxy_module modules/mod_proxy.so
> LoadModule proxy_http_module modules/mod_proxy_http.so
> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
> LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
> LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
>
> Mutex file:/tmp/ proxy-balancer-shm
>
> <Proxy balancer://default>
> BalancerMember http://appserver1.localhost:3001 route=0
> BalancerMember http://appserver2.localhost:3001 route=1
> ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
> </Proxy>
>
> ProxyPassMatch /servlet/ balancer://default/
> ProxyPassReverse / balancer://default/
>
>
>
> My quick hack to get my apache instance started:
> --- httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> +++ httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
> @@ -269,7 +269,10 @@
> }
> if (name) {
> if (name[0] != '/') {
> - fname = ap_server_root_relative(pool, name);
> + char file_name[100];
> + strcpy(file_name, "/tmp/");
> + strcat(file_name, name);
> + fname = file_name;
> }
> else {
> fname = name;
>
>
> I think it would make sense to check why the mutex configuration of
> proxy-balancer-shm is ignored.
>
>
>
> Best regards,
> Zisis
>


jblond at gmail

Mar 6, 2012, 2:03 AM

Post #5 of 30 (4149 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Windows this happens, too when not running as Adminstrator. Running
the same config as Administrator it works smoothly.

[Tue Mar 06 09:53:59.734436 2012] [proxy_balancer:emerg] [pid 7064:tid
356] (OS 5)Access forbidden : AH01179: balancer slotmem_create failed
[Tue Mar 06 09:53:59.735436 2012] [:emerg] [pid 7064:tid 356] AH00020:
Configuration Failed, exiting


Cheers
Mario


P.S.: No TOFU please ;-)


jim at jaguNET

Mar 6, 2012, 4:56 AM

Post #6 of 30 (4145 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

OK... What I'll do is add a directive which provides a
"default" location for slotmem file...

On Mar 5, 2012, at 1:53 PM, Zisis Lianas wrote:

> I can reproduce this on SuSE Linux Enterprise 11sp1 (x86_64,
> 2.6.32.12-0.7-xen) and Ubuntu 11.04 (x86_64, 2.6.38.x).
>
>
>
> ----- Ursprngliche Mail -----
> Von: "Jim Jagielski" <jim [at] apache>
> An: dev [at] httpd
> Gesendet: Montag, 5. Mrz 2012 19:15:03
> Betreff: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)
>
> What system is this... I'm assuming that your shm impl does an
> actual file connection for the shm instance...
>
> On Mar 5, 2012, at 10:46 AM, Zisis Lianas wrote:
>
>> Hi,
>>
>> I think there is an issue in mod_slotmem_shm / mod_proxy_balancer
>> with httpd 2.4.x when building and installing as root, but trying
>> to run httpd as standard unix-user.
>>
>> Scenario:
>> my httpd is installed as 'root' in /root/httpd-2.4.1/, permissions
>> root:root/0755. When I create a 'user' httpd.conf and load slotmem_shm_module,
>> proxy_module, proxy_http_module and proxy_balancer_module and do some
>> balancer configuration, the httpd doesn't come up. Error log (trace8):
>> [Mon Mar 05 11:36:40.739013 2012] [proxy_balancer:debug] [pid 27793:tid
>> 140642808817440] mod_proxy_balancer.c(751): AH01178: Doing balancers create: 544, 1 (6)
>> [Mon Mar 05 11:36:40.739054 2012] [proxy_balancer:emerg] [pid 27793:tid
>> 140642808817440] (13)Permission denied: AH01179: balancer slotmem_create failed
>> [Mon Mar 05 11:36:40.739080 2012] [:emerg] [pid 27793:tid
>> 140642808817440] AH00020: Configuration Failed, exiting
>>
>>
>> In strace you can see that httpd is trying to create mutex(?) files in
>> installation root directory, which belongs to user 'root' and is not
>> writeable for other users:
>> open("/root/httpd-2.4.1/s29df2056", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
>> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
>> open("/root/httpd-2.4.1/s29df2056", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)
>>
>>
>> I tried to change the mutex location with the mutex directive and
>> "proxy-balancer-shm", but that doesn't work:
>> Mutex file:/tmp/ proxy-balancer-shm
>> Syntax seems to be OK, but this configuration item is ignored completely.
>>
>>
>> config extraction:
>> ServerRoot "/root/httpd-2.4.1"
>>
>> LoadModule proxy_module modules/mod_proxy.so
>> LoadModule proxy_http_module modules/mod_proxy_http.so
>> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
>> LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
>> LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so
>>
>> Mutex file:/tmp/ proxy-balancer-shm
>>
>> <Proxy balancer://default>
>> BalancerMember http://appserver1.localhost:3001 route=0
>> BalancerMember http://appserver2.localhost:3001 route=1
>> ProxySet lbmethod=byrequests stickysession=JSESSIONID|jsessionid
>> </Proxy>
>>
>> ProxyPassMatch /servlet/ balancer://default/
>> ProxyPassReverse / balancer://default/
>>
>>
>>
>> My quick hack to get my apache instance started:
>> --- httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
>> +++ httpd-2.4.1/modules/slotmem/mod_slotmem_shm.c
>> @@ -269,7 +269,10 @@
>> }
>> if (name) {
>> if (name[0] != '/') {
>> - fname = ap_server_root_relative(pool, name);
>> + char file_name[100];
>> + strcpy(file_name, "/tmp/");
>> + strcat(file_name, name);
>> + fname = file_name;
>> }
>> else {
>> fname = name;
>>
>>
>> I think it would make sense to check why the mutex configuration of
>> proxy-balancer-shm is ignored.
>>
>>
>>
>> Best regards,
>> Zisis
>>
>


trawick at gmail

Mar 6, 2012, 5:36 AM

Post #7 of 30 (4139 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
> OK... What I'll do is add a directive which provides a
> "default" location for slotmem file...

Uhh, that seems as endless as per-mutex directives.

Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
but a good start)
Directive to specify runtime directory (API returns serverroot +
DEFAULT_REL_RUNTIMEDIR if not configured).
Directive like Mutex but for shmem?


ruediger.pluem at vodafone

Mar 6, 2012, 5:38 AM

Post #8 of 30 (4152 views)
Permalink
RE: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

Sounds reasonable.

> -----Original Message-----
> From: Jeff Trawick [mailto:trawick [at] gmail]
> Sent: Dienstag, 6. Mrz 2012 14:37
> To: dev [at] httpd
> Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer
> (AH01179)
>
> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
> > OK... What I'll do is add a directive which provides a
> > "default" location for slotmem file...
>
> Uhh, that seems as endless as per-mutex directives.
>
> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
> but a good start)
> Directive to specify runtime directory (API returns serverroot +
> DEFAULT_REL_RUNTIMEDIR if not configured).
> Directive like Mutex but for shmem?


trawick at gmail

Mar 6, 2012, 6:53 AM

Post #9 of 30 (4142 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Tue, Mar 6, 2012 at 8:38 AM, Plm, Rdiger, VF-Group
<ruediger.pluem [at] vodafone> wrote:
> Sounds reasonable.

BTW, I started sketching out a RuntimeDir directive and
ap_runtime_dir_relative() API. (i.e., I threw some code together but
I don't have time this a.m. to test it ;) ).

If something like that is considered the basis of an appropriate
resolution to this particular problem, I'll proceed in the short term.
Otherwise, I may wait for a rainy day.


>
>> -----Original Message-----
>> From: Jeff Trawick [mailto:trawick [at] gmail]
>> Sent: Dienstag, 6. Mrz 2012 14:37
>> To: dev [at] httpd
>> Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer
>> (AH01179)
>>
>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>> > OK... What I'll do is add a directive which provides a
>> > "default" location for slotmem file...
>>
>> Uhh, that seems as endless as per-mutex directives.
>>
>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>> but a good start)
>> Directive to specify runtime directory (API returns serverroot +
>> DEFAULT_REL_RUNTIMEDIR if not configured).
>> Directive like Mutex but for shmem?



--
Born in Roswell... married an alien...


jim at jaguNET

Mar 6, 2012, 7:33 AM

Post #10 of 30 (4134 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c

On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:

> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>> OK... What I'll do is add a directive which provides a
>> "default" location for slotmem file...
>
> Uhh, that seems as endless as per-mutex directives.
>
> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
> but a good start)
> Directive to specify runtime directory (API returns serverroot +
> DEFAULT_REL_RUNTIMEDIR if not configured).
> Directive like Mutex but for shmem?
>


trawick at gmail

Mar 6, 2012, 7:39 AM

Post #11 of 30 (4143 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Tue, Mar 6, 2012 at 10:33 AM, Jim Jagielski <jim [at] jagunet> wrote:
> Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c

On behalf of anyone else reading this thread, here's the idiom from
mod_socache_dbm.c:

#define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
...
const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
NULL);

ctx->data_file = ap_server_root_relative(p, path);


>
> On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:
>
>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>> OK... What I'll do is add a directive which provides a
>>> "default" location for slotmem file...
>>
>> Uhh, that seems as endless as per-mutex directives.
>>
>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>> but a good start)
>> Directive to specify runtime directory (API returns serverroot +
>> DEFAULT_REL_RUNTIMEDIR if not configured).
>> Directive like Mutex but for shmem?
>>
>



--
Born in Roswell... married an alien...


jim at jaguNET

Mar 6, 2012, 8:21 AM

Post #12 of 30 (4130 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

http://svn.apache.org/viewvc?rev=1297560&view=rev

On Mar 6, 2012, at 10:39 AM, Jeff Trawick wrote:

> On Tue, Mar 6, 2012 at 10:33 AM, Jim Jagielski <jim [at] jagunet> wrote:
>> Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c
>
> On behalf of anyone else reading this thread, here's the idiom from
> mod_socache_dbm.c:
>
> #define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
> ...
> const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
> NULL);
>
> ctx->data_file = ap_server_root_relative(p, path);
>
>
>>
>> On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:
>>
>>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>>> OK... What I'll do is add a directive which provides a
>>>> "default" location for slotmem file...
>>>
>>> Uhh, that seems as endless as per-mutex directives.
>>>
>>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>>> but a good start)
>>> Directive to specify runtime directory (API returns serverroot +
>>> DEFAULT_REL_RUNTIMEDIR if not configured).
>>> Directive like Mutex but for shmem?
>>>
>>
>
>
>
> --
> Born in Roswell... married an alien...
>


Zisis.Lianas at consol

Mar 6, 2012, 9:35 AM

Post #13 of 30 (4139 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

Thanks Jim, that works fine for the default-rel-runtimedir configuration.
Slotmem file is created as <serverroot>/logs/slotmem-shm-sxxxxxxxx.shm.

Now if also the slotmem-file-target-location directive gets available,
this thread is done for me.


Regards,
Zisis

----- Original Message -----
From: "Jim Jagielski" <jim [at] jaguNET>
To: dev [at] httpd
Sent: Tuesday, March 6, 2012 5:21:22 PM
Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)

http://svn.apache.org/viewvc?rev=1297560&view=rev

On Mar 6, 2012, at 10:39 AM, Jeff Trawick wrote:

> On Tue, Mar 6, 2012 at 10:33 AM, Jim Jagielski <jim [at] jagunet> wrote:
>> Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c
>
> On behalf of anyone else reading this thread, here's the idiom from
> mod_socache_dbm.c:
>
> #define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
> ...
> const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
> NULL);
>
> ctx->data_file = ap_server_root_relative(p, path);
>
>
>>
>> On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:
>>
>>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>>> OK... What I'll do is add a directive which provides a
>>>> "default" location for slotmem file...
>>>
>>> Uhh, that seems as endless as per-mutex directives.
>>>
>>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>>> but a good start)
>>> Directive to specify runtime directory (API returns serverroot +
>>> DEFAULT_REL_RUNTIMEDIR if not configured).
>>> Directive like Mutex but for shmem?
>>>
>>
>
>
>
> --
> Born in Roswell... married an alien...
>


jim at jaguNET

Mar 6, 2012, 10:26 AM

Post #14 of 30 (4132 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

My plan is 2 pronged... to see if r1297560 is enough and if
allowing a slotmem override is even needed (or wanted) ... ;)

On Mar 6, 2012, at 12:35 PM, Zisis Lianas wrote:

> Thanks Jim, that works fine for the default-rel-runtimedir configuration.
> Slotmem file is created as <serverroot>/logs/slotmem-shm-sxxxxxxxx.shm.
>
> Now if also the slotmem-file-target-location directive gets available,
> this thread is done for me.
>
>
> Regards,
> Zisis
>
> ----- Original Message -----
> From: "Jim Jagielski" <jim [at] jaguNET>
> To: dev [at] httpd
> Sent: Tuesday, March 6, 2012 5:21:22 PM
> Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)
>
> http://svn.apache.org/viewvc?rev=1297560&view=rev
>
> On Mar 6, 2012, at 10:39 AM, Jeff Trawick wrote:
>
>> On Tue, Mar 6, 2012 at 10:33 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>> Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c
>>
>> On behalf of anyone else reading this thread, here's the idiom from
>> mod_socache_dbm.c:
>>
>> #define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
>> ...
>> const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
>> NULL);
>>
>> ctx->data_file = ap_server_root_relative(p, path);
>>
>>
>>>
>>> On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:
>>>
>>>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>>>> OK... What I'll do is add a directive which provides a
>>>>> "default" location for slotmem file...
>>>>
>>>> Uhh, that seems as endless as per-mutex directives.
>>>>
>>>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>>>> but a good start)
>>>> Directive to specify runtime directory (API returns serverroot +
>>>> DEFAULT_REL_RUNTIMEDIR if not configured).
>>>> Directive like Mutex but for shmem?
>>>>
>>>
>>
>>
>>
>> --
>> Born in Roswell... married an alien...
>>
>


rainer.jung at kippdata

Mar 6, 2012, 4:32 PM

Post #15 of 30 (4125 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On 06.03.2012 15:53, Jeff Trawick wrote:
> On Tue, Mar 6, 2012 at 8:38 AM, Plm, Rdiger, VF-Group
> <ruediger.pluem [at] vodafone> wrote:
>> Sounds reasonable.
>
> BTW, I started sketching out a RuntimeDir directive and
> ap_runtime_dir_relative() API. (i.e., I threw some code together but
> I don't have time this a.m. to test it ;) ).
>
> If something like that is considered the basis of an appropriate
> resolution to this particular problem, I'll proceed in the short term.
> Otherwise, I may wait for a rainy day.

I like the idea even if the current problem will be fixed without. I
think the locations of all created or read file can be influenced by
configuration except for some implicit files in DEFAULT_REL_RUNTIMEDIR,
which is a build time setting. So being able to influence helps in post
build adoption of the layout.

I hope there's no boostapping problem in the sense of runtimedir needed
before config was parsed.

Have a rainy day ;)

Regards,

Rainer

>>> -----Original Message-----
>>> From: Jeff Trawick [mailto:trawick [at] gmail]
>>> Sent: Dienstag, 6. Mrz 2012 14:37
>>> To: dev [at] httpd
>>> Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer
>>> (AH01179)
>>>
>>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski<jim [at] jagunet> wrote:
>>>> OK... What I'll do is add a directive which provides a
>>>> "default" location for slotmem file...
>>>
>>> Uhh, that seems as endless as per-mutex directives.
>>>
>>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>>> but a good start)
>>> Directive to specify runtime directory (API returns serverroot +
>>> DEFAULT_REL_RUNTIMEDIR if not configured).
>>> Directive like Mutex but for shmem?


DRuggeri at primary

Mar 6, 2012, 5:01 PM

Post #16 of 30 (4123 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On 3/6/2012 6:32 PM, Rainer Jung wrote:
> I like the idea even if the current problem will be fixed without. I
> think the locations of all created or read file can be influenced by
> configuration except for some implicit files in
> DEFAULT_REL_RUNTIMEDIR, which is a build time setting. So being able
> to influence helps in post build adoption of the layout.

Yes, this is vital. I'm still trying to grok the intention of
DEFAULT_REL_RUNTIMEDIR, but if we are talking about a file used as a
mutex/shared file/etc, wouldn't NOT having such a directive or
configuration parameter cause contention between multi-instance
configurations where "httpd -c /path/to/conf1.conf" and "httpd -c
/path/to/conf2.conf" end up pointing to the same file even though they
share nothing else in common? Seems like some stepping-on-of-toes would
occur unless I'm missing something else obvious.

--
Daniel Ruggeri


rainer.jung at kippdata

Mar 6, 2012, 7:13 PM

Post #17 of 30 (4119 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On 07.03.2012 02:01, Daniel Ruggeri wrote:
> On 3/6/2012 6:32 PM, Rainer Jung wrote:
>> I like the idea even if the current problem will be fixed without. I
>> think the locations of all created or read file can be influenced by
>> configuration except for some implicit files in
>> DEFAULT_REL_RUNTIMEDIR, which is a build time setting. So being able
>> to influence helps in post build adoption of the layout.
>
> Yes, this is vital. I'm still trying to grok the intention of
> DEFAULT_REL_RUNTIMEDIR, but if we are talking about a file used as a
> mutex/shared file/etc, wouldn't NOT having such a directive or
> configuration parameter cause contention between multi-instance
> configurations where "httpd -c /path/to/conf1.conf" and "httpd -c
> /path/to/conf2.conf" end up pointing to the same file even though they
> share nothing else in common? Seems like some stepping-on-of-toes would
> occur unless I'm missing something else obvious.

DEFAULT_REL_RUNTIMEDIR is defined by the layout file and usually it is
"logs", but could also be "run". It should be used relative to the
server root. So if you run two servers with different server root,
there's no clash of files in DEFAULT_REL_RUNTIMEDIR.

By searching the code I find the following things placed in
DEFAULT_REL_RUNTIMEDIR:

- the pid file. Can be moved using PidFile

- mutexes created by the new unified mutex handling. Should be
configurable using "Mutex"

- some gprof dump code in the prefork MPM. Not usually used and code
comments indicate, that the directory is also configurable (not checked)

- default data file paths for dbm and shmcb implementations of socache.
The path can be configured when choosing the socache impl type in the
config.

- default path of the CGI socket. Can be configured with ScriptSock

- data file for shm in slotmem_shm. Until now if a user gave a relative
path, the file was put underneath the server root using the relative
path. So if the path would have been a plain file name, the file would
have been created directly in the server root. Now after Jim's change a
relative path will be resolved relative to DEFAULT_REL_RUNTIMEDIR which
is usually meant to be writable. The path itself is confgurable.

So to sum up: all uses of DEFAULT_REL_RUNTIMEDIR I can see at the moment
are overwritable by configuration. A runtime configurable runtime
directory would not be a critical feature but make it easy to move all
these objects in a common directory not known at build time.

With respect to your question about multi-instances I'd say that
unfortunately the directive makes conflicts more likely. Without the
directive users are forced to use different server roots for their
instances, e.g. to keep log files separate. If they go into the business
of configuring the paths of all objects written individually, they can
do so for the above list as well.

Now having the directive, it could be that they always try to use
/var/run/apache or similar as the runtime directory for all instances
which will immediately lead to conflict. Of course all is a matter of
documentation first and then education (RTFM).

After reading the code IMHO the docs for socache and slotmem could be a
bit more explicit about the data files used. Since e.g. socache modules
are only provider implementations, their docs pages only say that they
don't have any configuration directives. Only in the uncommented example
of how to activate socache you can see a path name that's not explained.

Regards,

Rainer


Zisis.Lianas at consol

Mar 7, 2012, 1:39 AM

Post #18 of 30 (4131 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

Hi Jim,

for me/us it's needed, because we operate with multi-instancing.

e.g.:
Apache installation directory ("ServerRoot") is /opt/http-2.4.x/
(belonging to apache:apache). This installation only provides the
httpd binaries/modules.


Users on this server configure their own apache insances:

(user1:group1)
/var/www/project1/
\==> logs/ (error/access/pid/mutex)
\==> htdocs/ (content)
\==> config/ (httpd.conf, includes, etc.)

(user2:group2)
/var/www/project2/
\==> logs/
\==> htdocs/
\==> config/

(user3:group3)
/var/www/project3/
\==> logs/
\==> htdocs/
\==> config/


So a customizable slotmem-shm file would make sense in
this scenario.


Regards,
Zisis

----- Original Message -----
From: "Jim Jagielski" <jim [at] jaguNET>
To: dev [at] httpd
Sent: Tuesday, March 6, 2012 7:26:19 PM
Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)

My plan is 2 pronged... to see if r1297560 is enough and if
allowing a slotmem override is even needed (or wanted) ... ;)

On Mar 6, 2012, at 12:35 PM, Zisis Lianas wrote:

> Thanks Jim, that works fine for the default-rel-runtimedir configuration.
> Slotmem file is created as <serverroot>/logs/slotmem-shm-sxxxxxxxx.shm.
>
> Now if also the slotmem-file-target-location directive gets available,
> this thread is done for me.
>
>
> Regards,
> Zisis
>
> ----- Original Message -----
> From: "Jim Jagielski" <jim [at] jaguNET>
> To: dev [at] httpd
> Sent: Tuesday, March 6, 2012 5:21:22 PM
> Subject: Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179)
>
> http://svn.apache.org/viewvc?rev=1297560&view=rev
>
> On Mar 6, 2012, at 10:39 AM, Jeff Trawick wrote:
>
>> On Tue, Mar 6, 2012 at 10:33 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>> Yeah, that seems better, ala ./modules/cache/mod_socache_dbm.c
>>
>> On behalf of anyone else reading this thread, here's the idiom from
>> mod_socache_dbm.c:
>>
>> #define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-"
>> ...
>> const char *path = apr_pstrcat(p, DEFAULT_DBM_PREFIX, namespace,
>> NULL);
>>
>> ctx->data_file = ap_server_root_relative(p, path);
>>
>>
>>>
>>> On Mar 6, 2012, at 8:36 AM, Jeff Trawick wrote:
>>>
>>>> On Tue, Mar 6, 2012 at 7:56 AM, Jim Jagielski <jim [at] jagunet> wrote:
>>>>> OK... What I'll do is add a directive which provides a
>>>>> "default" location for slotmem file...
>>>>
>>>> Uhh, that seems as endless as per-mutex directives.
>>>>
>>>> Is slotmem not using DEFAULT_REL_RUNTIMEDIR already? (not perfect,
>>>> but a good start)
>>>> Directive to specify runtime directory (API returns serverroot +
>>>> DEFAULT_REL_RUNTIMEDIR if not configured).
>>>> Directive like Mutex but for shmem?
>>>>
>>>
>>
>>
>>
>> --
>> Born in Roswell... married an alien...
>>
>


i.galic at brainsware

Mar 7, 2012, 2:17 AM

Post #19 of 30 (4128 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

[snip]
> So to sum up: all uses of DEFAULT_REL_RUNTIMEDIR I can see at the
> moment
> are overwritable by configuration. A runtime configurable runtime
> directory would not be a critical feature but make it easy to move
> all
> these objects in a common directory not known at build time.
[snip]

This is such a common use-case that it would make a lot of sense
to provide such a directive.

See next mail in this thread for a reference.

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


tevans.uk at googlemail

Mar 7, 2012, 2:18 AM

Post #20 of 30 (4119 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Wed, Mar 7, 2012 at 9:39 AM, Zisis Lianas <Zisis.Lianas [at] consol> wrote:
> Hi Jim,
>
> for me/us it's needed, because we operate with multi-instancing.
>
> e.g.:
> Apache installation directory ("ServerRoot") is /opt/http-2.4.x/
> (belonging to apache:apache). This installation only provides the
> httpd binaries/modules.
>

ServerRoot does not have to be the directory above {bin,libexec,sbin}.
It should be the directory above {conf,logs}.

When running in this scenario, you do have to have absolute paths to
your apache modules, eg:

LoadModule status_module /usr/local/libexec/apache22/mod_status.so

rather than:

LoadModule status_module libexec/apache22/mod_status.so

The disadvantage of doing it this way is that you have to specify full
paths to all your modules. The disadvantage of doing it your way is
that your ServerRoot is not your ServerRoot...

Cheers

Tom


i.galic at brainsware

Mar 7, 2012, 2:50 AM

Post #21 of 30 (4123 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

----- Original Message -----
> On Wed, Mar 7, 2012 at 9:39 AM, Zisis Lianas <Zisis.Lianas [at] consol>
> wrote:
> > Hi Jim,
> >
> > for me/us it's needed, because we operate with multi-instancing.
> >
> > e.g.:
> > Apache installation directory ("ServerRoot") is /opt/http-2.4.x/
> > (belonging to apache:apache). This installation only provides the
> > httpd binaries/modules.
> >
>
> ServerRoot does not have to be the directory above
> {bin,libexec,sbin}.
> It should be the directory above {conf,logs}.
>
> When running in this scenario, you do have to have absolute paths to
> your apache modules, eg:
>
> LoadModule status_module /usr/local/libexec/apache22/mod_status.so
>
> rather than:
>
> LoadModule status_module libexec/apache22/mod_status.so
>
> The disadvantage of doing it this way is that you have to specify
> full
> paths to all your modules. The disadvantage of doing it your way is
> that your ServerRoot is not your ServerRoot...

I think this is exactly the point.
You wouldn't want to give up this kind of convenience.
Ideally, you'd like to keep both.

The only reason I can think of providing different versions of
binaries would be to provide a different suexec. But overall it
sounds like overkill - same with modules.

> Cheers
>
> Tom

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


jim at jaguNET

Mar 7, 2012, 3:37 AM

Post #22 of 30 (4116 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

I'll work on it... I already have a version for slotmem, but
a generic solution it best, I agree. But what do we call it?
DefaultDir?

On Mar 7, 2012, at 5:17 AM, Igor Galić wrote:

>
> [snip]
>> So to sum up: all uses of DEFAULT_REL_RUNTIMEDIR I can see at the
>> moment
>> are overwritable by configuration. A runtime configurable runtime
>> directory would not be a critical feature but make it easy to move
>> all
>> these objects in a common directory not known at build time.
> [snip]
>
> This is such a common use-case that it would make a lot of sense
> to provide such a directive.
>
> See next mail in this thread for a reference.
>
> i
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: i.galic [at] brainsware
> URL: http://brainsware.org/
> GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
>


jim at jaguNET

Mar 7, 2012, 3:43 AM

Post #23 of 30 (4125 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

I agree that ServerRoot should not be touched or changed, but
it begs the question how do we differentiate between what
is ServerRoot relative and what is DefaultRuntimeDir ?

I guess docs that mention what modules use DefaultRuntimeDir is
sufficient? Or maybe we just call it something like SafeWriteDir
that says we know that httpd can write to this dir... Or to
make it clear that we're talking transitory files, something like
TempDir or ScratchSpace ??

On Mar 7, 2012, at 5:50 AM, Igor Galić wrote:

>
>
> ----- Original Message -----
>> On Wed, Mar 7, 2012 at 9:39 AM, Zisis Lianas <Zisis.Lianas [at] consol>
>> wrote:
>>> Hi Jim,
>>>
>>> for me/us it's needed, because we operate with multi-instancing.
>>>
>>> e.g.:
>>> Apache installation directory ("ServerRoot") is /opt/http-2.4.x/
>>> (belonging to apache:apache). This installation only provides the
>>> httpd binaries/modules.
>>>
>>
>> ServerRoot does not have to be the directory above
>> {bin,libexec,sbin}.
>> It should be the directory above {conf,logs}.
>>
>> When running in this scenario, you do have to have absolute paths to
>> your apache modules, eg:
>>
>> LoadModule status_module /usr/local/libexec/apache22/mod_status.so
>>
>> rather than:
>>
>> LoadModule status_module libexec/apache22/mod_status.so
>>
>> The disadvantage of doing it this way is that you have to specify
>> full
>> paths to all your modules. The disadvantage of doing it your way is
>> that your ServerRoot is not your ServerRoot...
>
> I think this is exactly the point.
> You wouldn't want to give up this kind of convenience.
> Ideally, you'd like to keep both.
>
> The only reason I can think of providing different versions of
> binaries would be to provide a different suexec. But overall it
> sounds like overkill - same with modules.
>
>> Cheers
>>
>> Tom
>
> i
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: i.galic [at] brainsware
> URL: http://brainsware.org/
> GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE
>


i.galic at brainsware

Mar 7, 2012, 3:46 AM

Post #24 of 30 (4121 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

----- Original Message -----
> I agree that ServerRoot should not be touched or changed, but
> it begs the question how do we differentiate between what
> is ServerRoot relative and what is DefaultRuntimeDir ?
>
> I guess docs that mention what modules use DefaultRuntimeDir is
> sufficient? Or maybe we just call it something like SafeWriteDir
> that says we know that httpd can write to this dir... Or to
> make it clear that we're talking transitory files, something like
> TempDir or ScratchSpace ??

I knew this is going to be my favourite part of this discussion ;)

So far, DefaultRuntimeDir sounds most reasonable (to me)

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


trawick at gmail

Mar 7, 2012, 3:54 AM

Post #25 of 30 (4119 views)
Permalink
Re: httpd 2.4.1 and mod_slotmem_shm / mod_proxy_balancer (AH01179) [In reply to]

On Wed, Mar 7, 2012 at 6:37 AM, Jim Jagielski <jim [at] jagunet> wrote:
> I'll work on it... I already have a version for slotmem, but
> a generic solution it best, I agree. But what do we call it?
> DefaultDir?

As I mentioned yesterday, I have thrown together the code for the API
and directive and need to test it.


>
> On Mar 7, 2012, at 5:17 AM, Igor Galić wrote:
>
>>
>> [snip]
>>> So to sum up: all uses of DEFAULT_REL_RUNTIMEDIR I can see at the
>>> moment
>>> are overwritable by configuration. A runtime configurable runtime
>>> directory would not be a critical feature but make it easy to move
>>> all
>>> these objects in a common directory not known at build time.
>> [snip]
>>
>> This is such a common use-case that it would make a lot of sense
>> to provide such a directive.
>>
>> See next mail in this thread for a reference.
>>
>> i
>>
>> --
>> Igor Galić
>>
>> Tel: +43 (0) 664 886 22 883
>> Mail: i.galic [at] brainsware
>> URL: http://brainsware.org/
>> GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE
>>
>



--
Born in Roswell... married an alien...

First page Previous page 1 2 Next page Last page  View All Apache 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.