Created attachment 444706 [details] Refuses to start pbs_server if $PBS_HOME/server_priv/serverdb is absent. Description of problem: The Torque init script for pbs-server auto-generates new Torque databases. This is dangerous in cases of /var/torque or other configured Torque database repositories which are temporarily offline. The generation of a new server configuration should be an *option*, not automatic. Version-Release number of selected component (if applicable): 2.3.10-1 How reproducible: Install torque-server package, run init scripts. Steps to Reproduce: 1. yum install torque-server 2. ls -lR /var/torque/server_priv/serverdb 3. /sbin/service torque-server start 4. ls -lR /var/torque/server_priv/serverdb Actual results: A new serverdb is created. Expected results: The init script should fail, with no server configured. Additional info: This is an old configuration issue. Tweaking the init script to add a "enable" option is easy, but in the meantime, my attached file notifies the user and exits, correctly.
I agree, I think it's better just to exit in this case where it does not exist. A lot safer. Will change it. Steve.
Hi, First I think changing it to make it safer is good but am confused under which circumstance it will currently cause problems? Current script contains PBS_HOME=/var/torque if [ -r $PBS_HOME/server_priv/serverdb ] then daemon $PBS_DAEMON else daemon $PBS_DAEMON -t create fi how does this overwrite the database if it already exists? Stev.e
Automatically creating the database if one does not exist is not an uncommon thing to do. The init script for MySQL does it, although the init script for postgres does not. I too can not see how the current version is dangerous... Any further comments Nico?
Yes, certainly. In my current working environment, /var/torque lives on a network share for failover use. If, for any reason, that network based share is unavailable, the secondary should not start at all lest it interfere with normal operations. This is a relatively safe way to detect such unconfigured states. Admittedly, my current share is /var/torque, so server_piv doesn't exist when the mounting is messed up, so the init fails with ugly messages. But I'd like that error message to be more meaningful. Torque and other clustering tools are more dangerous than MySQL, because they send server authorized tasks to other systems, even if it's only on localhost. It seems very appropriate to exert more caution before activating it. The fact that it's automatically installed with the init script turned off is good, but I think insufficient.
Okay, I'll exit with code 5 I think it is the file does not exist with some suggestion. Thanks for the clarification. Steve.
(In reply to comment #5) > Okay, I'll exit with code 5 I think it is the file does not exist with > some suggestion. Might be worth adding a "createdb" option in the init script, which is the way postgres-server does it...
Okay, I think we are there and create method has been added as well as not create with a start call. This will make F15 and I'll add to older with any new releases. I've requested the addition upstream http://www.clusterresources.com/bugzilla/show_bug.cgi?id=90 but it's definitely a matter of opinion if it should be added. Steve.