2
2
for CE collector info services"""
3
3
4
4
import re
5
- import os
6
- try :
7
- import ConfigParser
8
- except ImportError :
9
- import configparser as ConfigParser
5
+ import configparser as ConfigParser
10
6
import subprocess
11
7
import logging
12
8
13
- from osg_configure .configure_modules .misc import MiscConfiguration
14
9
from osg_configure .modules import exceptions
15
10
from osg_configure .modules import utilities
16
11
from osg_configure .modules import configfile
@@ -67,7 +62,6 @@ def __init__(self, *args, **kwargs):
67
62
self .resource_catalog = None
68
63
self .authorization_method = None
69
64
self .subcluster_sections = None
70
- self .misc_module = MiscConfiguration (* args , ** kwargs )
71
65
72
66
self .log ("InfoServicesConfiguration.__init__ completed" )
73
67
@@ -119,8 +113,6 @@ def parse_configuration(self, configuration):
119
113
120
114
self .ce_collectors = self ._parse_ce_collectors (self .options ['ce_collectors' ].value )
121
115
122
- self .misc_module .parse_configuration (configuration )
123
-
124
116
def csg (section , option ):
125
117
return utilities .config_safe_get (configuration , section , option , None )
126
118
@@ -135,7 +127,6 @@ def csgbool(section, option):
135
127
136
128
self .htcondor_gateway_enabled = csgbool ('Gateway' , 'htcondor_gateway_enabled' )
137
129
138
- self .authorization_method = csg ('Misc Services' , 'authorization_method' )
139
130
self .subcluster_sections = ConfigParser .SafeConfigParser ()
140
131
141
132
for section in configuration .sections ():
@@ -156,7 +147,7 @@ def csgbool(section, option):
156
147
# configure(), but at this point we don't have a way of knowing what
157
148
# default_allowed_vos should be.
158
149
if self .ce_collector_required_rpms_installed and self .htcondor_gateway_enabled and classad is not None :
159
- subcluster .resource_catalog_from_config (self .subcluster_sections , default_allowed_vos = None )
150
+ subcluster .resource_catalog_from_config (self .subcluster_sections , default_allowed_vos = [ "*" ] )
160
151
161
152
self .log ('InfoServicesConfiguration.parse_configuration completed' )
162
153
@@ -184,44 +175,11 @@ def configure(self, attributes):
184
175
"\n If not, you may need to add the directory containing the Python bindings to PYTHONPATH."
185
176
"\n HTCondor version must be at least 8.2.0." , level = logging .WARNING )
186
177
else :
187
- if self .authorization_method == 'vomsmap' :
188
- error = False
189
- for requiredfile in [BAN_MAPFILE , BAN_VOMS_MAPFILE ]:
190
- if not os .path .exists (requiredfile ):
191
- self .log ("%s authorization requested but %s was not found."
192
- "\n This will cause all mappings to fail."
193
- "\n Please reinstall lcmaps >= 1.6.6-1.3 or create a blank %s yourself." %
194
- (self .authorization_method , requiredfile , requiredfile ),
195
- level = logging .ERROR )
196
- error = True
197
- if error :
198
- return False
199
-
200
- default_allowed_vos = list (reversevomap .get_allowed_vos ())
201
- else :
202
- default_allowed_vos = []
203
- if not default_allowed_vos :
204
- # UGLY: only issue the warning if the admin has requested autodetection for some of their SCs/REs
205
- raise_warning = False
206
- for section in self .subcluster_sections .sections ():
207
- if utilities .config_safe_get (self .subcluster_sections , section , 'allowed_vos' , '' ).strip () == "*" :
208
- raise_warning = True
209
- if raise_warning :
210
- self .log ("Could not determine default allowed VOs for subclusters/resource entries." ,
211
- level = logging .WARNING )
212
- if self .authorization_method == 'vomsmap' :
213
- self .log ("Install vo-client-lcmaps-voms to obtain default mappings for VOs, and/or create"
214
- " your own mapfile at /etc/grid-security/voms-mapfile." ,
215
- level = logging .WARNING )
216
- else :
217
- self .log ("Ensure %s exists and is non-empty, or fill out allowed_vos in all your"
218
- " Subcluster and Resource Entry sections." % USER_VO_MAP_LOCATION ,
219
- level = logging .WARNING )
220
178
try :
221
- self .resource_catalog = subcluster .resource_catalog_from_config (self . subcluster_sections ,
222
- default_allowed_vos = default_allowed_vos )
179
+ self .resource_catalog = subcluster .resource_catalog_from_config (
180
+ self . subcluster_sections , default_allowed_vos = [ "*" ] )
223
181
except exceptions .SettingError as err :
224
- self .log ("Error in info services configuration: %s" % str ( err ) , level = logging .ERROR )
182
+ self .log ("Error in info services configuration: %s" % err , level = logging .ERROR )
225
183
return False
226
184
self ._configure_ce_collector ()
227
185
0 commit comments