Skip to content

Commit 3a2ad5d

Browse files
committed
Warn less about Storage.app_dir (OSG_APP); mark it as optional in README.md (apparently it already was)
(SOFTWARE-3011)
1 parent b8f7164 commit 3a2ad5d

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ This section is contained in `/etc/osg/config.d/10-storage.ini` which is provide
171171
| Option | Values Accepted | Explanation |
172172
|------------------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
173173
| **grid_dir** | String | This setting should point to the directory which holds the files from the OSG worker node package. See note |
174-
| **app_dir** | String | This setting should point to the directory which contains the VO specific applications. See note |
174+
| app_dir | String | This setting should point to the directory which contains the VO specific applications. See note |
175175
| data_dir | String | This setting should point to a directory that can be used to store and stage data in and out of the cluster. See note |
176176
| worker_node_temp | String | This directory should point to a directory that can be used as scratch space on compute nodes. If not set, the default is UNAVAILABLE. See note |
177177
| site_read | String | This setting should be the location or url to a directory that can be read to stage in data via the variable `$OSG_SITE_READ`. This is an url if you are using a SE. If not set, the default is UNAVAILABLE |

config/10-storage.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ grid_dir = /etc/osg/wn-client/
2121
; specific applications. It corresponds to the OSG_APP environment variable
2222
; in jobs.
2323
;
24-
; If no such directory is available, set app_dir to UNSET.
25-
; UNSET will keep the OSG_APP environment variable from being defined.
24+
; If no such directory is available, set app_dir to UNSET or UNAVAILABLE.
2625
; app_dir may be in OASIS.
2726
; To use an app_dir in OASIS, set it to "/cvmfs/oasis.opensciencegrid.org".
2827
; If not in OASIS, then app_dir should have an etc/ subdirectory, and both
2928
; app_dir and app_dir/etc must be world readable and executable (i.e. at
3029
; least 755 or 1755 permissions).
30+
;
31+
; This setting is optional.
3132
app_dir = UNAVAILABLE
3233

3334
; The data_dir setting should point to a directory that can be used to store

osg_configure/configure_modules/storage.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,13 @@ def configure(self, attributes):
123123
self.log("StorageConfiguration.configure completed")
124124
return True
125125

126-
if self.options['app_dir'].value in ('UNSET', 'UNAVAILABLE'):
126+
app_dir = self.options['app_dir'].value
127+
if utilities.blank(app_dir) or app_dir == "UNSET":
127128
self.log('OSG_APP unset or unavailable, exiting')
128129
self.log('StorageConfiguration.configure completed')
129130
return True
130131

131-
if self._app_dir_in_oasis(self.options['app_dir'].value):
132+
if self._app_dir_in_oasis(app_dir):
132133
self.log('OSG_APP is in OASIS, exiting')
133134
self.log('StorageConfiguration.configure completed')
134135
return True
@@ -190,20 +191,13 @@ def _check_app_dir(self, app_dir):
190191
try:
191192
if self._app_dir_in_oasis(app_dir):
192193
self.log('OSG_APP is an OASIS repository, skipping tests',
193-
level=logging.INFO)
194+
level=logging.DEBUG)
194195
return True
195196

196197
# Added for SOFTWARE-1567
197-
if app_dir == 'UNSET':
198-
self.log('OSG_APP is UNSET, skipping tests',
199-
level=logging.INFO)
200-
return True
201-
202-
if app_dir == 'UNAVAILABLE':
203-
self.log('OSG_APP ("app_dir" in the [Storage]) section is not configured.'
204-
' If it is not available, explicitly set it to UNSET.'
205-
' Otherwise, point it to the directory VO software can be obtained from.'
206-
, level=logging.WARNING)
198+
if utilities.blank(app_dir) or app_dir == 'UNSET':
199+
self.log('OSG_APP is UNSET or unavailable, skipping tests',
200+
level=logging.DEBUG)
207201
return True
208202

209203
if not validation.valid_location(app_dir) or not os.path.isdir(app_dir):

0 commit comments

Comments
 (0)