Project

General

Profile

Bug #5107

Issues running reconfig_factory and reconfig_frontend directly

Added by Parag Mhashilkar almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
RPM - Frontend/Factory
Target version:
Start date:
12/17/2013
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

Joe Boyd reported this issue (see below).

I also want to highlight on top of what Joe says. reconfig_frontend (and mostly reconfig_factory as well), rpm, installs these binaries in /usr/sbin and they are already in root's path. Accidentally running them has following issues

  • If no args are specified the throw exception on the screen as below
  • If required args are provided, they convolute the frontend's working/stage directory with the files owned by root that frontend cannot over write making the situation worse

I think we should atleast:

  • Prevent the commands to be run as root directly
  • Print useful messages if enough args are not provided
reconfig_frontend really should say you have to supply a file as an argument instead of just puking about a corrupt xml file.

joe

[root@gwmsfrontend2 group_main]# reconfig_frontend
Traceback (most recent call last):
 File "/usr/sbin/reconfig_frontend", line 155, in <module>
   params=cvWParams.VOFrontendParams(usage, WEB_BASE_DIR, args)
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWParams.py", line 179, in __init__
   self.load_file(self.cfg_name)
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWParams.py", line 227, in load_file
   self.data=xmlParse.xmlfile2dict(fname,use_ord_dict=True)
 File "/usr/lib/python2.6/site-packages/glideinwms/lib/xmlParse.py", line 86, in xmlfile2dict
   raise CorruptXML("XML corrupt in file %s: %s" % (fname, e))
glideinwms.lib.xmlParse.CorruptXML: XML corrupt in file /tmp/tmpWWPvST: not well-formed (invalid token): line 1, column 1

[root@gwmsfrontend2 group_main]# reconfig_frontend /etc/gwms-frontend/frontend.xml
...Saved the current config file into the working dir
...Saved the backup config file into the working dir
...Reconfigured frontend 'gwmsfrontend2-fnal-gov_OSG_gWMSFrontend'
...Active groups are:
    main
...Verifying rrd schema
WARNING: monitor/ directory does not exist, skipping rrd verification.
...Work files are in /var/lib/gwms-frontend/vofrontend

Related issues

Related to GlideinWMS - Bug #5351: manage-glidein crashing when command invocation failsClosed02/05/2014

History

#1 Updated by Parag Mhashilkar almost 6 years ago

I talked to Joe and asked him to run commands using service command but still we should handle this gracefully in glideinwms.

service gwms-frontend <start|stop|...> 

#2 Updated by Burt Holzman almost 6 years ago

  • Status changed from New to Feedback
  • Assignee set to Parag Mhashilkar
  • Priority changed from Normal to Low

Committed in c37acf3

#3 Updated by Parag Mhashilkar over 5 years ago

I made following commits 26ac470695a015765075b73b890a05482eaa7bf1 a77b7ff8e29e500cace7cd949961de2a0b8f6971 to avoid root user running these commands.

#4 Updated by Parag Mhashilkar over 5 years ago

  • Status changed from Feedback to Closed
  • Assignee changed from Parag Mhashilkar to Burt Holzman


Also available in: Atom PDF