#48953 Add an option or env variable to skip port label removal
Closed: Fixed None Opened 2 years ago by vashirov.

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
commit e9ae515

Metadata Update from @vashirov:
- Issue assigned to vashirov
- Issue set to the milestone: 1.3.5.13

2 years ago

Login to comment on this ticket.

Metadata