Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1356444
Description of problem: If User tries to delete non-existent Sub CAs with option --continue in ipa ca-del then, command produces misleading error message. [root@server1 ~]# ipa ca-find SubCA_10 ------------- 0 CAs matched ------------- ---------------------------- Number of entries returned 0 ---------------------------- [root@server1 ~]# ipa ca-find SubCA_9 ------------- 0 CAs matched ------------- ---------------------------- Number of entries returned 0 ---------------------------- [root@server1 ~]# ipa ca-del SubCA_9 SubCA_10 --continue ------------- Deleted CA "" ------------- Failed to remove: SubCA_9, SubCA_10 [root@server1 ~]# echo $? 0 Version-Release number of selected component (if applicable): ipa-server-4.4.0-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. ipa ca-del non_existent_ca_1 non_existent_ca_2 --continue Actual results: Error message produced as 'Deleted CA ""' Expected results: Rather than blank message error message should be 'No Sub CA deleted' or '0 CA deleted'
Metadata Update from @pvoborni: - Issue assigned to someone - Issue set to the milestone: Ticket Backlog
--continue itself says donot stop on errors. # ipa help ca_del Usage: ipa [global-options] ca-del NAME... [options]
# ipa help ca_del
Delete a CA. Options: -h, --help show this help message and exit --continue Continuous mode: Don't stop on errors.
If we do ca-del without --continue it gives relevant output. # ipa ca-del SubCA_9 SubCA_10 ipa: ERROR: no such entry
# ipa ca-del SubCA_9 SubCA_10
What I believe is How about changing message to something: # ipa ca-del SubCA_9 SubCA_10 --continue ------------------- Trying to Delete CA "" <<<<<<<<<<<<<<<< ------------------- Failed to remove: SubCA_9, SubCA_10
# ipa ca-del SubCA_9 SubCA_10 --continue
-------------------
The output is expected behavior. It means that no CAs were deleted and displays the ones that failed. This is consistent with other, similar commands.
Metadata Update from @rcritten: - Issue close_status updated to: wontfix - Issue status updated to: Closed (was: Open)
Discussion which lead to closing this issue is on: https://github.com/freeipa/freeipa/pull/1658
Login to comment on this ticket.