Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup-ds.pl script should wait if "semanage.trans.LOCK" present #502

Closed
389-ds-bot opened this issue Sep 12, 2020 · 5 comments
Closed

setup-ds.pl script should wait if "semanage.trans.LOCK" present #502

389-ds-bot opened this issue Sep 12, 2020 · 5 comments
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/502


https://bugzilla.redhat.com/show_bug.cgi?id=868386 (Red Hat Enterprise Linux 7)

Description of problem: Creating simultaneous instances of directory server
fails when selinux is in enforcing mode. It returns
"libsemanage.semanage_get_lock: Could not get direct transaction lock at
/etc/selinux/targeted/modules/semanage.trans.LOCK" error.

How reproducible: Consistently

Steps to Reproduce:
1. Install latest 389-ds-base.
2. Set selinux to "Enforcing" mode.
3. Run setup-ds.pl script on two terminals simultaneously.
4. setup-ds.pl script fails to create ds instance and returns semanage error.

Actual results:

 semanage port -a -t ldap_port_t -p tcp 13989
libsemanage.semanage_get_lock: Could not get direct transaction lock at
/etc/selinux/targeted/modules/semanage.trans.LOCK. (Resource temporarily
unavailable).
/usr/sbin/semanage: Could not start semanage transaction

Expected results: setup-ds.pl script should be able to handle multiple instance
creation simultaneously.

The script should till the other one is completed.

Additional info: This change might be needed for setup-ds-admin.pl,
remove-ds.pl and remove-ds-admin.pl scripts.

Please refer to - https://bugzilla.redhat.com/show_bug.cgi?id=865236
@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 12, 2020
@389-ds-bot 389-ds-bot added this to the 1.3.1 milestone Sep 12, 2020
@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-01-25 05:57:00

Bug description: If multiple DSCreate or removeDSInstance run
simultaneously, semanage port fails because only one semanage
transaction is allowed to start.

Fix description: This patch puts "semanage port" in the while
loop and it retries until it succeeds or reaches the max retry
count (in total 5 minutes).

@389-ds-bot
Copy link
Author

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2013-01-25 22:10:00

ack

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2013-01-26 00:22:09

Reviewed by Mark (Thank you!!)

Pushed to master: commit 4999849

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2017-02-11 23:11:32

Metadata Update from @nhosoi:

  • Issue assigned to nhosoi
  • Issue set to the milestone: 1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant