Atom feed of this document
 

 Recovering from a UID/GID mismatch

When running OpenStack compute, using a shared filesystem or an automated configuration tool, you could encounter a situation where some files on your compute node are using the wrong UID or GID. This causes a raft of errors, such as being unable to live migrate, or start virtual machines.

The following is a basic procedure run on nova-compute hosts, based on the KVM hypervisor, that could help to restore the situation:

  • First,make sure you don't use numbers that are already used for some other user/group.

  • Set the nova uid in /etc/passwd to the same number in all hosts (e.g. 112)

  • Set the libvirt-qemu uid in /etc/passwd to the same number in all hosts (e.g. 119)

  • Set the nova group in /etc/group file to the same number in all hosts (e.g. 120)

  • Set the libvirtd group in /etc/group file to the same number in all hosts (e.g. 119)

  • Stop the services on the compute node

  • Change all the files owned by nova or group by nova, e.g.

             find / -uid 108 -exec chown nova {} \; # note the 108 here is the old nova uid before the change
             find / -gid 120 -exec chgrp nova {} \;
             

  • Repeat the steps for the libvirt-qemu owned files if those were needed to change

  • Restart the services

Following this, you can run the find command to verify that all files using the correct identifiers.

Log a bug against this page


loading table of contents...