Bugs item #442600, was opened at 2001-07-18 15:13
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=442600&group_id=3152
Category: Configuration: Server
Group: aolserver3_3
Status: Closed
Resolution: Rejected
Priority: 5
Submitted By: Jerry Asher (jerryasher)
Assigned to: Nobody/Anonymous (nobody)
Summary: ns_info server is broken
Initial Comment:
in aolserver 3.3, at the time the config.tcl file is
evaluated, the value of [ns_info server] is "". It
has not been set to the server name yet.
----------------------------------------------------------------------
>Comment By: Jerry Asher (jerryasher)
Date: 2001-07-19 21:38
Message:
Logged In: YES
user_id=20647
Hi Pete,
I would be very happy with your suggestion, that is an
ns_info command that lets me know which server has been
requested. But I'm not sure I understand your comment,
from 3.0 to 3.2, I have had lots of code within the
config.tcl that has definitely required [ns_info server] to
be accurate, and it has been.
If guess what you are suggesting is that when AOLserver 4
is released, [ns_info server] would not be accurate within
the config.tcl since AOLserver 4 will support multiple
servers all within the same process. Is that it?
Anyway, I would very much like to see either [ns_info
server], or [ns_info requested_server] get implemented for
AOLserver 4. For AOLserver 3, which doesn't do in process
multiple virtual hosts, I'd say it's still broken. It
still appears to be a fix that didn't fix all that much,
the old behavior was reliable, accurate, and consistent,
and users have code that rely on it.
----------------------------------------------------------------------
Comment By: Peter M. Jansson (petej)
Date: 2001-07-19 21:14
Message:
Logged In: YES
user_id=20577
Count me among those who do not believe this is broken. In
versions of AOLserver which support virtual hosting, you
can't determine the server at config.tcl time, so the
parameter is meaningless. I think it might be more
productive to have a separate ns_info command to get the
server specified on the command line (ns_info
requested_server, perhaps?), and leave ns_info server alone.
For AOLserver 2.3.3, I had a lot of code that depends on
ns_info server being unreliable until virtual servers are
started up. I suspect there are others like me.
----------------------------------------------------------------------
Comment By: Jerry Asher (jerryasher)
Date: 2001-07-19 11:20
Message:
Logged In: YES
user_id=20647
Kriston,
Is there anyway we can convince you that it is a bug? Or
that even if it was a bug, it was a very useful bug?
If the user has specified the -s server flag, why not make
it available to the config.tcl environment?
I believe it to be an unfortunate side effect of the
changes in revision 1.22 http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/aolserver/aolserver/nsd/nsmain.c.diff?
r1=1.21&r2=1.22, when the initialization of the global
nsServer was moved lower in the process.
This change breaks the existing behavior from the other 3.x
releases and will cause many users to have to change and
create new config.tcl files.
Many of us have config.tcl files that contain the
initialization for ALL of our servers at once, and
different servers get different behaviors depending on
conditionalization based on [ns_info server]
so for example in the config.tcl we
set servername [ns_info server]
and then we can set up generic config sections applicable
to all servers
ns/server/${servername}/module/nslog
Or set up specific config sections applicable to only one
server
ns/server/master/module/nsvhr/maps
Gosh, I'm pretty sure we learned to do this based on the
example shown in the original nsd.tcl which contains very
similar lines such as what I've listed above.
>From what I can tell, the fix is pretty simple and won't
break anything, and has already been described in a patch
(421740) by Jamie.
Can you expand a bit on your point? It is clear that all
sorts of stuff cannot be defined until initialization is
over, but why not allow [ns_info server] name to be defined
if in fact the user has passed the -s server switch?
Thank you,
Jerry Asher
----------------------------------------------------------------------
Comment By: Kris Rehberg (kriston)
Date: 2001-07-19 07:37
Message:
Logged In: YES
user_id=16427
This is not a bug. Some data isn't available until after
server initialization. This is one of them.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=103152&aid=442600&group_id=3152