Skip to content

Commit e42b6fc

Browse files
Merge pull request #124 from matyasselmeci/pr/v4/SOFTWARE-4507.byelcmaps
Remove LCMAPS config and 10-misc.ini
2 parents ddb1947 + 793da29 commit e42b6fc

File tree

12 files changed

+17
-455
lines changed

12 files changed

+17
-455
lines changed

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -159,21 +159,6 @@ This section is contained in `/etc/osg/config.d/10-gateway.ini` which is provide
159159
| **job\_envvar\_path** | String | The value of the PATH environment variable to put into HTCondor jobs running with HTCondor-CE. This value is ignored if not using that batch system/gateway combination. |
160160

161161

162-
### 10-misc.ini / [Misc Services] section ###
163-
164-
This section handles the configuration of services that do not have a dedicated section for their configuration.
165-
166-
This section is contained in `/etc/osg/config.d/10-misc.ini` which is provided by the `osg-configure-misc` RPM.
167-
168-
This section primarily deals with authentication/authorization. For information on suggested settings for your CE, see the [authentication section of the HTCondor-CE install documents](../compute-element/install-htcondor-ce#configuring-authentication).
169-
170-
| Option | Values Accepted | Explanation |
171-
|---------------------------------------|---------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
172-
| **authorization\_method** | `gridmap`, `local-gridmap`, `vomsmap` | This indicates which authorization method your site uses. |
173-
| edit\_lcmaps\_db | `True`, `False` | (Optional, default True) If true, osg-configure will overwrite `/etc/lcmaps.db` to set your authorization method. The previous version will be backed up to `/etc/lcmaps.db.pre-configure` |
174-
| all\_fqans | `True`, `False` | (Optional, default False) If true, vomsmap auth will use all VOMS FQANs of a proxy for mapping -- see [documentation](../security/lcmaps-voms-authentication#mapping-using-all-fqans) |
175-
176-
177162
### 10-storage.ini / [Storage] section ###
178163

179164
This section gives information about the options in the Storage section of the configuration file.

config/10-misc.ini

Lines changed: 0 additions & 20 deletions
This file was deleted.

osg_configure/configure_modules/infoservices.py

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22
for CE collector info services"""
33

44
import re
5-
import os
6-
try:
7-
import ConfigParser
8-
except ImportError:
9-
import configparser as ConfigParser
5+
import configparser as ConfigParser
106
import subprocess
117
import logging
128

13-
from osg_configure.configure_modules.misc import MiscConfiguration
149
from osg_configure.modules import exceptions
1510
from osg_configure.modules import utilities
1611
from osg_configure.modules import configfile
@@ -67,7 +62,6 @@ def __init__(self, *args, **kwargs):
6762
self.resource_catalog = None
6863
self.authorization_method = None
6964
self.subcluster_sections = None
70-
self.misc_module = MiscConfiguration(*args, **kwargs)
7165

7266
self.log("InfoServicesConfiguration.__init__ completed")
7367

@@ -119,8 +113,6 @@ def parse_configuration(self, configuration):
119113

120114
self.ce_collectors = self._parse_ce_collectors(self.options['ce_collectors'].value)
121115

122-
self.misc_module.parse_configuration(configuration)
123-
124116
def csg(section, option):
125117
return utilities.config_safe_get(configuration, section, option, None)
126118

@@ -135,7 +127,6 @@ def csgbool(section, option):
135127

136128
self.htcondor_gateway_enabled = csgbool('Gateway', 'htcondor_gateway_enabled')
137129

138-
self.authorization_method = csg('Misc Services', 'authorization_method')
139130
self.subcluster_sections = ConfigParser.SafeConfigParser()
140131

141132
for section in configuration.sections():
@@ -156,7 +147,7 @@ def csgbool(section, option):
156147
# configure(), but at this point we don't have a way of knowing what
157148
# default_allowed_vos should be.
158149
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=["*"])
160151

161152
self.log('InfoServicesConfiguration.parse_configuration completed')
162153

@@ -184,44 +175,12 @@ def configure(self, attributes):
184175
"\nIf not, you may need to add the directory containing the Python bindings to PYTHONPATH."
185176
"\nHTCondor version must be at least 8.2.0.", level=logging.WARNING)
186177
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-
"\nThis will cause all mappings to fail."
193-
"\nPlease 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)
220178
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,
181+
default_allowed_vos=["*"])
223182
except exceptions.SettingError as err:
224-
self.log("Error in info services configuration: %s" % str(err), level=logging.ERROR)
183+
self.log("Error in info services configuration: %s" % err, level=logging.ERROR)
225184
return False
226185
self._configure_ce_collector()
227186

osg_configure/configure_modules/misc.py

Lines changed: 0 additions & 231 deletions
This file was deleted.

0 commit comments

Comments
 (0)