glideinWMS / glideinwms

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

match policy_file fails in 3.10.5 #378

Closed rynge closed 10 months ago

rynge commented 11 months ago

The OSPool FE had to be upgraded to 3.10.5 due to changes in the certs packages. As far as I know, the only change was the version upgrade. The upgrade made the frontend fail with:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/glideinwms/creation/lib/matchPolicy.py", line 84, in __init__
    f, path, desc = importlib.util.find_spec(self.name, self.searchPath)
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/sbin/reconfig_frontend", line 260, in <module>
    main(params, old_params, update_scripts, update_def_cfg)
  File "/sbin/reconfig_frontend", line 69, in main
    frontend_dicts_obj.populate()
  File "/usr/lib/python3.6/site-packages/glideinwms/creation/lib/cvWParamDict.py", line 732, in populate
    self.sub_dicts[sub_name].populate(promote_dicts, self.main_dicts.dicts, params)
  File "/usr/lib/python3.6/site-packages/glideinwms/creation/lib/cvWParamDict.py", line 586, in populate
    populate_common_descript(self.dicts["group_descript"], sub_params)  # MMDB 5345 , self.dicts['attrs'])
  File "/usr/lib/python3.6/site-packages/glideinwms/creation/lib/cvWParamDict.py", line 1070, in populate_common_descript
    policy_module = MatchPolicy(params.match.policy_file)
  File "/usr/lib/python3.6/site-packages/glideinwms/creation/lib/matchPolicy.py", line 89, in __init__
    raise MatchPolicyLoadError(file=file, search_path=self.searchPath)
glideinwms.creation.lib.matchPolicy.MatchPolicyLoadError: Failed to load policy from the file /opt/osg-flock/ospool.osg-htc.org/topology_match_policy.py in the search path ['/opt/osg-flock/ospool.osg-htc.org']

This comes from configuration of match policy_file:

 <match
             policy_file="/opt/osg-flock/ospool.osg-htc.org/topology_match_policy.py"
             match_expr="True"
             ...

The file exists and is readable:

# ls -l /opt/osg-flock/ospool.osg-htc.org/topology_match_policy.py
-rw-r--r-- 1 root root 6851 Dec 20 18:14 /opt/osg-flock/ospool.osg-htc.org/topology_match_policy.py

Info (please complete the following information): Stakeholders and components can be a comma separated list or on multiple lines. If you add a new stakeholder or component, not on the sample list, add it on a line by its own.

mambelli commented 10 months ago

Fixed by PR #380