Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
-
Night's Watch
-
2
-
ready for triage
-
Reviewed
-
Not Needed
Description
With a selmodule resource such as:
selmodule { 'test': |
ensure => present,
|
selmodulepath => '/usr/share/selinux/test.pp', |
syncversion => true, |
}
|
The provider runs semodule --list twice, once for exists? and once for syncversion:
Debug: Selmodule[test](provider=semodule): Checking for module test |
Debug: Executing '/usr/sbin/semodule --list' |
Debug: Selmodule[test](provider=semodule): Checking syncversion on test
|
Debug: Executing '/usr/sbin/semodule --list' |
Debug: Selmodule[test](provider=semodule): load version 1.1 |
Debug: Selmodule[test](provider=semodule): file version 1.1 |
The semodule --list command takes around 2-3 seconds to execute, which causes a large performance hit when there are multiple selmodule resources.
This impact could be cut in half if the command was only run once and the data cached for the syncversion function. It could be cut even more dramatically if semodule --list was stored as a fact and the output merely referenced in the provider.
Attachments
Issue Links
- relates to
-
PUP-10313 Selmodule provider fetch loaded modules performance
-
- Resolved
-