Ask Your Question
0

Update / change user_id from server / VM

asked 2019-08-20 10:08:25 -0500

panticz gravatar image

Hi all,

is it possible to update / change the user_id of a OpenStack server (VM) if the user no more exists?

# openstack server show 8cf8164a-6f55-4435-9f4e-621617d7951f -c user_id
+---------+----------------------------------+
| Field   | Value                            |
+---------+----------------------------------+
| user_id | ebfd5b2bf26a4f4381a290948cb3ce8b |
+---------+----------------------------------+

# openstack user show ebfd5b2bf26a4f4381a290948cb3ce8b
No user with a name or ID of 'ebfd5b2bf26a4f4381a290948cb3ce8b' exists.
edit retag flag offensive close merge delete

Comments

It looks like it can't be done via API, so you would have to change it in the database.

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-20 10:27:00 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-08-21 03:50:12 -0500

There is no such method to update and set the user id of an instance via CLI or API. You can do that manually by altering the database. You can issue an update command for the specific VM and update the user_id column with the deisred user_id you want.

Virtual machines belonging to a particular user are not deleted when that user’s account is deleted in keystone. In fact, very few resources attributed to an individual user are removed when the user is deleted.

If you want to clean up the resources there are utilities available to do that, for example, CloudWatt's utility OSPurge does this but is limited to resources it can purge. Similarly, you can look at this command line utility to purge network related resources.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-08-20 10:08:25 -0500

Seen: 96 times

Last updated: Aug 21 '19