yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #54590
[Bug 1489853] Re: when hard-reboot a instance with serial-port multiple times, instance will not start for port exhausted
** Changed in: nova/liberty
Status: Confirmed => Won't Fix
--
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/1489853
Title:
when hard-reboot a instance with serial-port multiple times, instance
will not start for port exhausted
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) liberty series:
Won't Fix
Status in OpenStack Compute (nova) mitaka series:
In Progress
Bug description:
My running environment is
openstack-nova-compute-2015.1.0-3.el7.noarch
python-nova-2015.1.0-3.el7.noarch
openstack-nova-novncproxy-2015.1.0-3.el7.noarch
openstack-nova-conductor-2015.1.0-3.el7.noarch
openstack-nova-api-2015.1.0-3.el7.noarch
openstack-nova-console-2015.1.0-3.el7.noarch
openstack-nova-scheduler-2015.1.0-3.el7.noarch
openstack-nova-serialproxy-2015.1.0-3.el7.noarch
openstack-nova-common-2015.1.0-3.el7.noarch
In my nova.conf ,port_range=20000:20020
I boot a instance with two serial-port ,it works well.
When i hard reboot this instance muti-times,it can't start and its status is shut-off
The log is below :
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/d
river.py", line 3830, in _create_serial_console_devices
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher console.listen_host))
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_concurrency/lo
ckutils.py", line 445, in inner
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher return f(*args, **kwargs)
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/console/serial
.py", line 82, in acquire_port
2015-08-28 17:06:46.635 7258 TRACE oslo_messaging.rpc.dispatcher raise exception.SocketPortRangeExhaustedException(host=h
ost)
after check code,i thought the hard-reboot code process has some
problem。
The function release_port() is only in function cleanup()
When a instance is deleted ,function cleanup() is called
But when a instance is hard-boot,in _hard_reboot function it only call
_destroy().
and then it call _get_guest_xml() and in it acquire_port() function is
called.
so the instance will always acquire port but not release. at last port
will be exhausted in logic
I think in _hard_reboot() of libvrit/driver.py,it should be edited
below:
.....
self._destroy(instance)
if CONF.serial_console.enabled:
serials = self._get_serial_ports_from_instance(instance)
for hostname, port in serials:
serial_console.release_port(host=hostname, port=port)
....
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1489853/+subscriptions
References