logrotate config settings should not be global

Bug #1918979 reported by Kevin Smith
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Eric MacDonald

Bug Description

Brief Description
-----------------
Several logrotate config files have global rather than file level config settings. These settings will override the default settings in logrotate.conf, and in the create vs. copytruncate setting case will even override file specific config in other logrotate config files.

Note that the create log rotation setting (instead of copytruncate) is beneficial for log scrapers like filebeat that keep track of files via dev/inode.

Severity
--------
<Minor: System/Feature is usable with minor issue>

Steps to Reproduce
------------------
Change the logrotate configuration in /etc/logrotate.d/syslog for the first group of files from copytruncate to create. Run: "sudo logrotate -d -v -f /etc/logrotate.conf" to test this change and notice that the log files in question are still copytruncated instead of the active logfile being renamed and a new logfile being created. (Note the problem is still present and was first noticed in the course of normal log rotation managed by logmgmt.py)

logrotate files with global config settings (** files are worst offenders):
  fm.logrotate
  nfvi-plugins.logrotate
  pmon.logrotate
  fsmon.logrotate
**mtce.logrotate
**mtcalarm.logrotate
  lmon.logrotate
**hostw.logrotate
**hwmon.logrotate

When the global config options are moved to the file level for the above files, create config for individual files specified in other config files works as expected.

Expected Behavior
------------------
Changing logrotate config files to use create rather than copytruncate should work.

Actual Behavior
----------------
Changing logrotate config files to use create rather than copytruncate does not work.

Reproducibility
---------------
100%

System Configuration
--------------------
Any and all.

Branch/Pull Time/Commit
-----------------------
March 12 2021 Master, day 1 issue it seems.

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing

Workaround
----------
Move any global sections from the logrotate config files in /etc/logrotate.d into file specific sections.

Changed in starlingx:
assignee: nobody → Eric MacDonald (rocksolidmtce)
Ghada Khalil (gkhalil)
tags: added: stx.metal
Changed in starlingx:
importance: Undecided → Low
status: New → Triaged
tags: added: stx.config
Revision history for this message
Eric MacDonald (rocksolidmtce) wrote :

The following 4 merged updates address the reported issue

update: Comment out 'dateext' setting in logrotate.conf file
review: https://review.opendev.org/c/starlingx/config-files/+/784943
commit: https://opendev.org/starlingx/config-files/commit/e87383f6c328efeab2a9407daa33076a85739b96

update: Modify mtce daemon log rotation config files
review: https://review.opendev.org/c/starlingx/metal/+/785018
commit: https://opendev.org/starlingx/metal/commit/3c1e9d960198c044e382eb7d47b3bb70cbf6ba70

update: Modify nfv and mtce-guest log rotation config files
review: https://review.opendev.org/c/starlingx/nfv/+/784951
commit: https://opendev.org/starlingx/nfv/commit/454c71ddc0ac32bf2ab11e2ec54b884249ea63bf

update: Make small modification to fm's logrotation configuration file
review: https://review.opendev.org/c/starlingx/fault/+/784947
commit: https://opendev.org/starlingx/fault/commit/581495082a5a0a9456065b3d3bb8b5f015747fd8

Changed in starlingx:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nfv (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/nfv/+/792239

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to metal (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/metal/+/792250

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fault (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/fault/+/792254

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/fault/+/793428

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fault (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/fault/+/792254

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nfv (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/nfv/+/792239

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to metal (f/centos8)
Download full text (34.9 KiB)

Reviewed: https://review.opendev.org/c/starlingx/metal/+/792250
Committed: https://opendev.org/starlingx/metal/commit/6c2905e665ceeebfa7717c9cbccc1c277d10966b
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 5942a56ec6f0b265ca6d1c8c800fe84c4a22860f
Author: Eric MacDonald <email address hidden>
Date: Thu May 13 15:57:43 2021 +0000

    Revert "Align partitions created by kickstarters"

    This reverts commit 0e89acc83c616741952a068a3ff07ba91440eff8.

    Reason for revert: Review should have been abandoned rather than merged.

    Change-Id: I95f1e151183f122d93b834ab2a785736e5a8ef12
    Closes-Bug: 1928341

commit c7c341b198e79bb98f443c7c07f671c6387075af
Author: Don Penney <email address hidden>
Date: Fri May 7 08:56:06 2021 -0400

    Add /pxeboot/grubx64.efi symlink for UEFI pxeboot

    UEFI pxeboot with shim.efi looks for the grubx64.efi in the tftpboot
    root directory. This update creates a symlink to the
    /pxeboot/EFI/grubx64.efi file in /pxeboot.

    Change-Id: Iabf8ec89d0af6e6b1a62e20159ecdfa16729444e
    Partial-Bug: 1927730
    Signed-off-by: Don Penney <email address hidden>

commit ce7529964932a9fd1cc10ce18dbe11e89ee02223
Author: Eric MacDonald <email address hidden>
Date: Wed May 5 19:05:55 2021 -0400

    Fix enabling heartbeat of self from the peer controller

    This issue only occurs over an hbsAgent process restart
    where the ready event response does not include the
    heartbeat start of the peer controller.

    This update reverts a small code change that was
    introduced by the following update.

    https://review.opendev.org/c/starlingx/metal/+/788495

    Remove the my_hostname gate introduced at line 1267 of
    mtcCtrlMsg.cpp because it prevents enabling heartbeat
    of self by the peer controller.

    Change-Id: Id72c35f25e2a5231a8a8363a35a81e042f00085e
    Closes-Bug: 1922584
    Signed-off-by: Eric MacDonald <email address hidden>

commit 48978d804d6f22130d0bd8bd17f361441024bc6c
Author: Eric MacDonald <email address hidden>
Date: Wed Apr 28 09:39:19 2021 -0400

    Improved maintenance handling of spontaneous active controller reboot

    Performing a forced reboot of the active controller sometimes
    results in a second reboot of that controller. The cause of the
    second reboot was due to its reported uptime in the first mtcAlive
    message, following the reboot, as greater than 10 minutes.

    Maintenance has a long standing graceful recovery threshold of
    10 minutes. Meaning that if a host looses heartbeat and enters
    Graceful Recovery, if the uptime value extracted from the first
    mtcAlive message following the recovery of that host exceeds 10
    minutes, then maintenance interprets that the host did not reboot.
    If a host goes absent for longer than this threshold then for
    reasons not limited to security, maintenance declares the host
    as 'failed' and force re-enables it through a reboot.

    With the introduction of containers and addition of new features
    over the last few releases, boot times on some servers are
    approaching the 10 minute threshold an...

tags: added: in-f-centos8
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fault (f/centos8)
Download full text (6.9 KiB)

Reviewed: https://review.opendev.org/c/starlingx/fault/+/793428
Committed: https://opendev.org/starlingx/fault/commit/d17dd2a196d07500797895ebba4adb020b8a3498
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 3280e6cd5b28809b51ea45e369c069f76f165c44
Author: Pedro Henrique Linhares <email address hidden>
Date: Thu May 6 18:41:57 2021 -0300

    Adding Kubernetes alarm type for PV migration errors during AIO-SX to AIO-DX

    This commit adds a new alarm type for Kubernetes Persistent Volume
    patching errors during AIO-SX to AIO-DX migration.

    Partial-Bug: 1927224
    Signed-off-by: Pedro Henrique Linhares <email address hidden>
    Change-Id: I8f64280394999249c829372d1748a9c26fdb9ced

commit a64e88bf43012d5558826442b98b26847370eeb3
Author: Jerry Sun <email address hidden>
Date: Tue May 4 15:46:52 2021 -0400

    Better repair action for alarm 100.104

    This commit adds a better proposed repair action for filesystem
    threshold alarm 100.104.

    Closes-Bug: 1927155
    Signed-off-by: Jerry Sun <email address hidden>
    Change-Id: Id2d1d4c23d343455d1f0c2e359cf380cc23229cd

commit 03090ca2bb77edb8a01c9a08a716aa3d1a5f4595
Author: Charles Short <email address hidden>
Date: Mon Apr 26 10:50:20 2021 -0400

    Fix pep8 gate failures

    Set hacking to < 4.0.1 in test-requirements.txt so that
    the pep8 gate passes again.

    Test:
    Ran tox -e pep8 command to validate the flake8 job and result.

    Related-Bug: 1926172

    Signed-off-by: Charles Short <email address hidden>
    Change-Id: I5b27a89d0e078912814ca2999bf28e6602980fd0

commit 581495082a5a0a9456065b3d3bb8b5f015747fd8
Author: Eric MacDonald <email address hidden>
Date: Tue Apr 6 09:02:39 2021 -0400

    Make small modification to fm's logrotation configuration file

    This update makes the following changes to the fm logrotation config file

     - add 'create' with permissions to each tuple
     - add 'delaycompress' as a local setting to each log entry
     - remove 'nodateext' global and local setting

    Test Plan:

    PASS: Verify fm logs rotation behavior
    PASS: Verify fm logs delaycompress setting behavior
    PASS: Verify log permissions after rotate

    Change-Id: Ibe8bd8107501df947b5091e928de202378ef4ea8
    Partial-Bug: 1918979
    Depends-On: https://review.opendev.org/c/starlingx/config-files/+/784943
    Signed-off-by: Eric MacDonald <email address hidden>

commit 63fcc33bbca0bc07719c070a8fa7c2a3d3f084b9
Author: Enzo Candotti <email address hidden>
Date: Thu Apr 1 11:37:45 2021 -0300

    Update events.yaml with DM-Monitor alarms

    Add a new alarm definition under the 260.001 id,
    created when resources reconciled status were false.

    Closes-Bug: 1922238

    Signed-off-by: Enzo Candotti <email address hidden>
    Change-Id: I96c05aaaf914bb253f7a71a7bfc79924c8da7857

commit 4639f7dfff972f2b3e2cd61df11ebaf31afc89ee
Author: albailey <email address hidden>
Date: Wed Nov 18 13:36:04 2020 -0600

    Add log and alarm support for vim orchestrated kube-upgrade

    A...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config-files (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/config-files/+/793634

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config-files (f/centos8)
Download full text (4.3 KiB)

Reviewed: https://review.opendev.org/c/starlingx/config-files/+/793634
Committed: https://opendev.org/starlingx/config-files/commit/03c3f68b2a1477da3dbc7d351e8bf9e2cff2acf1
Submitter: "Zuul (22348)"
Branch: f/centos8

commit e82d1b9e70dd50fbec76db7cfc51e433c5b6bf9e
Author: Jim Gauld <email address hidden>
Date: Thu May 6 12:14:39 2021 -0400

    Configure io-scheduler udev rules for ETCD and HW-RAID

    This configures io-scheduler udev rules for etcd and hw-raid
    performance.

    This sets the io-scheduler to 'cfq' tuned parameters for 'controller'
    nodetype with root file-system disk.

    This sets io-scheduler to 'noop' for HW-RAID Dell PowerEdge R720,
    this was a missing commit from pre-starlingx.

    Partial-Bug: 1927515
    Depends-On: https://review.opendev.org/c/starlingx/utilities/+/790094
    Signed-off-by: Jim Gauld <email address hidden>
    Change-Id: Iaf1de8d962d1e8d253c72e680370666a2aed8c8e

commit efb718e03171580c43702a01f7c103e590832ab7
Author: Li Zhou <email address hidden>
Date: Tue Apr 13 04:48:46 2021 -0400

    systemd: Upgrade to version 219-78.el7_9.3

    Change the BuildRequires to refer to the new systemd version.

    Depends-On: https://review.opendev.org/c/starlingx/tools/+/786601
    Closes-Bug: #1924691
    Signed-off-by: Li Zhou <email address hidden>
    Change-Id: I76169b7fd85069e26cfb37de8889cea006c57238

commit 7877dbc6baec4e3214a12ac0ae44db5491a22e9d
Author: Andy Ning <email address hidden>
Date: Fri Apr 16 10:46:13 2021 -0400

    Enforce "cannot reuse the last 2 passwords" password rule

    Currently the "remember" attribute in pam_pwhistory configuration
    is set to "2", which enforces "cannot reuse the last 1 passwords"
    in history instead of "cannot reuse the last 2 passwords" stated
    in security document.

    This update changed "remember" attribute to "3" so that the rule
    complies with the document.

    Closes-Bug: 1924772
    Signed-off-by: Andy Ning <email address hidden>
    Change-Id: I340152f8b8a572bc1e86f1eb4a14eb8e392f6334

commit e87383f6c328efeab2a9407daa33076a85739b96
Author: Eric MacDonald <email address hidden>
Date: Tue Apr 6 08:44:26 2021 -0400

    Comment out 'dateext' setting in logrotate.conf file

    This update comments out the 'dateext' setting to avoid
    log files being rotated with date as a default.

    Test Plan:

    PASS: Verify log rotation config files that don't
          specifically set dateext option are rotated
          by number rather than date.
    PASS: Verify system install

    Partial-Bug: 1918979
    Signed-off-by: Eric MacDonald <email address hidden>
    Change-Id: Ib68d86d1ec3f15abedce4c4059c3a8ec34b7d196

commit 35160afbdada2efe0ff567dd94ca1419903c87ad
Author: Nicolas Alvarez <email address hidden>
Date: Tue Dec 8 17:26:18 2020 -0300

    Disable SNMP Host-Based from config-files repo.

    Due to SNMP is going to be containerized, we disable
    it from starlingx/config-files repo.

    Story: 2008132
    Task: 41381
    Depends-On: https://review.opendev.org/765381
    Signed-off-by: Nicolas Alvarez <nic...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nfv (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/nfv/+/796295

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/nfv/+/796327

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nfv (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/nfv/+/796295

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nfv (f/centos8)
Download full text (14.5 KiB)

Reviewed: https://review.opendev.org/c/starlingx/nfv/+/796327
Committed: https://opendev.org/starlingx/nfv/commit/96fa4281d73e701e58388228c8e8e85491785c38
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 73c683d5337beff6062b40f011f3b775f3c70107
Author: Eric MacDonald <email address hidden>
Date: Fri May 21 17:25:38 2021 -0400

    Update fw-update-strategy steps to load wait_time from_dict

    The sw-manager fw-update-strategy feature is seen
    to fail in a traceback.

    The __wait_time member of the FwUpdateHostsStep and
    FwUpdateAbortHostsStep objects are not de-serialized
    from the DB using the ‘from_dict’ methods. This means
    it does not run the ‘init’ method for those classes,
    but instead attempts to re-constitute the object
    directly which can lead to an exception\traceback.

    This update adds the _wait_time member to each of these
    fw-update-strategy class objects' 'from_dict' function.

    This update also removes another object member, this one
    currently unused, that would also not be de-serialized
    if it were to be put to use as is in the future.

    Test Plan:

    PASS: Verify end-to-end orchestrated fw update (x2)

    Closes-Bug: 1929251
    Change-Id: I4540d1712f4dfee74e592c4f3ebce9c7cc913ab2
    Signed-off-by: Eric MacDonald <email address hidden>

commit 5ff24cf13f9d8cacab9ec15ff193fc8c819d31f4
Author: albailey <email address hidden>
Date: Fri May 21 17:51:38 2021 -0500

    Specify the nodeset for zuul jobs

    The py2.7 jobs need to specify xenial
    Changed py37 to py36 and specify bionic.

    The un-specified python3 jobs work fine on either
    focal or bionic.

    zuul is not setup to trigger off code changes in this repo
    so no source code changes are required to trigger the zuul
    jobs

    Partial-Bug: 1928978
    Signed-off-by: albailey <email address hidden>
    Change-Id: Iab9c8727a0f16fa7ff02c20ca3bec5622abe7bd7

commit 98d66c7f3bc46e1a990907db1c8f498f9841c885
Author: albailey <email address hidden>
Date: Thu May 6 12:03:15 2021 -0500

    Fix swact issue when deserializing an old patch strategy

    If a patch strategy in a previous release is de-serialized
    in the vim running a load that contains this commit
    https://review.opendev.org/c/starlingx/nfv/+/780310

    the vim would fail to startup due to key errors as it
    expected fields that did not exist in the previous release.

    Closes-Bug: 1927526
    Signed-off-by: albailey <email address hidden>
    Change-Id: Ia72463feb50f7d6a2491242ec865f7c854c75419

commit e5856549e51f10ae6818ec1d0ec43568225e9bd9
Author: albailey <email address hidden>
Date: Thu May 6 12:46:29 2021 -0500

    Increase the patching apply_patch REST API timeout

    During a kubernetes upgrade orchestration, the kubernetes
    patch needs to be applied. The default timeout was 20 seconds
    but a lab took 24 seconds.

    Thi update increases the timeout for that API call.

    Closes-Bug: 1927532
    Signed-off-by: albailey <email address hidden>
    Change-Id: I63a6c5616f6abf7a5b6879e5ebd458a8ecc52ba7

commit 4ffec1...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.