Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Nova VM instances files change ownership to root after live migration

Hi, I've 3 compute nodes with a shared Gluster filesystem mounted on /var/lib/nova/instances on all 3 nodes. After I start a VM I see the usual files in the shared file system:

[root@compute ~]# ll /var/lib/nova/instances/ total 7 drwxr-xr-x 2 nova nova 75 Jun 12 09:40 4f4ed899-a485-401e-aae7-8029068a6be8 drwxr-xr-x 2 nova nova 106 Jun 12 09:40 _base drwxr-xr-x 2 nova nova 4102 Jun 12 09:40 locks [root@compute ~]# ll /var/lib/nova/instances/4f4ed899-a485-401e-aae7-8029068a6be8/ total 4180 -rw-rw---- 1 nova kvm 17219 Jun 12 09:40 console.log -rw-r--r-- 1 qemu kvm 4259840 Jun 12 09:41 disk -rw-r--r-- 1 nova nova 79 Jun 12 09:40 disk.info -rw-r--r-- 1 nova nova 1697 Jun 12 09:40 libvirt.xml

with correct ownerships. Then, I try a live-migration, which apparently goes well:

[root@controller-01 ~]# nova list +--------------------------------------+------+--------+------------+-------------+----------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+------+--------+------------+-------------+----------------+ | 4f4ed899-a485-401e-aae7-8029068a6be8 | test | ACTIVE | - | Running | admin=10.0.1.4 | +--------------------------------------+------+--------+------------+-------------+----------------+ [root@controller-01 ~]# nova show test|grep host | OS-EXT-SRV-ATTR:host | compute.cloud.pd.infn.it | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute.cloud.pd.infn.it | | hostId | aacf08e590c7dbfebc1c211dd94fb29ea89b002b2422fdcdb7564d59 | [root@controller-01 ~]# nova live-migration test compute-02.cloud.pd.infn.it [...] [root@controller-01 ~]# nova show test|grep host | OS-EXT-SRV-ATTR:host | compute-02.cloud.pd.infn.it | | OS-EXT-SRV-ATTR:hypervisor_hostname | compute-02.cloud.pd.infn.it | | hostId | ae17651af3bd9379b458b1756e08799c22a83c564255297ce2454843 |

But, after migration the ownership of some files has changed:

[root@compute ~]# ll /var/lib/nova/instances/4f4ed899-a485-401e-aae7-8029068a6be8/ total 4165 -rw-rw---- 1 root root 2221 Jun 12 10:03 console.log -rw-r--r-- 1 root root 4259840 Jun 12 09:41 disk -rw-r--r-- 1 nova nova 79 Jun 12 09:40 disk.info -rw-r--r-- 1 nova nova 1697 Jun 12 10:03 libvirt.xml

and the VM is now in read-only mode.

Could you please help me in debugging this ?

thanks,

Alvise

Nova VM instances files change ownership to root after live migration

Hi, I've 3 compute nodes with a shared Gluster filesystem mounted on /var/lib/nova/instances on all 3 nodes. After I start a VM I see the usual files in the shared file system:

[root@compute ~]# ll /var/lib/nova/instances/
total 7
drwxr-xr-x 2 nova nova   75 Jun 12 09:40 4f4ed899-a485-401e-aae7-8029068a6be8
drwxr-xr-x 2 nova nova  106 Jun 12 09:40 _base
drwxr-xr-x 2 nova nova 4102 Jun 12 09:40 locks
[root@compute ~]# ll /var/lib/nova/instances/4f4ed899-a485-401e-aae7-8029068a6be8/
total 4180
-rw-rw---- 1 nova kvm    17219 Jun 12 09:40 console.log
-rw-r--r-- 1 qemu kvm  4259840 Jun 12 09:41 disk
-rw-r--r-- 1 nova nova      79 Jun 12 09:40 disk.info
-rw-r--r-- 1 nova nova    1697 Jun 12 09:40 libvirt.xml

libvirt.xml

with correct ownerships. Then, I try a live-migration, which apparently goes well:

[root@controller-01 ~]# nova list
+--------------------------------------+------+--------+------------+-------------+----------------+
| ID                                   | Name | Status | Task State | Power State | Networks       |
+--------------------------------------+------+--------+------------+-------------+----------------+
| 4f4ed899-a485-401e-aae7-8029068a6be8 | test | ACTIVE | -          | Running     | admin=10.0.1.4 |
+--------------------------------------+------+--------+------------+-------------+----------------+
[root@controller-01 ~]# nova show test|grep host
| OS-EXT-SRV-ATTR:host                 | compute.cloud.pd.infn.it                                 |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute.cloud.pd.infn.it                                 |
| hostId                               | aacf08e590c7dbfebc1c211dd94fb29ea89b002b2422fdcdb7564d59 |
[root@controller-01 ~]# nova live-migration test compute-02.cloud.pd.infn.it
[...]
[root@controller-01 ~]# nova show test|grep host
| OS-EXT-SRV-ATTR:host                 | compute-02.cloud.pd.infn.it                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | compute-02.cloud.pd.infn.it                              |
| hostId                               | ae17651af3bd9379b458b1756e08799c22a83c564255297ce2454843 |

|

But, after migration the ownership of some files has changed:

[root@compute ~]# ll /var/lib/nova/instances/4f4ed899-a485-401e-aae7-8029068a6be8/
total 4165
-rw-rw---- 1 root root    2221 Jun 12 10:03 console.log
-rw-r--r-- 1 root root 4259840 Jun 12 09:41 disk
-rw-r--r-- 1 nova nova      79 Jun 12 09:40 disk.info
-rw-r--r-- 1 nova nova    1697 Jun 12 10:03 libvirt.xml

libvirt.xml

and the VM is now in read-only mode.

Could you please help me in debugging this ?

thanks,

Alvise