Skip to content

Commit a8fddcf

Browse files
committed
Revert "Drop the OSG_HOSTNAME environment variable but keep SiteInformation.host_name since we need it in other places (e.g. gratia) (SOFTWARE-3471)"
as it turns out the gratia config wants the OSG_HOSTNAME attribute too. Not sure why it's using attributes instead of getting the properties directly so I'm not touching it. This reverts commit 27b026f
1 parent 10b7851 commit a8fddcf

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

osg_configure/configure_modules/siteinformation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def __init__(self, *args, **kwargs):
3131
mapping='OSG_GROUP'),
3232
'host_name':
3333
configfile.Option(name='host_name',
34-
required=MANDATORY_ON_CE),
34+
required=MANDATORY_ON_CE,
35+
mapping='OSG_HOSTNAME'),
3536
'resource':
3637
configfile.Option(name='resource',
3738
required=MANDATORY,

scripts/osg-configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ CONFIG_DIRECTORY = '/etc/osg'
2525
OUTPUT_DIRECTORY = '/var/lib/osg'
2626
LOG_FILE = '/var/log/osg/osg-configure.log'
2727
DEFAULT_JOB_ENVIRONMENT_ATTRIBUTES = ['OSG_SITE_NAME',
28+
'OSG_HOSTNAME',
2829
'OSG_GRID',
2930
'OSG_APP',
3031
'OSG_DATA',

tests/test_siteattributes.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def testParsing1(self):
5151

5252
attributes = settings.get_attributes()
5353
variables = {'OSG_GROUP': 'OSG-ITB',
54+
'OSG_HOSTNAME': 'example.com',
5455
'OSG_SITE_NAME': 'MY_SITE',
5556
}
5657
for var in variables:
@@ -78,6 +79,7 @@ def testParsing2(self):
7879

7980
attributes = settings.get_attributes()
8081
variables = {'OSG_GROUP': 'OSG',
82+
'OSG_HOSTNAME': 'example.com',
8183
'OSG_SITE_NAME': 'MY_SITE',
8284
}
8385
for var in variables:
@@ -105,6 +107,7 @@ def testParsing3(self):
105107

106108
attributes = settings.get_attributes()
107109
variables = {'OSG_GROUP': 'OSG',
110+
'OSG_HOSTNAME': 'example.com',
108111
'OSG_SITE_NAME': 'MY_SITE',
109112
}
110113
for var in variables:

0 commit comments

Comments
 (0)