Skip to content

Commit 83f8164

Browse files
committed
Pass all config to get_ce_attributes_str() - need the batch system configs as well
1 parent 7adceb1 commit 83f8164

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

osg_configure/configure_modules/infoservices.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, *args, **kwargs):
5454
self.ce_collector_required_rpms_installed = utilities.rpm_installed('htcondor-ce')
5555
self.htcondor_gateway_enabled = None
5656
self.authorization_method = None
57-
self.ce_attributes_config = None
57+
self.configuration = None
5858
self.ce_attributes_str = ""
5959

6060
self.log("InfoServicesConfiguration.__init__ completed")
@@ -109,10 +109,7 @@ def parse_configuration(self, configuration: ConfigParser):
109109

110110
self.htcondor_gateway_enabled = configuration.get('Gateway', 'htcondor_gateway_enabled', fallback=False)
111111

112-
self.ce_attributes_config = ConfigParser()
113-
for section in configuration.sections():
114-
if subcluster.is_subcluster_like(section) or section.lower() == "site information":
115-
self.ce_attributes_config[section] = configuration[section]
112+
self.configuration = configuration # save for later: the ce_attributes module reads the whole config.
116113

117114
if utilities.ce_installed() and not subcluster.check_config(configuration):
118115
self.log("On a CE but no valid 'Subcluster', 'Resource Entry', or 'Pilot' sections defined."
@@ -126,7 +123,7 @@ def parse_configuration(self, configuration: ConfigParser):
126123
# configure(), but at this point we don't have a way of knowing what
127124
# default_allowed_vos should be.
128125
if self.ce_collector_required_rpms_installed and self.htcondor_gateway_enabled and classad is not None:
129-
subcluster.resource_catalog_from_config(self.ce_attributes_config, default_allowed_vos=["*"])
126+
subcluster.resource_catalog_from_config(configuration, default_allowed_vos=["*"])
130127

131128
self.log('InfoServicesConfiguration.parse_configuration completed')
132129

@@ -155,7 +152,7 @@ def configure(self, attributes):
155152
"\nHTCondor version must be at least 8.2.0.", level=logging.WARNING)
156153
else:
157154
try:
158-
self.ce_attributes_str = ce_attributes.get_ce_attributes_str(self.ce_attributes_config)
155+
self.ce_attributes_str = ce_attributes.get_ce_attributes_str(self.configuration)
159156
except exceptions.SettingError as err:
160157
self.log("Error in info services configuration: %s" % err, level=logging.ERROR)
161158
return False

0 commit comments

Comments
 (0)