Bug #5464
Deleting a group that owns images used by running VMs breaks those VMs
Status: | Pending | Start date: | 10/17/2017 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Core & System | |||
Target version: | - | |||
Resolution: | Pull request: | |||
Affected Versions: | OpenNebula 5.2 |
Description
In OpenNebula 5.2.0 (and likely newer) deleting a group that owns images used by VMs prevents snapshots (and likely) other operations from being performed on those VMs due to quota look operations failing.
Solutions I have investigated:
1. Soft-delete of groups;
2. Chown images found in this state (to whom?); but most likely answer:
3. Return an error deleting groups that own resources (like is done if there are members)
History
#1 Updated by Roy Keene over 3 years ago
- File opennebula-5.4.1-nodelusergroupowning.diff added
Output with patch (attached) applied:
[test] root@aurae-dashboard:~# onegroup create x ID: 100 [test] root@aurae-dashboard:~# onegroup delete 100 [test] root@aurae-dashboard:~# onegroup create x ID: 101 [test] root@aurae-dashboard:~# oneimage chgrp 0 101 [test] root@aurae-dashboard:~# onegroup list ID NAME USERS VMS MEMORY CPU 0 oneadmin 2 - - - 1 users 0 0 / - 0M / - 0.0 / - 101 x 0 0 / - 0M / - 0.0 / - [test] root@aurae-dashboard:~# onegroup delete 101 [one.group.delete] Cannot delete group. Group 101 owns images [test] root@aurae-dashboard:~#
A better solution would be to add a method to each class (or to PoolSQL) to find all objects owned by a given UID/GID, a later patch may implement that