Page MenuHomeDevCentral

Avoid egrep in Salt code base
ClosedPublic

Authored by dereckson on Aug 3 2024, 13:09.
Tags
None
Referenced Files
F3587337: D3392.diff
Thu, Sep 19, 21:26
Unknown Object (File)
Sun, Sep 15, 19:38
Unknown Object (File)
Fri, Sep 13, 19:25
Unknown Object (File)
Mon, Sep 9, 22:03
Unknown Object (File)
Mon, Sep 9, 19:55
Unknown Object (File)
Thu, Sep 5, 21:48
Unknown Object (File)
Thu, Sep 5, 21:13
Unknown Object (File)
Thu, Sep 5, 20:46
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.Wed, Aug 21, 17:40
This revision was automatically updated to reflect the committed changes.