Improve usability (error reporting) in the init script of the frontend and factory
Working with a user I realized that the messages form the startup script could be improved.
1. when start is invoked without invoking reconfig first it is failing and the startup.log reports that /var/lib/gwms-frontend/vofrontend/frontend.descript is missing.
I'd suggest to check for the file in the start section and if missing
- print message
- return bad configuraton exit code
2. When the frontend.xml file is malformed the reconfig prints the python stack trace and fails
The message has something like: glideinwms.lib.xmlParse.CorruptXML: XML corrupt in file /tmp/tmpTh0ZMs: not well-formed (invalid token): line 13, column 234
but could be more clear
I'd suggest to:
- add a message telling that the config file is malformed and suggesting to run xmllint on it
I saw this in the frontend but would be useful also for the factory.