oomichi / try-kubernetes

12 stars 5 forks source link

Slow nova operation down #16

Closed oomichi closed 6 years ago

oomichi commented 6 years ago

As the following, 'nova show ' operation takes 23 secs on my local env. That is too slow.

2018-03-20 18:39:51.778 2488 INFO nova.osapi_compute.wsgi.server
  [req-0594f78c-452e-4b47-b579-7bf87fb540e5 ad0a67a3459e441aa66c92326ce60d10 cc62a44848ab4251a08351ad45c357a8 - default default]
  127.0.0.1 "GET /v2.1/servers/6a4e863b-f4a5-40f9-9dca-f4657314a3d1 HTTP/1.1" status: 200 len: 2308 time: 23.2203150
oomichi commented 6 years ago

nova show operation is just touching DB to get info, so nova-api and nova-conductor only take action. However, nova-conductor doesn't output any log on the default setting, so it is better to change the log level to DEBUG.

oomichi commented 6 years ago

After changing the log level with https://github.com/oomichi/try-kubernetes/commit/862c8cc68eaf8755768920568481d82e586a728e the issue doesn't happen. Close this issue temporary and re-open if I face it again.

oomichi commented 6 years ago
2018-03-20 18:52:26.516 11913
  DEBUG nova.policy [req-cbb1b550-5e3d-47eb-9a81-4d762f75b3cf ad0a67a3459e441aa66c92326ce60d10 cc62a44848ab4251a08351ad45c357a8 - default default]
  Policy check for os_compute_api:os-hide-server-addresses failed with credentials {'service_roles': [], 'user_id': u'ad0a67a3459e441aa66c92326ce60d10',
  'roles': [u'admin'], 'user_domain_id': u'default', 'service_project_id': None, 'service_user_id': None, 'service_user_domain_id': None,
  'service_project_domain_id': None, 'is_admin_project': True, 'is_admin': True, 'project_id': u'cc62a44848ab4251a08351ad45c357a8', 'project_domain_id': u'default'}
  authorize /usr/lib/python2.7/dist-packages/nova/policy.py:168
2018-03-20 18:52:37.152 11913
  INFO nova.osapi_compute.wsgi.server [req-cbb1b550-5e3d-47eb-9a81-4d762f75b3cf ad0a67a3459e441aa66c92326ce60d10 cc62a44848ab4251a08351ad45c357a8 - default default]
  127.0.0.1 "GET /v2.1/servers/detail HTTP/1.1" status: 200 len: 17696 time: 10.8710310
oomichi commented 6 years ago

failed with credentials is not matter, it just explains the role is not admin and nova doesn't provide the detail which requires admin credential as DEBUG level.

oomichi commented 6 years ago

This issue has been fixed with a new installation!