Forum OpenACS Development: Re: Proposed corrections to OpenACS default nsopenssl configuration

Jim,

On my distribution the PATH that the user switched Aolserver is passed is that niether of root nor the user to which it is switched.

I am sure that there probably is a way to do this with the environment variables, but why bother fiddling with that when a config entry specifically configures the server? In any case, if you want to configure a server to a specific version of PostgreSQL (i.e. also running an old ACS 4.6.3 site), this provides an elegant mechanism for doing it.

This config declaration certainly used to be in the config file and has been in my own config.tcl for over ten years.

Also, adding it completes the param structure and results in symmetry! 😉 Perhaps it is my obsessive nature, but why leave something out that has potential benefits just because it can be left out?

Regards
Richard

Heya Richard
I am sure that there probably is a way to do this with the environment variables,

Yes, there is definitely a way to do it with env vars, and I posted an example script in this thread which sets the env vars appropriately, and calls nsd with the example parameters you posted. There is another one floating around called nsd-postgres that feeds parameters fed to it to the nsd.

but why bother fiddling with that when a config entry specifically configures the server?

Because in at least the config file you show for your personal config, it's a hard wiring that IMO shouldn't appear in the config file.

Also in many postgres (and oracle too) installations, the dynamic libraries are not in the usual system-wide places in all dists, so setting a second environment variable, namely LD_LIBRARY_PATH is sometimes necessary. In the case of a postgres compiled in the default place (/usr/local/pgsql), this -is- the case and so setting the variable -is- necessary.

And so, why not set both vars, and leave out having to specify the pg bin and lib dirs in the config file.

One more clarification, it's perfectly OK for you to have your config file do anything you want; I didn't mean to imply otherwise, what I meant was that the default config supplied by openacs should be free of having to do that.

Jim,

On my distribution I do have to set LD_LIBRARY_PATH in order to compile postgres (plus a few other nasty obscure little steps!). However, I run each Aolserver as a different user for each site for security reasons.

This would require that I set the two env vars for every username running nsd on the system instead of just for user postgres. Not a big ask, but extra configuration nonetheless.

On my setup I simply duplicate the config file and adjust the service specific details.

There is also the possibility that someone new to this would struggle with the environment variables whilst being able to fill in the gaps in the config.tcl.

I don't feel strongly either way, I am just feeding back the things I found as I updated by own config.tcl to match the latest default.

Certainly, anything we can do to remove obstacles to people getting it all running can only be good.

Thanks for the replies.

Regards
Richard