In CI most of the time is spent in instance creation/deletion. That's because setup-ds.pl/remove-ds.pl call semanage, which is time consuming.
To save time we can pre-label ports:
semanage port -a -t ldap_port_t -p tcp 38930-38969
But when instance is deleted, label goes away. And on next instance creation semanage will be called again.
Currently we fixed this with a script running before test execution, that prepares the machine, which contains:
sed '/# remove the selinux label/,/# update systemd files/s/^/#/' -i /usr/lib64/dirsrv/perl/DSCreate.pm
This basically removes the code needed for label removal.
It would be nice to have an option or environment variable that would control selinux labeling process. If it's present, labeling/label removal should not be called.
Reviewed by nhosoi.
Pushed to master on behalf of Viktor.
6abd5f4..e9ae515 master -> master
Metadata Update from @vashirov:
- Issue assigned to vashirov
- Issue set to the milestone: 220.127.116.11
to comment on this ticket.