Bug 1654671

Summary: Inconsistent user confirmation prompts
Product: Red Hat Enterprise Linux 8 Reporter: Anuj Borah <aborah>
Component: 389-ds-baseAssignee: mreynolds
Status: CLOSED ERRATA QA Contact: RHDS QE <ds-qe-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 8.0CC: nkinder, pasik, spichugi, tbordaz, vashirov
Target Milestone: rcFlags: vashirov: mirror+
Target Release: 8.0   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 03:07:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1683259    
Bug Blocks:    

Description Anuj Borah 2018-11-29 11:43:41 UTC
Description of problem:

dsconf Instance sasl delete "SASL mapping name"  asking for confirmation: Type 'Yes I am sure' to continue:

1. [root@server-rhel8 ds]# dsconf localhost sasl list
anuj
Kerberos uid mapping
rfc 2829 dn syntax
rfc 2829 u syntax
uid mapping

2. [root@server-rhel8 ds]# dsconf localhost sasl delete anuj
Deleting SaslMapping cn=anuj,cn=mapping,cn=sasl,cn=config :
Type 'Yes I am sure' to continue: Yes I am sure
Successfully deleted cn=anuj,cn=mapping,cn=sasl,cn=config

Should it be something like "Yes" or "Y" or "y"
 

Version-Release number of selected component (if applicable):
389-ds-base-1.4.0.19-2.module+el8+1+36e60e1d.x86_64

How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Viktor Ashirov 2018-12-21 13:06:30 UTC
I changed the bug title to reflect the actual issue.
I also want to add the following example:

Removing instances:
[root@server-f29 ds]# dsctl slapd-server-f29 remove 
Not removing: if you are sure, add --do-it
[root@server-f29 ds]# dsctl slapd-server-f29 remove  --do-it 

About to remove instance (server-f29)!
If this is not what you want, press ctrl-c now ...
        
5 ...
4 ...
3 ...
2 ...
1 ...
Removing instance ...
Removed /etc/systemd/system/multi-user.target.wants/dirsrv.
Completed instance removal

But with --remove-all there is no way to press ctrl-c, it just asks for one "Yes".

[root@server-f29 ds]# dsctl --remove-all
Are you sure you want to remove all the Directory Server instances?  Enter "Yes" to continue: Yes
Removing instance: slapd-localhost
Removed /etc/systemd/system/multi-user.target.wants/dirsrv.
All instances have been successfully removed

I'd argue that --remove-all is more disastrous than deleting just one instance. And we should be using countdown here as well. Or just here, but not when deleting one instance.

Comment 2 mreynolds 2018-12-21 15:26:24 UTC
This has been discussed several times with varying opinions, I need to find the ticket with the various points of view...

To recap:

IMO, "dsctl remove" using "--do-it" is pointless/redundant if there is a countdown.  One option is to use a countdown and remove the confirmation option (--do-it) option and confirmation question (--remove-all).  Or, get rid of the countdown and only have a confirmation question for both removal techniques.  But we should not have a countdown AND some type of extra confirmation.

Comment 7 Anuj Borah 2020-06-02 13:06:26 UTC
[root@ci-vm-10-0-138-160 upstream]# rpm -qa | grep 389
389-ds-base-libs-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-snmp-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-debugsource-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-legacy-tools-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
389-ds-base-debuginfo-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.x86_64
python3-lib389-1.4.3.8-2.module+el8.3.0+6591+ebfc9766.noarch

Comment 10 errata-xmlrpc 2020-11-04 03:07:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (389-ds:1.4 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4695