@@ -829,6 +829,7 @@ config.NSFS_CONTENT_DIRECTORY_VERSIONING_ENABLED = false;
829
829
config . NSFS_EXIT_EVENTS_TIME_FRAME_MIN = 24 * 60 ; // per day
830
830
config . NSFS_MAX_EXIT_EVENTS_PER_TIME_FRAME = 10 ; // allow max 10 failed forks per day
831
831
832
+ config . GPFS_DL_PATH = '/usr/lpp/mmfs/lib/libgpfs.so' ;
832
833
config . NSFS_ENABLE_DYNAMIC_SUPPLEMENTAL_GROUPS = 'true' ;
833
834
834
835
config . NSFS_GLACIER_LOGS_DIR = '/var/run/noobaa-nsfs/wal' ;
@@ -1119,11 +1120,12 @@ function _get_config_root() {
1119
1120
*/
1120
1121
function _set_nc_config_to_env ( ) {
1121
1122
const config_to_env = [ 'NOOBAA_LOG_LEVEL' , 'UV_THREADPOOL_SIZE' , 'GPFS_DL_PATH' , 'NSFS_ENABLE_DYNAMIC_SUPPLEMENTAL_GROUPS' ] ;
1122
- Object . values ( config_to_env ) . forEach ( function ( key ) {
1123
- if ( config [ key ] !== undefined ) {
1124
- process . env [ key ] = config [ key ] ;
1123
+ for ( const configuration_key of config_to_env ) {
1124
+ if ( config && Object . keys ( config ) . includes ( configuration_key ) && config [ configuration_key ] !== undefined ) {
1125
+ console . warn ( 'setting configuration_key as env var' , configuration_key , config [ configuration_key ] ) ;
1126
+ process . env [ configuration_key ] = config [ configuration_key ] ;
1125
1127
}
1126
- } ) ;
1128
+ }
1127
1129
}
1128
1130
1129
1131
/**
@@ -1181,7 +1183,7 @@ function load_nsfs_nc_config() {
1181
1183
console . warn ( `nsfs: config.json= ${ util . inspect ( config_data ) } ` ) ;
1182
1184
console . warn ( `nsfs: merged config.json= ${ util . inspect ( merged_config ) } ` ) ;
1183
1185
validate_nc_master_keys_config ( config ) ;
1184
- config . event_emitter . emit ( " config_updated" ) ;
1186
+ config . event_emitter . emit ( ' config_updated' ) ;
1185
1187
} catch ( err ) {
1186
1188
if ( err . code !== 'MODULE_NOT_FOUND' && err . code !== 'ENOENT' ) throw err ;
1187
1189
console . warn ( 'config.load_nsfs_nc_config could not find config.json... skipping' ) ;
0 commit comments