[Openstack] [openstack] server delete error--- Failed to deallocate network for instance

huanglingyan (A) huanglingyan2 at huawei.com
Tue Nov 21 08:52:37 UTC 2017


Hi,

I am trying to use devstack to launch an all-in-one openstack environment on my machine. Unfortunately it says error when I delete an instance.
I can create an instance successfully and ping&ssh also works. 'openstack server list' shows active. When I try to delete it, no messages occur on the screen. However, it shows the instance is in 'ERROR' state when I check 'openstack server list'. When I retry delete the instance which is now in ERROR state, the result is the same. Then I try to rescue the instance, but still failed.
When create the server:
[cid:image004.jpg at 01D362E9.21530FB0]
When delete the server:
[cid:image008.jpg at 01D362E9.21530FB0]
When rescue & unrescue the server:
[cid:image010.jpg at 01D362E9.21530FB0]

Log shows : Failed to deallocate network for instance. Error: Remote error: InvalidRequestError Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.
ubuntu nova-compute[44206]: [u'Traceback (most recent call last):\n', u'  File "/opt/stack/stack/nova/nova/conductor/manager.py", line 123, in _object_dispatch\n    return getattr(target, method)(*args, **kwargs)\n', u'  File "/opt/stack/.local/lib/python2.7/site-packages/oslo_versionedobjects/base.py", l    ine 184, in wrapper\n    result = fn(cls, context, *args, **kwargs)\n', u'  File "/opt/stack/stack/nova/nova/objects/virtual_interface.py", line 112, in delete_b    y_instance_uuid\n    db.virtual_interface_delete_by_instance(context, instance_uuid)\n', u'  File "/opt/stack/stack/nova/nova/db/api.py", line 716, in virtual_in    terface_delete_by_instance\n    return IMPL.virtual_interface_delete_by_instance(context, instance_id)\n', u'  File "/opt/stack/stack/nova/nova/db/sqlalchemy/api    .py", line 179, in wrapper\n    return f(*args, **kwargs)\n', u'  File "/opt/stack/stack/nova/nova/db/sqlalchemy/api.py", line 250, in wrapped\n    return f(cont    ext, *args, **kwargs)\n', u'  File "/opt/stack/stack/nova/nova/db/sqlalchemy/api.py", line 1691, in virtual_interface_delete_by_instance\n    filter_by(instance_    uuid=instance_uuid).\\\n', u'  File "/opt/stack/.local/lib/python2.7/site-packages/oslo_db/sqlalchemy/orm.py", line 32, in soft_delete\n    synchronize_session=s    ynchronize_session)\n', u'  File "/opt/stack/.local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 3366, in update\n    update_op.exec_()\n', u'  File "/opt/stack/.local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1308, in exec_\n    self._do_pre_synchronize()\n', u'  File "/opt/stack/.lo    cal/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 1384, in _do_pre_synchronize\n    "Could not evaluate current criteria in Python. "\n', u"In    validRequestError: Could not evaluate current criteria in Python. Specify 'fetch' or False for the synchronize_session parameter.\n"]. [cid:image012.jpg at 01D362E9.21530FB0]
Traceback shows
[cid:image013.jpg at 01D362E9.21530FB0]
It sames like the sqlalchemy report an error.
I change the synchronize_session parameter from 'evaluate' to 'fetch' as the log says. Then the server could be deleted.
[cid:image014.jpg at 01D362E9.21530FB0]
However,I still don't know what actually causes the problem.

My environments:
         Server: ARMv8 architecture server,
         OS: Ubuntu 16.04,
         Devstack: stable/pike,
         Sqlalchemy: 1.2.0b2
         Sqlalchemy-migrate: 0.11.0

What I did:
Check the log in detail, I find that instance has been deleted successfully in hypervisor with the message 'Took 1.10 seconds to destroy the instance on the hypervisor.' Next it try to deallocate the network for instance but failed. Therefore vm_state is set to ERROR. When deallocate the network, it uses rpc to call the sqlalchemy and get an error message in return.

I have checked mysql, it works well. All query request have responses.

As stack user:
Try ./unstack.sh and ./stack.sh to reinstall the devstack. The problem is still in.
Try to reinstall mysql and then ./unstack.sh & ./stack.sh.  Still doesn't work.
/opt/stack/Local.conf:     [[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
HOST_IP=10.67.247.28
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=true
SCREEN_LOGDIR=/opt/stack/logs
LOGDAYS=2
LOG_COLOR=true
CINDER_BRANCH=stable/pike
GLANCE_BRANCH=stable/pike
HORIZON_BRANCH=stable/pike
KEYSTONE_BRANCH=stable/pike
KEYSTONECLIENT_BRANCH=stable/pike
NOVA_BRANCH=stable/pike
NOVACLIENT_BRANCH=stable/pike
NEUTRON_BRANCH=stable/pike
SWIFT_BRANCH=stable/pike

I must get something wrong, please point it out for me.

Thank you in advance,


Lingyan Huang

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.jpg
Type: image/jpeg
Size: 13811 bytes
Desc: image004.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.jpg
Type: image/jpeg
Size: 9661 bytes
Desc: image008.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.jpg
Type: image/jpeg
Size: 7110 bytes
Desc: image010.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image012.jpg
Type: image/jpeg
Size: 11300 bytes
Desc: image012.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image013.jpg
Type: image/jpeg
Size: 95784 bytes
Desc: image013.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image014.jpg
Type: image/jpeg
Size: 5782 bytes
Desc: image014.jpg
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20171121/bcf9a189/attachment-0005.jpg>


More information about the Openstack mailing list