[SERVER-6057] can't remove ill formed database Created: 11/Jun/12 Updated: 15/Aug/12 Resolved: 18/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin, Shell |
| Affects Version/s: | 2.0.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Grégoire Seux | Assignee: | Matt Dannenberg |
| Resolution: | Incomplete | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
if you create ill-named database (such as "admin sha" or "*") you can't rmeove them. How to do it : you get : " if you try to remove it with a command : ) { "ok" : 0, "errmsg" : "invalid params" }Creating such ill-named database should be forbidden (spaces in the name) but it should be possible to remove them. |
| Comments |
| Comment by Grégoire Seux [ 18/Jun/12 ] | |
|
ok, thanks | |
| Comment by Matt Dannenberg [ 15/Jun/12 ] | |
|
Yes I took the following steps and it should work for you as well. I shut down the shards one at a time, removed the files from the data directory, and started the shards back up. Once I had done this to each shard, I connected to mongos and removed the entry for this database from the config.collections collection. | |
| Comment by Grégoire Seux [ 15/Jun/12 ] | |
|
Ok thanks. | |
| Comment by Matt Dannenberg [ 13/Jun/12 ] | |
|
The workaround for dropping such a database would be to delete the db files and ns file (while the server is shutdown of course). | |
| Comment by Grégoire Seux [ 13/Jun/12 ] | |
|
first I typed : then I typed : | |
| Comment by Matt Dannenberg [ 12/Jun/12 ] | |
|
I am not sure if I followed what you posted earlier. Can you please post the exact commands that you used to create an ill formed db? | |
| Comment by Grégoire Seux [ 12/Jun/12 ] | |
|
quite easily : then type : | |
| Comment by Daniel Pasette (Inactive) [ 11/Jun/12 ] | |
|
How did you create the 'admin sha' db? I tried a few tricks in the shell and via python, but couldn't easily make it happen in order to repro. | |
| Comment by Grégoire Seux [ 11/Jun/12 ] | |
|
It works for * but not for spaces : db.getSiblingDB("admin sha").dropDatabase() " | |
| Comment by Ian Whalen (Inactive) [ 11/Jun/12 ] | |
|
Fix to check for spaces and illegal characters (/\. "*<>:|?) made in v2.1.0 In order to drop a database you can run:
|