glideinWMS / glideinwms

The glideinWMS Project
http://tinyurl.com/glideinwms
Apache License 2.0
16 stars 45 forks source link

Fix location of submit_attr.cfg files #386

Closed mmascher closed 8 months ago

mmascher commented 8 months ago

Describe the bug Reconfiguire fails with new version 3.10.6 It seems there is a bug in the code and the factory is looking at the submit_attr.cfg file in the current working directory instead of the entry subdirectory.

Screenshots

[2024-01-15 15:45:44,475] WARNING: glideFactory:675: EntryGroup 0 STDERR: b'Traceback (most recent call last):\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryEntryGroup.py", line 743, in <module>\n    main(int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3]), sys.argv[4], sys.argv[5], sys.argv[6])\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryEntryGroup.py", line 687, in main\n    my_entries[entry] = glideFactoryEntry.Entry(entry, startup_dir, glideinDescript, frontendDescript)\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryEntry.py", line 57, in __init__\n    self.jobSubmitAttrs = glideFactoryConfig.JobSubmitAttrs(name)\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryConfig.py", line 299, in __init__\n    lambda s: s,\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryConfig.py", line 102, in __init__\n    ConfigFile.__init__(self, config_file, convert_function)\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryConfig.py", line 58, in __init__\n    self.load(config_file, convert_function)\n  File "/usr/lib/python3.6/site-packages/glideinwms/factory/glideFactoryConfig.py", line 62, in load\n    with open(fname) as fd:\nFileNotFoundError: [Errno 2] No such file or directory: \'submit_attrs.cfg\'\n'

Info (please complete the following information):

mmascher commented 8 months ago

I have already a fix for this, pushing it now

mambelli commented 8 months ago

This bug is closed as the error is misleading. There should be a submit_attrs.cfg in both the work-dir and all the entry subdirectories. The actual bug is #388, submit_attrs.cfg is not created in the work-dir and entries subdirectories.

Note that the problem is only for upgrades when there are no submit_attrs to put in the file. See #388 for more details.