Skip to content

Commit

Permalink
Merge pull request #8842 from romayalon/romy-fix-circular-dependencie…
Browse files Browse the repository at this point in the history
…s-warning

NC | Fix node warning: Accessing non-existent property 'key' of module exports inside circular dependency
  • Loading branch information
romayalon authored Mar 4, 2025
2 parents 16133d6 + 00186af commit 4bb9068
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ config.NSFS_CONTENT_DIRECTORY_VERSIONING_ENABLED = false;
config.NSFS_EXIT_EVENTS_TIME_FRAME_MIN = 24 * 60; // per day
config.NSFS_MAX_EXIT_EVENTS_PER_TIME_FRAME = 10; // allow max 10 failed forks per day

config.GPFS_DL_PATH = '/usr/lpp/mmfs/lib/libgpfs.so';
config.NSFS_ENABLE_DYNAMIC_SUPPLEMENTAL_GROUPS = 'true';

config.NSFS_GLACIER_LOGS_DIR = '/var/run/noobaa-nsfs/wal';
Expand Down Expand Up @@ -1119,11 +1120,12 @@ function _get_config_root() {
*/
function _set_nc_config_to_env() {
const config_to_env = ['NOOBAA_LOG_LEVEL', 'UV_THREADPOOL_SIZE', 'GPFS_DL_PATH', 'NSFS_ENABLE_DYNAMIC_SUPPLEMENTAL_GROUPS'];
Object.values(config_to_env).forEach(function(key) {
if (config[key] !== undefined) {
process.env[key] = config[key];
for (const configuration_key of config_to_env) {
if (config && Object.keys(config).includes(configuration_key) && config[configuration_key] !== undefined) {
console.warn('setting configuration_key as env var', configuration_key, config[configuration_key]);
process.env[configuration_key] = config[configuration_key];
}
});
}
}

/**
Expand Down Expand Up @@ -1181,7 +1183,7 @@ function load_nsfs_nc_config() {
console.warn(`nsfs: config.json= ${util.inspect(config_data)}`);
console.warn(`nsfs: merged config.json= ${util.inspect(merged_config)}`);
validate_nc_master_keys_config(config);
config.event_emitter.emit("config_updated");
config.event_emitter.emit('config_updated');
} catch (err) {
if (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ENOENT') throw err;
console.warn('config.load_nsfs_nc_config could not find config.json... skipping');
Expand Down
2 changes: 1 addition & 1 deletion docs/NooBaaNonContainerized/ConfigFileCustomizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ The following list consists of supported optional developer customization -
### 7. GPFS library path -
* <u>Key</u>: `GPFS_DL_PATH`
* <u>Type</u>: String
* <u>Default</u>: ''
* <u>Default</u>: '/usr/lpp/mmfs/lib/libgpfs.so'
* <u>Description</u>: Set GPFS library path location.
* <u>Steps</u>:
```
Expand Down

0 comments on commit 4bb9068

Please sign in to comment.