Project

General

Profile

Bug #13497

Index error in cWDictFile.py when parsing file entries

Added by Marco Mambelli over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
08/09/2016
Due date:
% Done:

0%

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

Description

This is happening in 3.2.15rc1-3 in code from 12705, checking for compatibility with older formats.
It is triggered when both period and prefix are missing from the file configuration.
It makes a reconfig fail (observed by Farrukh):

# service gwms-frontend reconfig
Using default Frontend config file: /etc/gwms-frontend/frontend.xml
Traceback (most recent call last):
 File "/usr/sbin/reconfig_frontend", line 206, in <module>
   main(params, old_params, update_scripts, update_def_cfg)
 File "/usr/sbin/reconfig_frontend", line 46, in main
   old_frontend_dicts_obj.load()
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWDictFile.py", line 1489, in load
   self.sub_dicts[sub_name].load()
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cvWDictFile.py", line 394, in load
   load_group_dicts(self.dicts,self.sub_name,self.summary_signature)
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cvWDictFile.py", line 161, in load_group_dicts
   load_common_dicts(group_dicts,group_dicts['description'])
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cvWDictFile.py", line 133, in load_common_dicts
   dicts['preentry_file_list'].load(fname=description_el.vals2['preentry_file_list'])
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWDictFile.py", line 197, in load
   self.load_from_fd(fd,erase_first,set_not_changed)
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWDictFile.py", line 224, in load_from_fd
   self.parse_val(line)
 File "/usr/lib/python2.6/site-packages/glideinwms/creation/lib/cWDictFile.py", line 784, in parse_val
   return self.add(arr[0], [arr[1], arr[2], 0, "GLIDEIN_PS_", arr[4], arr[5]])
IndexError: list index out of range
Reconfiguring the frontend                                 [FAILED]

History

#1 Updated by Marco Mambelli over 3 years ago

This bug is in a branch used in updating from older configurations of FileDictFile, specifically from versions missing both the period and the prefix, i.e. 3.2.10 or earlier (6 parameter per line instead of 8). Indexes are wrong.

In my update from 3.2.14.1-1 to 3.2.15-0.3.rc3 this bug was not triggered and both upgrade and reconfig were successful.

The fix is in v3/13497

#2 Updated by Marco Mambelli over 3 years ago

  • Status changed from New to Feedback
  • Assignee changed from Marco Mambelli to Parag Mhashilkar

#3 Updated by Parag Mhashilkar over 3 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Parag Mhashilkar to Marco Mambelli

Looks ok. Merged

#4 Updated by Marco Mambelli over 3 years ago

During the meeting Parag came with a plausible explanation on why the format of the file may be the one of version 3.2.10: the file list files are updated only if something changes, so if the files sent do not change the dict files remains the old ones.
This may be problematic in the long run if there are format changes.
I opened a ticket to address it [#13531].

#5 Updated by Parag Mhashilkar over 3 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF