Bug 1012497 - swift: swift delete <container> should have a warning like rm unless used with --force
swift: swift delete <container> should have a warning like rm unless used wit...
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-swiftclient (Show other bugs)
x86_64 Linux
unspecified Severity medium
: ---
: 5.0 (RHEL 7)
Assigned To: RHOS Maint
Martina Kollarova
: Improvement, MoveUpstream
Depends On:
  Show dependency treegraph
Reported: 2013-09-26 10:49 EDT by Dafna Ron
Modified: 2016-04-26 11:39 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
dron: rhos-4.0
Last Closed: 2013-10-31 06:42:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1231495 None None None Never

  None (edit)
Description Dafna Ron 2013-09-26 10:49:48 EDT
Description of problem:

currently if you run swift delete <container> than the container and all files will be deleted. 
I think that much like the rm command we should add a --force or rf so that either a warning appears or user knows what they are doing and adds the --force. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create a container with several files 
2. run: swift delete <container> 

Actual results:

container and all files will be removed without a warning 

Expected results:

we should not remove a whole container with no warning or a --force added (much like rm command) 

Additional info:
Comment 1 Dafna Ron 2013-09-26 10:53:45 EDT
Comment 2 Pete Zaitcev 2013-09-26 12:20:09 EDT
Isn't it a matter of personal preference? We have this awful redhattism
of aliases for rm/cp/mv for root, which I always delete from /root/.bashrc.
I suppose it sets a precedent, but if we do the same for swift(1), then
we draw the same downsides -- only worse because there's no separate
mode for scripting in Swift client. You don't want everyone to have separate
scripts for RHOS, do you?
Comment 3 Dafna Ron 2013-09-26 12:28:43 EDT
as you said, this is a personal preferences but RH releases do go out with aliases for rm and so on and I don't think that all people delete these preferences. 
in facet, I worked in support for production servers where we added additional protection for some things since someone running with root or sudo user might accidentally delete financial information for the entire east cost :). 
If you think this is problematic however, this can always be a configurable value no?
Comment 4 Ayal Baron 2013-10-01 05:47:49 EDT
Warnings are client side anyway, so moving to client.
Comment 5 Dafna Ron 2013-10-02 08:56:18 EDT
here is the upstream bug: 

please look at comment: 

Comment 6 Jakub Ruzicka 2013-10-31 06:42:57 EDT
This is an upstream RFE, not a RHOS bug.

It's properly filed upstream by the reporter so I see no reason to track this for RHOS.

Note You need to log in before you can comment on or make changes to this bug.