[Yahoo-eng-team] [Bug 1791243] [NEW] launch-instance-from-volume.rst is not latest version
Public bug reported: We lost some changes of doc/source/user/launch-instance-from-volume.rst in openstack-manuals after ocata We need upload the latest doc from manuals repo [1], and merge all later changes[2][3][4] into this doc. [1] I4a556b6a596a28c0350c7411c147459c3f06d084 [2] Ifa2e2bbb4c5f51f13d1a5832bd7dbf9f690fcad7 [3] Ida4cf70a7e53fd37ceeadb5629e3221072219689 [4] Ifb99e727110c4904a85bc4a13366c2cae300b8df ** Affects: nova Importance: Undecided Status: New -- 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/1791243 Title: launch-instance-from-volume.rst is not latest version Status in OpenStack Compute (nova): New Bug description: We lost some changes of doc/source/user/launch-instance-from- volume.rst in openstack-manuals after ocata We need upload the latest doc from manuals repo [1], and merge all later changes[2][3][4] into this doc. [1] I4a556b6a596a28c0350c7411c147459c3f06d084 [2] Ifa2e2bbb4c5f51f13d1a5832bd7dbf9f690fcad7 [3] Ida4cf70a7e53fd37ceeadb5629e3221072219689 [4] Ifb99e727110c4904a85bc4a13366c2cae300b8df To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1791243/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1787331] [NEW] The eventlet.monkey_patch is not valid under uwsgi mode
Public bug reported: There was a eventlet.monkey_patch [1] when we launch a nova process(like nova-api, nova-compute), but it's invalid under the uwsgi mode. So, we need do same monkey_patch when we setup uwsgi appilication. [1] https://github.com/openstack/nova/blob/233ea58/nova/cmd/__init__.py#L26 ** Affects: nova Importance: Undecided Status: New -- 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/1787331 Title: The eventlet.monkey_patch is not valid under uwsgi mode Status in OpenStack Compute (nova): New Bug description: There was a eventlet.monkey_patch [1] when we launch a nova process(like nova-api, nova-compute), but it's invalid under the uwsgi mode. So, we need do same monkey_patch when we setup uwsgi appilication. [1] https://github.com/openstack/nova/blob/233ea58/nova/cmd/__init__.py#L26 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1787331/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1784604] [NEW] Redundant join in _anchors_for_sharing_providers
Public bug reported: There is a redundant join when we want to get id from _anchors_for_sharing_providers. The last outerjoin is used to get the rp.UUID according rp.id [1], if we set get_id=True, we no longer need this outer join. [1] https://github.com/openstack/nova/blob/3ce7fa5/nova/api/openstack/placement/objects/resource_provider.py#L476-L479 ** Affects: nova Importance: Undecided Status: New -- 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/1784604 Title: Redundant join in _anchors_for_sharing_providers Status in OpenStack Compute (nova): New Bug description: There is a redundant join when we want to get id from _anchors_for_sharing_providers. The last outerjoin is used to get the rp.UUID according rp.id [1], if we set get_id=True, we no longer need this outer join. [1] https://github.com/openstack/nova/blob/3ce7fa5/nova/api/openstack/placement/objects/resource_provider.py#L476-L479 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1784604/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1782690] [NEW] Consider forbidden traits in early exit of AllocationCandidates
Public bug reported: Current, if there aren't any providers that have any of the required traits, just exit early in _get_by_one_request. But we should also consider the forbidden traits to optimize this attempt at a quick return. https://github.com/openstack/nova/blob/fdd4253/nova/api/openstack/placement/objects/resource_provider.py#L3948-L3956 ** Affects: nova Importance: Undecided Status: New ** Tags: placement -- 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/1782690 Title: Consider forbidden traits in early exit of AllocationCandidates Status in OpenStack Compute (nova): New Bug description: Current, if there aren't any providers that have any of the required traits, just exit early in _get_by_one_request. But we should also consider the forbidden traits to optimize this attempt at a quick return. https://github.com/openstack/nova/blob/fdd4253/nova/api/openstack/placement/objects/resource_provider.py#L3948-L3956 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1782690/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1776373] [NEW] Invalid obj_make_compatible test case
Public bug reported: (1) We use obj_to_primitive() to generate the primitive obj, the origin obj value is primitive['nova_object.data'], so, we need transfer primitive to obj data before obj_make_compatible called. (2) Should fix some typo("serial_listen_addr=" --> "serial_listen_addr") in https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L235 https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L240 ** Affects: nova Importance: Undecided Assignee: Yikun Jiang (yikunkero) Status: In Progress -- 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/1776373 Title: Invalid obj_make_compatible test case Status in OpenStack Compute (nova): In Progress Bug description: (1) We use obj_to_primitive() to generate the primitive obj, the origin obj value is primitive['nova_object.data'], so, we need transfer primitive to obj data before obj_make_compatible called. (2) Should fix some typo("serial_listen_addr=" --> "serial_listen_addr") in https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L235 https://github.com/openstack/nova/blob/master/nova/tests/unit/objects/test_migrate_data.py#L240 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1776373/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1774556] [NEW] Invalid raise in test_compute_mgr
Public bug reported: The test code in [1][2] uses `raise` statement without any parameter. It is not a valid python construct if used outside of an `expect` block. The test does not fail on this as this codepath never executed. Also see the reference bug[3]. [1] https://github.com/openstack/nova/blob/a7994ec3559cede764a6ff04f7fddc5a5b6d63ea/nova/tests/unit/compute/test_compute_mgr.py#L5851 [2] https://github.com/openstack/nova/blob/a7994ec3559cede764a6ff04f7fddc5a5b6d63ea/nova/tests/unit/compute/test_compute_mgr.py#L5872 [3]https://bugs.launchpad.net/nova/+bug/1754409 ** Affects: nova Importance: Undecided Status: New ** Tags: testing ** Tags added: testing -- 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/1774556 Title: Invalid raise in test_compute_mgr Status in OpenStack Compute (nova): New Bug description: The test code in [1][2] uses `raise` statement without any parameter. It is not a valid python construct if used outside of an `expect` block. The test does not fail on this as this codepath never executed. Also see the reference bug[3]. [1] https://github.com/openstack/nova/blob/a7994ec3559cede764a6ff04f7fddc5a5b6d63ea/nova/tests/unit/compute/test_compute_mgr.py#L5851 [2] https://github.com/openstack/nova/blob/a7994ec3559cede764a6ff04f7fddc5a5b6d63ea/nova/tests/unit/compute/test_compute_mgr.py#L5872 [3]https://bugs.launchpad.net/nova/+bug/1754409 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1774556/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1765385] [NEW] Support inherit api samples in ApiSampleTestBase
Public bug reported: Avoid to add more redundant sample files, we propose to support inherit api samples in ApiSampleTestBase. The latest api samples file will be chosen when the user enable the _use_inherit_api_samples flag. For example, We have [2.62, 2.58, 2.51, 2.21] api, first, 2.62 will be chosen, but if the 2.62 sample file doesn't exist, and then 2.58 will be chosen, and then 2.51, and so on. ** Affects: nova Importance: Undecided Assignee: Yikun Jiang (yikunkero) Status: In Progress -- 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/1765385 Title: Support inherit api samples in ApiSampleTestBase Status in OpenStack Compute (nova): In Progress Bug description: Avoid to add more redundant sample files, we propose to support inherit api samples in ApiSampleTestBase. The latest api samples file will be chosen when the user enable the _use_inherit_api_samples flag. For example, We have [2.62, 2.58, 2.51, 2.21] api, first, 2.62 will be chosen, but if the 2.62 sample file doesn't exist, and then 2.58 will be chosen, and then 2.51, and so on. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1765385/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1741220] [NEW] raise 500 in test_resize_server_negative_invalid_state
vent=values['event']) InstanceActionEventNotFound: Event compute_terminate_instance not found for action id 3 2017-12-29 06:45:21,779 ERROR [nova.api.openstack.wsgi] Unexpected exception in API method Traceback (most recent call last): File "nova/api/openstack/wsgi.py", line 803, in wrapped return f(*args, **kwargs) File "nova/api/openstack/compute/servers.py", line 831, in delete self._delete(req.environ['nova.context'], req, id) File "nova/api/openstack/compute/servers.py", line 685, in _delete self.compute_api.delete(context, instance) File "nova/compute/api.py", line 201, in inner return function(self, context, instance, *args, **kwargs) File "nova/compute/api.py", line 209, in _wrapped return fn(self, context, instance, *args, **kwargs) File "nova/compute/api.py", line 149, in inner return f(self, context, instance, *args, **kw) File "nova/compute/api.py", line 2111, in delete self._delete_instance(context, instance) File "nova/compute/api.py", line 2102, in _delete_instance task_state=task_states.DELETING) File "nova/compute/api.py", line 1897, in _delete cb(context, instance, bdms) File "nova/compute/api.py", line 2065, in _do_delete delete_type='delete') File "nova/compute/rpcapi.py", line 1041, in terminate_instance reservations=reservations) File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 174, in call retry=self.retry) File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/oslo_messaging/transport.py", line 131, in _send timeout=timeout, retry=retry) File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_fake.py", line 219, in send return self._send(target, ctxt, message, wait_for_reply, timeout) File "/home/zuul/src/git.openstack.org/openstack/nova/.tox/functional/local/lib/python2.7/site-packages/oslo_messaging/_drivers/impl_fake.py", line 206, in _send raise failure InstanceActionEventNotFound: Event compute_terminate_instance not found for action id 3 2017-12-29 06:45:21,780 INFO [nova.api.openstack.wsgi] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2017-12-29 06:45:21,782 INFO [nova.api.openstack.requestlog] 127.0.0.1 "DELETE /v2.1/6f70656e737461636b20342065766572/servers/f39a6060-4612-4855-8de1-8b9aa9d12df3" status: 500 len: 216 microversion: 2.1 time: 0.607800 2017-12-29 06:45:22,001 WARNING [nova.service] Service killed that has no database entry }}} Traceback (most recent call last): File "nova/tests/functional/test_servers.py", line 702, in test_resize_server_negative_invalid_state self._delete_server(created_server_id) File "nova/tests/functional/test_servers.py", line 102, in _delete_server self.api.delete_server(server_id) File "nova/tests/functional/api/client.py", line 286, in delete_server return self.api_delete('/servers/%s' % server_id) File "nova/tests/functional/api/client.py", line 239, in api_delete return APIResponse(self.api_request(relative_uri, **kwargs)) File "nova/tests/functional/api/client.py", line 202, in api_request response=response) nova.tests.functional.api.client.OpenStackApiException: Unexpected status code: {"computeFault": {"code": 500, "message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n"}} ** Affects: nova Importance: Undecided Assignee: Yikun Jiang (yikunkero) Status: In Progress -- 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/1741220 Title: raise 500 in test_resize_server_negative_invalid_state Status in OpenStack Compute (nova): In Progress Bug description: Description === We reproduce this bug in https://review.openstack.org/#/c/530429 In test_resize_server_negative_invalid_state 1. first, the confirm resize action are recorded: https://github.com/openstack/nova/blob/2fc5d27332023a68e0a3977305a594f061f99cc8/nova/compute/api.py#L1950 2. and then a delete action are recorded. the import thing is: the delete action and the resize action have SAME instance uuid and same requst id. But when we get the action in here: https://github.com/openstack/nova/blob/2fc5d27332023a68e0a3977305a594f061f99cc8/nova/db/sqlalchemy/api.py#L57
[Yahoo-eng-team] [Bug 1739571] [NEW] Can't delete root resource provider because of the self foreign key
ython2.7/dist-packages/sqlalchemy/engine/base.py", line 1182, in _execute_context 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack context) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 470, in do_execute 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack cursor.execute(statement, parameters) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 166, in execute 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack result = self._query(query) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/cursors.py", line 322, in _query 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack conn.query(q) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 856, in query 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack self._affected_rows = self._read_query_result(unbuffered=unbuffered) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1057, in _read_query_result 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack result.read() 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1340, in read 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack first_packet = self.connection._read_packet() 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 1014, in _read_packet 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack packet.check_error() 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 393, in check_error 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack err.raise_mysql_exception(self._data) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack raise errorclass(errno, errval) 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack DBReferenceError: (pymysql.err.IntegrityError) (1451, u'Cannot delete or update a parent row: a foreign key constraint fails (`nova_api`.`resource_providers`, CONSTRAINT `resource_providers_ibfk_1` FOREIGN KEY (`root_provider_id`) REFERENCES `resource_providers` (`id`))') [SQL: u'DELETE FROM resource_providers WHERE resource_providers.id = %(id_1)s'] [parameters: {u'id_1': 3}] 2017-12-21 01:14:12.019 23740 ERROR nova.api.openstack 2017-12-21 01:14:12.030 23740 INFO nova.api.openstack [req-9975de8b-6784-4555-981c-fb57314535bc admin admin] http://10.76.6.31/placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e31 returned with HTTP 500 2017-12-21 01:14:12.110 23740 DEBUG nova.api.openstack.wsgi [req-9975de8b-6784-4555-981c-fb57314535bc admin admin] Returning 500 to user: The server has either erred or is incapable of performing the requested operation. __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1029 2017-12-21 01:14:12.112 23740 INFO nova.api.openstack.placement.requestlog [req-9975de8b-6784-4555-981c-fb57314535bc admin admin] 10.8.4.18 "DELETE /placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e31" status: 500 len: 128 microversion: 1.15 [pid: 23740|app: 0|req: 248/496] 10.8.4.18 () {74 vars in 1688 bytes} [Thu Dec 21 01:14:11 2017] DELETE /placement/resource_providers/7d2590ae-fb85-4080-9306-058b4c915e31 => generated 128 bytes in 220 msecs (HTTP/1.1 500) 4 headers in 191 bytes (1 switches on core 0) ** Affects: nova Importance: Undecided Assignee: Yikun Jiang (yikunkero) Status: In Progress -- 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/1739571 Title: Can't delete root resource provider because of the self foreign key Status in OpenStack Compute (nova): In Progress Bug description: Description === Current, we can't delete the root resource provider record because it has a foreign key reference it id on itself, we will get back DBReferenceError, the reason is "Cannot delete or update a parent row: a foreign key constraint fails". NOTE: it is a essential case(just create and delete), but it doesn't be triggered in test case because SQLLite allow us to delete it, but we found this error in MYSQL database. Steps to reproduce == 1. First create a resource provider without parent u
[Yahoo-eng-team] [Bug 1734012] [NEW] Handle exception in get_instance_sorted when scattering gather results from all cells.
Public bug reported: Description === Currently, when we get servers list in multi cell, we scatter gather results from cells, but if we get back exception or timeout from cell, we will get 500 error finally. We should handle raise or timeout after getting back all results. Maybe we could just skip the error result like quota stuff: https://github.com/openstack/nova/blob/e9ce5c4c95edc869ab2cf82ca0733a2821c384ad/nova/quota.py#L1865 Steps to reproduce == 1. raise some error exception when gather results. 2. get server list curl -g -i -X GET http://XXX/compute/v2.1/servers -H "OpenStack-API-Version: compute 2.53" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.53" -H "X-Auth-Token: $TOKEN" HTTP/1.1 500 Internal Server Error Date: Wed, 22 Nov 2017 07:11:39 GMT Server: Apache/2.4.18 (Ubuntu) OpenStack-API-Version: compute 2.53 X-OpenStack-Nova-API-Version: 2.53 Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version Content-Type: application/json; charset=UTF-8 Content-Length: 193 x-openstack-request-id: req-429c02e7-84db-4c2d-98fd-dd1af0186383 x-compute-request-id: req-429c02e7-84db-4c2d-98fd-dd1af0186383 Connection: close {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n", "code": 500}} 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 336, in wrapped 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 181, in wrapper 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/validation/__init__.py", line 181, in wrapper 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions return func(*args, **kwargs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 152, in index 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions servers = self._get_servers(req, is_detail=False) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 308, in _get_servers 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions sort_keys=sort_keys, sort_dirs=sort_dirs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/api.py", line 2394, in get_all 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions context, filters, limit, marker, fields, sort_keys, sort_dirs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/instance_list.py", line 251, in get_instance_objects_sorted 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions expected_attrs) 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/objects/instance.py", line 1196, in _make_instance_list 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions for db_inst in db_inst_list: 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/compute/instance_list.py", line 228, in get_instances_sorted 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions for i in heapq.merge(*results.values()): 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions File "/usr/lib/python2.7/heapq.py", line 373, in merge 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions for itnum, it in enumerate(map(iter, iterables)): 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions TypeError: 'object' object is not iterable 2017-11-22 02:11:39.925 9792 ERROR nova.api.openstack.extensions 2017-11-22 02:11:39.935 9792 INFO nova.api.openstack.wsgi [req-429c02e7-84db-4c2d-98fd-dd1af0186383 - admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2017-11-22 02:11:39.937 9792 DEBUG nova.api.openstack.wsgi [req-429c02e7-84db-4c2d-98fd-dd1af0186383 - admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1029 2017-11-22 02:11:39.938 9792 INFO nova.api.openstack.requestlog [req-429c02e7-84db-4c2d-98fd-dd1af0186383 - admin] 10.76.6.31 "GET /compute/v2.1/servers" status: 500 len: 193 microversion: 2.53 time: 0.746751 **
[Yahoo-eng-team] [Bug 1733746] [NEW] Failed to get flavors(raise 500) with a domain scope(without project_id).
Public bug reported: Description === Failed to get flavors(raise a 500 error) with a domain scope or unscope token(without project_id). https://docs.openstack.org/keystone/pike/admin/identity-tokens.html #domain-scoped-tokens Steps to reproduce == 1. Get a unscope token or domain token. TOKEN=`curl -i -X POST http://10.76.6.31/identity/v3/auth/tokens -H "Accept: application/json" -H "Content-Type: application/json" -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"domain":{"name":"default"},"name":"admin","password":"xxx"}' | grep X-Subject-Token | awk '{ print $2 }’` 2. Get flavors. curl -g -i -X GET http://10.76.6.31/compute/v2.1/flavors/detail -H "OpenStack-API-Version: compute 2.53" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.53" -H "X-Auth-Token: $TOKEN" Expected result === Get flavors back. Actual result = HTTP/1.1 500 Internal Server Error Date: Fri, 17 Nov 2017 09:22:38 GMT Server: Apache/2.4.18 (Ubuntu) OpenStack-API-Version: compute 2.53 X-OpenStack-Nova-API-Version: 2.53 Vary: OpenStack-API-Version,X-OpenStack-Nova-API-Version Content-Type: application/json; charset=UTF-8 Content-Length: 193 x-openstack-request-id: req-f77858f8-dd77-4dcd-825a-aec012cabcfc x-compute-request-id: req-f77858f8-dd77-4dcd-825a-aec012cabcfc Connection: close {"computeFault": {"message": "Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.\n", "code": 500}} Logs & Configs == 2017-11-19 20:19:03.567 9606 INFO sqlalchemy.engine.base.Engine [req-c1765f1e-786a-4457-9c45-2f8c3897722b - admin] ROLLBACK 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions [req-c1765f1e-786a-4457-9c45-2f8c3897722b - admin] Unexpected exception in API method: TypeError: 'in ' requires string as left operand, not NoneType 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions Traceback (most recent call last): 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/extensions.py", line 336, in wrapped 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions return f(*args, **kwargs) 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/flavors.py", line 48, in detail 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions return self._view_builder.detail(req, limited_flavors) 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/flavors.py", line 61, in detail 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions return self._list_view(self.show, request, flavors, coll_name) 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/flavors.py", line 74, in _list_view 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions flavor_list = [func(request, flavor)["flavor"] for flavor in flavors] 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/compute/views/flavors.py", line 47, in show 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions self._collection_name), 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/common.py", line 390, in _get_links 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions "href": self._get_href_link(request, identifier, collection_name), 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/common.py", line 413, in _get_href_link 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions self._get_project_id(request), 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions File "/opt/stack/nova/nova/api/openstack/common.py", line 383, in _get_project_id 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions if project_id in request.url:#project_id and project_id in request.url: 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions TypeError: 'in ' requires string as left operand, not NoneType 2017-11-19 20:19:03.571 9606 ERROR nova.api.openstack.extensions 2017-11-19 20:19:03.598 9606 INFO nova.api.openstack.wsgi [req-c1765f1e-786a-4457-9c45-2f8c3897722b - admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. 2017-11-19 20:19:03.600 9606 DEBUG nova.api.openstack.wsgi [req-c1765f1e-786a-4457-9c45-2f8c3897722b - admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible. __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1029 2017-11-19
[Yahoo-eng-team] [Bug 1719561] [NEW] Instance action's updated_at' doesn't updated when action created or action event updated.
Public bug reported: Description === When we do some operation on instances, will record some instance action(such as 'create') in 'instance_actions' table, and some sub-event will record(such as compute__do_build_and_run_instance) in 'instance_actions_events' table. we need update the instance action's updated_at when instance action events are created. Steps to reproduce == 1. Create a instances nova boot --image 81e58b1a-4732-4255-b4f8-c844430485d2 --flavor 1 yikun 2. Look up record in instance_actions and instance_actions_events mysql> select * from instance_actions\G *** 1. row *** created_at: 2017-09-25 07:16:07 updated_at: NULL---> here deleted_at: NULL id: 48 action: create instance_uuid: fdd52ec6-100b-4a25-a5db-db7c5ad17fa8 request_id: req-511dee3e-8951-4360-b72b-3a7ec091e7c8 user_id: 1687f2a66222421790475760711e40e5 project_id: 781b620d86534d549dd64902674c0f69 start_time: 2017-09-25 07:16:05 finish_time: NULL message: NULL deleted: 0 mysql> select * from instance_actions_events\G *** 1. row *** created_at: 2017-09-25 07:16:07 updated_at: 2017-09-25 07:16:22 deleted_at: NULL id: 1 action: create instance_uuid: fdd52ec6-100b-4a25-a5db-db7c5ad17fa8 request_id: req-511dee3e-8951-4360-b72b-3a7ec091e7c8 user_id: 1687f2a66222421790475760711e40e5 project_id: 781b620d86534d549dd64902674c0f69 start_time: 2017-09-25 07:16:05 finish_time: NULL message: NULL deleted: 0 Expected result === Update the instance action's updated_at when instance action events are started or finished or instance action created. Actual result = without instance aciton's updated_at ** Affects: nova Importance: Undecided Status: New -- 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/1719561 Title: Instance action's updated_at' doesn't updated when action created or action event updated. Status in OpenStack Compute (nova): New Bug description: Description === When we do some operation on instances, will record some instance action(such as 'create') in 'instance_actions' table, and some sub-event will record(such as compute__do_build_and_run_instance) in 'instance_actions_events' table. we need update the instance action's updated_at when instance action events are created. Steps to reproduce == 1. Create a instances nova boot --image 81e58b1a-4732-4255-b4f8-c844430485d2 --flavor 1 yikun 2. Look up record in instance_actions and instance_actions_events mysql> select * from instance_actions\G *** 1. row *** created_at: 2017-09-25 07:16:07 updated_at: NULL---> here deleted_at: NULL id: 48 action: create instance_uuid: fdd52ec6-100b-4a25-a5db-db7c5ad17fa8 request_id: req-511dee3e-8951-4360-b72b-3a7ec091e7c8 user_id: 1687f2a66222421790475760711e40e5 project_id: 781b620d86534d549dd64902674c0f69 start_time: 2017-09-25 07:16:05 finish_time: NULL message: NULL deleted: 0 mysql> select * from instance_actions_events\G *** 1. row *** created_at: 2017-09-25 07:16:07 updated_at: 2017-09-25 07:16:22 deleted_at: NULL id: 1 action: create instance_uuid: fdd52ec6-100b-4a25-a5db-db7c5ad17fa8 request_id: req-511dee3e-8951-4360-b72b-3a7ec091e7c8 user_id: 1687f2a66222421790475760711e40e5 project_id: 781b620d86534d549dd64902674c0f69 start_time: 2017-09-25 07:16:05 finish_time: NULL message: NULL deleted: 0 Expected result === Update the instance action's updated_at when instance action events are started or finished or instance action created. Actual result = without instance aciton's updated_at To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1719561/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp
[Yahoo-eng-team] [Bug 1718409] [NEW] Failed to reschedule instance in cell.
Public bug reported: Description === When instance rescheduling happens in cell: 1. Nova compute casts to the build_instances method in cell1 conductor. 2. In cell1 conductor, build_instances method calls the scheduler_client.select_destinations method, it calls to scheduler for getting scheduled host **without cell0 targeting**, and then, wait scheduler reply. Nobody could get this scheduler message in cell1 mq, because Scheduler just only lisening to the api cell(cell0) mq. flow like this: compute --> (reschedule) --> cell1-conductor --> (call rpc to CELL1) --> timeout It seems conductor shouldn't call this message to CELL1 mq. Maybe, we might transfer the mq connection to api cell mq(target cell0) before call. After this, the flow as blow: compute --> (reschedule) --> cell1-conductor --> target CELL0 --> (call rpc to CELL0) --> scheduler BTW, a devstack issue founded. In order to let scheduler could get instance group from nova_api database in code here: https://github.com/openstack/nova/blob/5bf1bb47c7e17c26592a699d07c2faa59d98bfb8/nova/conductor/manager.py#L623 It seems we need add 'connection' config in [api_database] section, but now devstack doesn't deal with it. patch is here: https://review.openstack.org/#/c/505607/ Steps to reproduce == * 1. Inject some exception in compute code to reproduce a reschedule operation: raise exception.RescheduledException("reschedule trigger") in here: https://github.com/openstack/nova/blob/5bf1bb47c7e17c26592a699d07c2faa59d98bfb8/nova/compute/manager.py#L1951 * 2. nova compute cast reschedule request to cell-conductor * 3. cell-conductor calls to cell mq, nobody could process that. * 4. Instacne state stuck in BUILD(scheduling) stack@yikun:~/nova$ nova list +--+-+++-+--+ | ID | Name| Status | Task State | Power State | Networks | +--+-+++-+--+ | af3fe405-7155-429d-97a8-a0f9f4c82911 | test_resch_instance | BUILD | scheduling | NOSTATE | | +--+-+++-+--+ * 4. Finally, Instance state is ERROR. stack@yikun:~/nova$ nova list +--+-+++-+--+ | ID | Name| Status | Task State | Power State | Networks | +--+-+++-+--+ | af3fe405-7155-429d-97a8-a0f9f4c82911 | test_resch_instance | ERROR | - | NOSTATE | | +--+-+++-+--+ Logs & Configs == cell config show as blow: stack@yikun:~/nova$ cat /etc/nova/nova_cell1.conf [database] connection = mysql+pymysql://root:1@127.0.0.1/nova_cell1?charset=utf8 [api_database] connection = mysql+pymysql://root:1@127.0.0.1/nova_api?charset=utf8 [conductor] workers = 2 [DEFAULT] logging_user_identity_format = %(project_name)s %(user_name)s transport_url = rabbit://stackrabbit:1@XXX:5672/nova_cell1 debug = True Log in cell conductor: 2017-09-20 06:18:01.306 21701 ERROR nova.scheduler.utils [req-5890b731-4b48-4503-a446-ef3f858eda4a admin admin] [instance: af3fe405-7155-429d-97a8-a0f9f4c82911] Error from last host: yikun (node yikun): [u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 1826, in _do_build_and_run_instance\nfilter_properties)\n', u' File "/opt/stack/nova/nova/compute/manager.py", line 2057, in _build_and_run_instance\ninstance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance af3fe405-7155-429d-97a8-a0f9f4c82911 was re-scheduled: reschedule trigger\n'] 2017-09-20 06:18:01.347 21701 DEBUG oslo_db.sqlalchemy.engines [req-5890b731-4b48-4503-a446-ef3f858eda4a admin admin] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:285 2017-09-20 06:19:01.433 21701 WARNING nova.scheduler.utils [req-5890b731-4b48-4503-a446-ef3f858eda4a admin admin] Retrying select_destinations after a MessagingTimeout, attempt 1 of 2.: MessagingTimeout: Timed out waiting for a reply to message ID 5dd1a54aa6f446a696f3ab0307572f3f 2017-09-20 06:20:01.441 21701 WARNING nova.scheduler.utils [req-5890b731-4b48-4503-a446-ef3f858eda4a admin admin] Retrying select_destinations after a MessagingTimeout, attempt 2 of 2.: MessagingTimeout: Timed out waiting for a reply to message ID
[Yahoo-eng-team] [Bug 1716903] [NEW] Failed to live-migrate instance in cell1.
Public bug reported: Step 1 create instance in cell1 +--++---++-+-+ | ID | Name | Status| Task State | Power State | Networks| +--++---++-+-+ | 84038890-8d70-45e1-8240-2303f4227e11 | yikun1 | MIGRATING | migrating | Running | public=2001:db8::a, 172.24.4.13 | +--++---++-+-+ Step 2 live migrate instance nova live-migration 84038890-8d70-45e1-8240-2303f4227e11 Step 3 The instance will stuck in "MIGRATIING" state. +--++---++-+-+ | ID | Name | Status| Task State | Power State | Networks| +--++---++-+-+ | 84038890-8d70-45e1-8240-2303f4227e11 | yikun1 | MIGRATING | migrating | Running | public=2001:db8::a, 172.24.4.13 | +--++---++-+-+ It seems we need add @targets_cell decorator for **live_migrate_instance** methods in conductor: https://github.com/openstack/nova/blob/master/nova/conductor/manager.py#L378 ERROR LOG: Exception during message handling: InstanceActionNotFound: Action for request_id req-5aa03558-ae14-458e-9c35-c3d377c7ce45 on instance 84038890-8d70-45e1-8240-2303f4227e11 not found Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py", line 160, in _process_incoming res = self.dispatcher.dispatch(message) File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 213, in dispatch return self._do_dispatch(endpoint, method, ctxt, args) File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 183, in _do_dispatch result = func(ctxt, **new_args) File "/opt/stack/nova/nova/compute/utils.py", line 875, in decorated_function with EventReporter(context, event_name, instance_uuid): File "/opt/stack/nova/nova/compute/utils.py", line 846, in __enter__ self.context, uuid, self.event_name, want_result=False) File "/usr/local/lib/python2.7/dist-packages/oslo_versionedobjects/base.py", line 184, in wrapper result = fn(cls, context, *args, **kwargs) File "/opt/stack/nova/nova/objects/instance_action.py", line 169, in event_start db_event = db.action_event_start(context, values) File "/opt/stack/nova/nova/db/api.py", line 1957, in action_event_start return IMPL.action_event_start(context, values) File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 250, in wrapped return f(context, *args, **kwargs) File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 6155, in action_event_start instance_uuid=values['instance_uuid']) InstanceActionNotFound: Action for request_id req-5aa03558-ae14-458e-9c35-c3d377c7ce45 on instance 84038890-8d70-45e1-8240-2303f4227e11 not found ** Affects: nova Importance: Undecided Assignee: Yikun Jiang (yikunkero) Status: In Progress -- 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/1716903 Title: Failed to live-migrate instance in cell1. Status in OpenStack Compute (nova): In Progress Bug description: Step 1 create instance in cell1 +--++---++-+-+ | ID | Name | Status| Task State | Power State | Networks| +--++---++-+-+ | 84038890-8d70-45e1-8240-2303f4227e11 | yikun1 | MIGRATING | migrating | Running | public=2001:db8::a, 172.24.4.13 | +--++---++-+-+ Step 2 live migrate instance nova live-migration 84038890-8d70-45e1-8240-2303f4227e11 Step 3 The instance will stuck in "MIGRATIING" state. +--++---++-+-+ | ID | Name | Status| Task State | Power State | Networks| +--