Page MenuHomeDevCentral

Avoid egrep in Salt code base
ClosedPublic

Authored by dereckson on Aug 3 2024, 13:09.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 12, 15:58
Unknown Object (File)
Tue, Nov 12, 09:51
Unknown Object (File)
Tue, Nov 12, 09:42
Unknown Object (File)
Tue, Nov 12, 07:12
Unknown Object (File)
Tue, Nov 12, 00:25
Unknown Object (File)
Sun, Nov 10, 03:50
Unknown Object (File)
Sat, Nov 9, 20:03
Unknown Object (File)
Thu, Oct 31, 21:50
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 5400
Build 5681: 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.