Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 918716

Summary: DSCreate.pm: Error messages cannot be used in the if expression since they could be localized.
Product: Red Hat Enterprise Linux 7 Reporter: Nathan Kinder <nkinder>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Sankar Ramalingam <sramling>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.0CC: jgalipea, mkubik, nhosoi
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.1.2-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:27:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nathan Kinder 2013-03-06 18:17:01 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/563

Example:
DSCreate.pm.in
if (($semanage_err =~ /defined in policy, cannot be deleted/) || ($semanage_err =~ /is not defined/)) {

The "defined in policy, cannot be deleted" as well as "is not defined" may not match if the system locale is not English...

For instance, 
# echo $LANG
ja_JP.utf8

Warning: Port 10389 not removed from selinux policy correctly.  Error: /usr/sbin/semanage: ポート tcp/10389 は定義されていません
<== this is the Japanese translation of "port tcp/10389 is not defined".

A doc issue...?

Comment 1 Rich Megginson 2013-10-01 23:25:18 UTC
moving all ON_QA bugs to MODIFIED in order to add them to the errata (can't add bugs in the ON_QA state to an errata).  When the errata is created, the bugs should be automatically moved back to ON_QA.

Comment 3 Noriko Hosoi 2014-02-06 17:59:56 UTC
Hi Milan, 

To verify this bug ...
1. Set some non English locale on the terminal.  E.g.,
   export LANG=ru_RU.utf8
2. setup-ds.pl with port 389.
3. remove-ds.pl with "-d" option, which should hit "defined in policy, cannot be deleted".  If the bug were not fixed, it reports "Warning: Port 389 not removed from selinux policy correctly.  Error: $semanage_err".  The $semanage_err is not in English.  In this example, in Russian.

Comment 4 Milan Kubík 2014-02-07 15:24:49 UTC
Created and deleted an instance with slovak locale:

[root@dstet-rhel7 ~]# remove-ds.pl -ddd -i /etc/dirsrv/slapd-dstet-rhel7
+++stopping server /usr/lib64/dirsrv/slapd-dstet-rhel7 returns status 0: output
+Successfully stopped server /usr/lib64/dirsrv/slapd-dstet-rhel7
+updating systemd files in /usr/lib/systemd/system and /etc/systemd/system/dirsrv.target.wants for all directory server instances in /etc/sysconfig
++removed systemd file /etc/systemd/system/dirsrv.target.wants/dirsrv for removed instance dstet-rhel7
++/bin/systemctl --system daemon-reload succeeded
+Instance slapd-dstet-rhel7 removed.
Instance /etc/dirsrv/slapd-dstet-rhel7 removed.

[root@dstet-rhel7 ~]# locale
LANG=sk_SK.UTF-8
LC_CTYPE="sk_SK.UTF-8"
LC_NUMERIC="sk_SK.UTF-8"
LC_TIME="sk_SK.UTF-8"
LC_COLLATE="sk_SK.UTF-8"
LC_MONETARY="sk_SK.UTF-8"
LC_MESSAGES="sk_SK.UTF-8"
LC_PAPER="sk_SK.UTF-8"
LC_NAME="sk_SK.UTF-8"
LC_ADDRESS="sk_SK.UTF-8"
LC_TELEPHONE="sk_SK.UTF-8"
LC_MEASUREMENT="sk_SK.UTF-8"
LC_IDENTIFICATION="sk_SK.UTF-8"
LC_ALL=sk_SK.UTF-8

DS version: 389-ds-base-1.3.1.6-18.el7
Result confirmed by Noriko. Marking verified.

Comment 5 Ludek Smid 2014-06-13 11:27:11 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.