Skip to content

Commit 4bb9068

Browse files
authored
Merge pull request #8842 from romayalon/romy-fix-circular-dependencies-warning
NC | Fix node warning: Accessing non-existent property 'key' of module exports inside circular dependency
2 parents 16133d6 + 00186af commit 4bb9068

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

config.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,7 @@ config.NSFS_CONTENT_DIRECTORY_VERSIONING_ENABLED = false;
829829
config.NSFS_EXIT_EVENTS_TIME_FRAME_MIN = 24 * 60; // per day
830830
config.NSFS_MAX_EXIT_EVENTS_PER_TIME_FRAME = 10; // allow max 10 failed forks per day
831831

832+
config.GPFS_DL_PATH = '/usr/lpp/mmfs/lib/libgpfs.so';
832833
config.NSFS_ENABLE_DYNAMIC_SUPPLEMENTAL_GROUPS = 'true';
833834

834835
config.NSFS_GLACIER_LOGS_DIR = '/var/run/noobaa-nsfs/wal';
@@ -1119,11 +1120,12 @@ function _get_config_root() {
11191120
*/
11201121
function _set_nc_config_to_env() {
11211122
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];
11251127
}
1126-
});
1128+
}
11271129
}
11281130

11291131
/**
@@ -1181,7 +1183,7 @@ function load_nsfs_nc_config() {
11811183
console.warn(`nsfs: config.json= ${util.inspect(config_data)}`);
11821184
console.warn(`nsfs: merged config.json= ${util.inspect(merged_config)}`);
11831185
validate_nc_master_keys_config(config);
1184-
config.event_emitter.emit("config_updated");
1186+
config.event_emitter.emit('config_updated');
11851187
} catch (err) {
11861188
if (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ENOENT') throw err;
11871189
console.warn('config.load_nsfs_nc_config could not find config.json... skipping');

docs/NooBaaNonContainerized/ConfigFileCustomizations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ The following list consists of supported optional developer customization -
112112
### 7. GPFS library path -
113113
* <u>Key</u>: `GPFS_DL_PATH`
114114
* <u>Type</u>: String
115-
* <u>Default</u>: ''
115+
* <u>Default</u>: '/usr/lpp/mmfs/lib/libgpfs.so'
116116
* <u>Description</u>: Set GPFS library path location.
117117
* <u>Steps</u>:
118118
```

0 commit comments

Comments
 (0)