yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #68395
[Bug 1722443] [NEW] Incorrect checking shared storages on resizing VM instances
Public bug reported:
Description
===========
When resizing instances, eventhough a destination host is different with a source host and they don't have a shared storage, nova deal with it as a shared storage.
The reason is that the source host and destination have the same host_ip i.e 127.0.0.1
So the source and dest IP are the same, nova think that they are on the same filesystem.
(https://github.com/openstack/nova/blob/stable/ocata/nova/virt/libvirt/driver.py#L7250)
shared_storage = (dest == self.get_host_ip_addr()
However, in fact, the source host is different with destination host
127.0.0.1 is the default config of my_ip in nova.conf
(https://github.com/openstack/nova/blob/stable/ocata/nova/conf/netconf.py#L26 and https://github.com/openstack/oslo.utils/blob/master/oslo_utils/netutils.py#L301)
Steps to reproduce
==================
Preconditions
* Did NOT use shared storages.
* checked there is no default gateway in 2 hypepvisor hosts. (If there is, remove it.)
[root@compute2 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.80.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno2
link-local 0.0.0.0 255.255.0.0 U 1003 0 0 eno2
[root@compute2 ~]#
1. I installed OpenStack with the 2 compute nodes
2. then I checked the hypervisor host_ip
# nova hypervisor-show compute1 | grep host_ip
| host_ip | 127.0.0.1 |
# nova hypervisor-show compute2 | grep host_ip
| host_ip | 127.0.0.1 |
3. create a vm
4. resize the vm
Expected result
===============
Resize should be failed.
Actual result
=============
Resize go with incorrect images
Environment
===========
1. Exact version of OpenStack you are running.
Ocata, (Pike and master may be same)
2. Which hypervisor did you use?
Libvirt + KVM
2. Which storage type did you use?
N/A (lvm)
3. Which networking type did you use?
Neutron
Logs & Configs
==============
There is no my_ip value of nova.conf in all compute nodes
# ssh compute1 grep ^my_ip /etc/nova/nova.conf
# ssh compute2 grep ^my_ip /etc/nova/nova.conf
#
allow_resize_to_same_host should be false
# ssh compute1 grep ^allow_resize_to_same_host /etc/nova/nova.conf
allow_resize_to_same_host=False
** Affects: nova
Importance: Undecided
Assignee: Wonil Choi (wonil22)
Status: New
** Changed in: nova
Assignee: (unassigned) => Wonil Choi (wonil22)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1722443
Title:
Incorrect checking shared storages on resizing VM instances
Status in OpenStack Compute (nova):
New
Bug description:
Description
===========
When resizing instances, eventhough a destination host is different with a source host and they don't have a shared storage, nova deal with it as a shared storage.
The reason is that the source host and destination have the same host_ip i.e 127.0.0.1
So the source and dest IP are the same, nova think that they are on the same filesystem.
(https://github.com/openstack/nova/blob/stable/ocata/nova/virt/libvirt/driver.py#L7250)
shared_storage = (dest == self.get_host_ip_addr()
However, in fact, the source host is different with destination host
127.0.0.1 is the default config of my_ip in nova.conf
(https://github.com/openstack/nova/blob/stable/ocata/nova/conf/netconf.py#L26 and https://github.com/openstack/oslo.utils/blob/master/oslo_utils/netutils.py#L301)
Steps to reproduce
==================
Preconditions
* Did NOT use shared storages.
* checked there is no default gateway in 2 hypepvisor hosts. (If there is, remove it.)
[root@compute2 ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
128.80.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno2
link-local 0.0.0.0 255.255.0.0 U 1003 0 0 eno2
[root@compute2 ~]#
1. I installed OpenStack with the 2 compute nodes
2. then I checked the hypervisor host_ip
# nova hypervisor-show compute1 | grep host_ip
| host_ip | 127.0.0.1 |
# nova hypervisor-show compute2 | grep host_ip
| host_ip | 127.0.0.1 |
3. create a vm
4. resize the vm
Expected result
===============
Resize should be failed.
Actual result
=============
Resize go with incorrect images
Environment
===========
1. Exact version of OpenStack you are running.
Ocata, (Pike and master may be same)
2. Which hypervisor did you use?
Libvirt + KVM
2. Which storage type did you use?
N/A (lvm)
3. Which networking type did you use?
Neutron
Logs & Configs
==============
There is no my_ip value of nova.conf in all compute nodes
# ssh compute1 grep ^my_ip /etc/nova/nova.conf
# ssh compute2 grep ^my_ip /etc/nova/nova.conf
#
allow_resize_to_same_host should be false
# ssh compute1 grep ^allow_resize_to_same_host /etc/nova/nova.conf
allow_resize_to_same_host=False
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1722443/+subscriptions
Follow ups