Bug #251
Missing on delete rules
Status: | Closed | Start date: | 06/03/2010 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Tino Vázquez | % Done: | 0% | |
Category: | CLI | |||
Target version: | Release 2.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: |
Description
Hi,
when developing our so called 'pilot' release I've ran into the following problem during the test cycles.
I've added some users and virtual networks, then later deleted the users. This lead to errors when listing
networks, ie. 'onevnet list' gave back error messages (as far as I remember it complained about users).
To my understanding while users were removed their networks were not...
Cheers,
Gyula
History
#1 Updated by Gyula Csom about 11 years ago
- File onevm.stack added
- File onevnet.stack added
Some additions:
Reproduction¶
I reproduced the problem with the following results:
1. What is the context?
$ sudo su - oneadmin $ oneuser list lists 3 users: oneadmin, org, niifi $ onevnet list lists 3 networks Internet, org.lan, niifi.lan
2. Delete the org user
$ oneuser delete org The user org still has VM's defined, type YES if you are sure you want to delete this user: YES
3. List VM-s
onevm list /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:92:in `parse': #<REXML::ParseException: No close tag for /VM_POOL/VM[2]/USERNAME> (REXML::ParseException) ...
4. List vnets
onevnet list /usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:92:in `parse': #<REXML::ParseException: No close tag for /VNET_POOL/VNET[3]
5. Cleanup
After manually deleting the stuck vm and vnet everything works fine again.
Note that I attached the full stack traces.
Problems¶
In fact there are 2 problems: one for the vm and one for the vnet, ie. none of them is cleaned up after deleting the user who owned them.
Fix request¶
I'd like to ask for 3 new features added in order to fix the above problems:
1. CLI: Confirmation before deleting a user who has network(s) (even if she has no active vm)
2. CORE: Cascade delete of vms when deleting a user who owns them
3. CORE: Cascade delete of vnets when deleting a user who owns them
Cheers,
Gyula
#2 Updated by Ruben S. Montero about 11 years ago
- Category set to CLI
- Status changed from New to Assigned
- Assignee set to Tino Vázquez
- Target version set to Release 2.0
We are going to put a quick fix for 1.6 if there are networks or vms defined the user will not be deleted (through the CLI). Also this will be done for the hosts.
#3 Updated by Ruben S. Montero almost 11 years ago
- Status changed from Assigned to Closed
- Resolution set to fixed