Bug #251

Missing on delete rules

Added by Gyula Csom about 11 years ago. Updated almost 11 years ago.

Status:ClosedStart date:06/03/2010
Priority:NormalDue date:
Assignee:Tino Vázquez% Done:


Target version:Release 2.0
Resolution:fixed Pull request:
Affected Versions:


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...


onevm.stack - onevm stack trace (1.13 KB) Gyula Csom, 06/04/2010 11:36 AM

onevnet.stack - onevnet stack trace (1.14 KB) Gyula Csom, 06/04/2010 11:36 AM

Associated revisions

Revision 6a566251
Added by Tino Vázquez about 11 years ago

fix for bug #251 Users now are not deleted if still owning VMs and/or Vnets

Revision db5a8d1d
Added by Juan Jose Montiel Cano over 4 years ago

B #5004 merged of 2 templates, advanced and wizard (#251)


#1 Updated by Gyula Csom about 11 years ago

Some additions:


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.


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


#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

Also available in: Atom PDF