Skip to content

Commit 1c4ce8b

Browse files
Merge pull request #8226 from romayalon/romy-5.16.1-backports
5.16.1 Backports
2 parents 9834cd7 + a53a446 commit 1c4ce8b

File tree

17 files changed

+68
-31
lines changed

17 files changed

+68
-31
lines changed

docs/dev_guide/standalone_with_db.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ You can use the configuration for `rsyslog` and `logrotate` for RHEL8. The logs
181181

182182
```
183183
sudo cp src/deploy/standalone/noobaa_syslog.conf /etc/rsyslog.d/
184-
sudo cp src/deploy/standalone/logrotate_noobaa.conf /etc/logrotate.d/
184+
sudo cp src/deploy/standalone/noobaa-logrotate /etc/logrotate.d/
185185
sudo systemctl restart systemd-journald rsyslog
186186
```
187187

@@ -192,7 +192,7 @@ Additionally, it would be helpful if you configure to disable the rate limit of
192192
1. Add the 2 lines below into `/etc/systemd/journald.conf`
193193

194194
```
195-
RateLimitInterva]lSec=0s
195+
RateLimitIntervalSec=0s
196196
RateLimitBurst=0
197197
```
198198

docs/non_containerized_NSFS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,14 +582,14 @@ systemctl status rsyslog
582582

583583
Noobaa logs are pushed to `var/log/noobaa.log` and the log is rotated and compressed daily.
584584

585-
Verify the rsyslog and logrotate rpm configuration is complete by checking the files `etc/rsyslog.d/noobaa_syslog.conf` for rsyslog and `etc/logrotate.d/noobaa/logrotate_noobaa.conf` for logrotate.These files contain the noobaa specific configuration for rsyslog and logrotate.
585+
Verify the rsyslog and logrotate rpm configuration is complete by checking the files `etc/rsyslog.d/noobaa_syslog.conf` for rsyslog and `etc/logrotate.d/noobaa-logrotate` for logrotate.These files contain the noobaa specific configuration for rsyslog and logrotate.
586586

587-
Logrotate configuration is set up under `/etc/logrotate.d/noobaa/`. In order to trigger rotation when log files reache size threshold, each log file (`/var/log/noobaa.log` and `/var/log/noobaa_events.log`) uses its own rsyslog `outchannel` that triggers logrotate once file size reaches a limit (105MB). Logrotate is also typically called from cron on daily schedule.
587+
Logrotate configuration is set up under `/etc/logrotate.d/`. Logrotate is called from cron on daily schedule.
588588

589589
To rotate the logs manually run.
590590

591591
```
592-
logrotate /etc/logrotate.d/noobaa/logrotate_noobaa.conf
592+
logrotate /etc/logrotate.d/noobaa-logrotate
593593
```
594594

595595
**Create env file under the configuration directory (OPTIONAL) -**

src/cmd/manage_nsfs.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { print_usage } = require('../manage_nsfs/manage_nsfs_help_utils');
2020
const { TYPES, ACTIONS, LIST_ACCOUNT_FILTERS, LIST_BUCKET_FILTERS,
2121
GLACIER_ACTIONS } = require('../manage_nsfs/manage_nsfs_constants');
2222
const { throw_cli_error, write_stdout_response, get_config_file_path, get_symlink_config_file_path,
23-
get_config_data, get_boolean_or_string_value} = require('../manage_nsfs/manage_nsfs_cli_utils');
23+
get_config_data, get_boolean_or_string_value, get_config_data_if_exists } = require('../manage_nsfs/manage_nsfs_cli_utils');
2424
const { validate_input_types, validate_bucket_args, validate_account_args,
2525
verify_delete_account, validate_whitelist_arg, verify_whitelist_ips,
2626
_validate_access_keys } = require('../manage_nsfs/manage_nsfs_validations');
@@ -613,7 +613,8 @@ async function list_config_files(type, config_path, wide, show_secrets, filters)
613613
if (entry.name.endsWith('.json')) {
614614
if (wide || should_filter) {
615615
const full_path = path.join(config_path, entry.name);
616-
const data = await get_config_data(config_root_backend, full_path, show_secrets || should_filter);
616+
const data = await get_config_data_if_exists(config_root_backend, full_path, show_secrets || should_filter);
617+
if (!data) return undefined;
617618
// decryption causing mkm initalization
618619
// decrypt only if data has access_keys and show_secrets = true (no need to decrypt if show_secrets = false but should_filter = true)
619620
if (data.access_keys && show_secrets) data.access_keys = await nc_mkm.decrypt_access_keys(data);
@@ -626,6 +627,7 @@ async function list_config_files(type, config_path, wide, show_secrets, filters)
626627
}
627628
});
628629
// it inserts undefined for the entry '.noobaa-config-nsfs' and we wish to remove it
630+
// in case the entry was deleted during the list it also inserts undefined
629631
config_files_list = config_files_list.filter(item => item);
630632

631633
return config_files_list;

src/deploy/NVA_build/NooBaa.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ COPY ./src/deploy/NVA_build/supervisord.orig /tmp/supervisord
110110
COPY ./src/deploy/NVA_build/supervisorctl.bash_completion /etc/bash_completion.d/supervisorctl
111111
COPY ./src/deploy/NVA_build/rsyslog.conf /etc/rsyslog.conf
112112
COPY ./src/deploy/NVA_build/noobaa_syslog.conf /etc/rsyslog.d/
113-
COPY ./src/deploy/NVA_build/logrotate_noobaa.conf /etc/logrotate.d/noobaa/
113+
COPY ./src/deploy/NVA_build/noobaa-logrotate /etc/logrotate.d/
114114
COPY ./src/deploy/NVA_build/noobaa_init.sh /noobaa_init_files/
115115

116116
COPY ./src/deploy/NVA_build/setup_platform.sh /usr/bin/setup_platform.sh

src/deploy/NVA_build/logrotate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ echo "*/5 * * * * /root/node_modules/noobaa-core/src/deploy/NVA_build/noobaa_log
88
while true; do
99

1010
echo "$(date): =================================== running logrotate ===================================" >/dev/stdout 2>&1
11-
/usr/sbin/logrotate -v /etc/logrotate.d/noobaa/logrotate_noobaa.conf >/dev/stdout 2>&1
11+
/usr/sbin/logrotate -v /etc/logrotate.d/noobaa-logrotate >/dev/stdout 2>&1
1212
echo "$(date): =================================== logrotate Done ======================================" >/dev/stdout 2>&1
1313

1414
sleep 60
File renamed without changes.

src/deploy/RPM_build/RPM.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG CENTOS_VER=9
55
ARG BUILD_S3SELECT=0
66
ARG BUILD_S3SELECT_PARQUET=0
77

8-
RUN mkdir -p /etc/logrotate.d/noobaa/
98
RUN mkdir -p /etc/noobaa.conf.d/
109

1110
COPY ./src/agent ./src/agent
@@ -35,8 +34,7 @@ COPY ./package*.json ./
3534
COPY ./binding.gyp .
3635
COPY ./src/deploy/standalone/noobaa_rsyslog.conf ./src/deploy/standalone/noobaa_rsyslog.conf
3736
COPY ./src/deploy/standalone/noobaa_syslog.conf ./src/deploy/standalone/noobaa_syslog.conf
38-
COPY ./src/deploy/standalone/logrotate_noobaa.conf ./src/deploy/standalone/logrotate_noobaa.conf
39-
COPY ./src/deploy/standalone/logrotate_noobaa.sh ./src/deploy/standalone/logrotate_noobaa.sh
37+
COPY ./src/deploy/standalone/noobaa-logrotate ./src/deploy/standalone/noobaa-logrotate
4038
COPY ./src/manage_nsfs ./src/manage_nsfs
4139

4240
WORKDIR /build

src/deploy/RPM_build/noobaa.spec

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,14 @@ mkdir -p $RPM_BUILD_ROOT/etc/noobaa.conf.d/
8787
mkdir -p $RPM_BUILD_ROOT/etc/rsyslog.d/
8888
mv $RPM_BUILD_ROOT/usr/local/noobaa-core/src/deploy/standalone/noobaa_syslog.conf $RPM_BUILD_ROOT/etc/rsyslog.d/noobaa_syslog.conf
8989

90-
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/noobaa
91-
ln -s /usr/local/noobaa-core/src/deploy/standalone/logrotate_noobaa.conf $RPM_BUILD_ROOT/etc/logrotate.d/noobaa/logrotate_noobaa.conf
92-
chmod +x $RPM_BUILD_ROOT/usr/local/noobaa-core/src/deploy/standalone/logrotate_noobaa.sh
90+
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
91+
mv $RPM_BUILD_ROOT/usr/local/noobaa-core/src/deploy/standalone/noobaa-logrotate $RPM_BUILD_ROOT/etc/logrotate.d/noobaa-logrotate
9392

9493
%files
9594
/usr/local/noobaa-core
9695
%{_unitdir}/noobaa.service
97-
/etc/logrotate.d/noobaa/logrotate_noobaa.conf
98-
/etc/rsyslog.d/noobaa_syslog.conf
96+
%config(noreplace) /etc/logrotate.d/noobaa-logrotate
97+
%config(noreplace) /etc/rsyslog.d/noobaa_syslog.conf
9998
/etc/noobaa.conf.d/
10099
/usr/local/bin/noobaa-cli
101100
%doc

src/deploy/spectrum_archive/deployment_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ systemctl status rsyslog
157157

158158
Noobaa logs are pushed to `/var/log/noobaa.log` and the log is rotated and compressed daily.
159159

160-
Verify the rsyslog and logrotate rpm configuration is complete by checking the files `/etc/rsyslog.d/noobaa_syslog.conf` and `/etc/rsyslog.d/noobaa_rsyslog.conf` for rsyslog and `/etc/logrotate.d/noobaa/logrotate_noobaa.conf` for logrotate.These files contain the noobaa specific configuration for rsyslog and logrotate.
160+
Verify the rsyslog and logrotate rpm configuration is complete by checking the files `/etc/rsyslog.d/noobaa_syslog.conf` and `/etc/rsyslog.d/noobaa_rsyslog.conf` for rsyslog and `/etc/logrotate.d/noobaa-logrotate` for logrotate.These files contain the noobaa specific configuration for rsyslog and logrotate.
161161

162162
Rotate the logs manually.
163163

164164
```
165-
logrotate /etc/logrotate.d/noobaa/logrotate_noobaa.conf
165+
logrotate /etc/logrotate.d/noobaa-logrotate
166166
```
167167

168168
# FAQ

src/deploy/standalone/logrotate_noobaa.sh

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)