Page MenuHomeDevCentral

Avoid egrep in Salt code base
ClosedPublic

Authored by dereckson on Aug 3 2024, 13:09.
Tags
None
Referenced Files
F3729174: D3392.id8753.diff
Sat, Nov 9, 20:03
Unknown Object (File)
Thu, Oct 31, 21:50
Unknown Object (File)
Thu, Oct 31, 04:11
Unknown Object (File)
Wed, Oct 30, 16:50
Unknown Object (File)
Sun, Oct 27, 11:32
Unknown Object (File)
Fri, Oct 25, 12:17
Unknown Object (File)
Wed, Oct 23, 19:25
Unknown Object (File)
Sun, Oct 20, 05:36
Subscribers
None

Details

Summary

On recent Fedora/RHEL releases, egrep raises a deprecation warning.
That warning fails selinux.fcontext_policy_present invocations.

This is especially problematic for the SELinux module for paas-docker role.
Don't record SELinux context created several times issues with nginx logs.

Patch is not needed on FreeBSD servers as on that userland, egrep works fine.

Ref T1991

Test Plan
  • Apply on WindRiver, check it's ignored
  • Apply on Dwellers, run nginx config state

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
hotfix-salt-egrep
Build Status
Buildable 5451
Build 5732: arc lint + arc unit

Event Timeline

dereckson created this revision.
Complector
$ salt dwellers state.apply hotfixes/salt
dwellers:
----------
          ID: T1991_egrep_patch
    Function: file.patch
        Name: /opt/saltstack/salt/lib/python3.10/site-packages/salt
      Result: True
     Comment: Patch successfully applied
     Started: 16:15:53.189797
    Duration: 45.172 ms
     Changes:
              ----------
              pid:
                  4123780
              retcode:
                  0
              stderr:
              stdout:
                  patching file modules/csf.py
                  patching file modules/selinux.py

Summary for dwellers
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:  45.172 ms

We're downgrading to Salt 3006 on Linux servers to still be able to distribute credentials from 3006 server.

As such, patch will also be needed for 3006.

dereckson edited the test plan for this revision. (Show Details)

Patches for 3006 and 3007

This revision is now accepted and ready to land.Aug 21 2024, 17:40
This revision was automatically updated to reflect the committed changes.