

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
(SA) Support Tip: How to delete a private Device Group owned by another user?
Sometimes a dynamic device group can cause a heavy load on the database during its recalculations.
If the recalculation takes more than 10 seconds there will be a warning printed in the twist server logs along with the device group id.
To get more information on this device group you can use the dgDump tool as follows:
/opt/opsware/support/bin/dgDump <device_group_id>
If this device group is private and it is owned by another user then it is not possible to delete it using the SA Java client.
However it can be deleted using the Twister web interface:
1. Open Twister in a browser window entering <Server_IP>:1032/twister as below:
https://<core-ip>:1032/twister
2. On the left side you’ll see packages, click com.opsware.device
3. Below that you can find Interfaces, click the DeviceGroupService, this will open a new window. Scroll down and search for the following method:
remove(DeviceGroupRef self)
Remove a device group.
Once you find it, click on “try it!”
If this prompts you a login screen, please enter your SA credentials. Then you will receive something like this:
DeviceGroupService.remove()
(self) DeviceGroupRef. name (type: java.lang.String)
id 0 (type: long)
Enter the id of the device group that needs to be deleted and click “Go”
This will delete it.
To verify that it is deleted you may use the dgDump tool again.
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I have all the perms possible and still don't have the perms to do this on my SA? seems that I would need PrivateDeviceGroup.write ,
So how did you make it work for you?
Pierre

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Pierre,
Try with a Super Administrator
Automate & Orchestrate Solution Architect
*If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thanks Mihai,
I'm already member of :
Group Name | Description | |
User Group | Opsware System Administrators | Opsware System Administration privileges |
User Group | Superusers | Complete access to all SA-managed objects and operations. |
Any other idea?
Pierre


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I'm also in the Super Administrators group.
Pierre

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
What SA version?
Automate & Orchestrate Solution Architect
*If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
That would be 10.22

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I don't think the Twist will let you remove private device groups belonging other users.
You would have to use the Spin to bypass the Twist's permission model.
spin.RoleClass.delete(<DG ID>, check_for_devices=0)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Bret, would you have a script example?
Thanks Pierre

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I don't want to supply a script, which will become apparent why in a moment, I will elaborate on what you need to do.
start python
# /opt/opsware/bin/python
Setup a spin context - I will assume you are on 10.2x or 10.60 with at least rollup 001 applied. getContextByName was removed in 10.60 and then put back in a rollup.
>>> from coglib import spinwrapper
>>> from coglib import certmaster
>>> ctx = certmaster.getContextByName("spin","spin.srv","opsware-ca.crt")
>>> spin = spinwrapper.SpinWrapper(ctx=ctx)
Then that line I posted
>>>spin.RoleClass.delete(dg_id, check_for_devices=0)
*WARNING* if you give this call the wrong ID you will do great irreversible damage to your system.
The RoleClass is used for more than just DeviceGroups. You have been warned.
I suggest you verify that you have the right object before you issue the delete call:
>>> spin.RoleClass.get(dg_id)
Eyeball that this is indeed the object you want removed. Which is why I will not script this. Script are easy to execute and screw your system in ways you never thought possible.
Brett


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Perfectly understood. Thanks for the information and warnings Brett.
I'll re-read the doc on spin on 1004 before fooling around and cleaning users' "odd" private user groups.
Pierre