The periodic task to clean up expired console_auth tokens is invalid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Medium
|
Takashi Natsume |
Bug Description
Description
===========
In compute node, the periodic task to clean up expired console_auth tokens is invalid, can't remove expired console auth tokens for this host.
Steps to reproduce
==================
1.In controller node, config nova-novncproxy using database to store novnc auth tokens.
enable_
2.In compute node, config vnc server address and token_ttl.
server_
token_ttl=60
3.Restart nova-compute and nova-novncproxy.
4.Using nova command to get novncproxy_base_url and token.
Expected result
===============
The periodic task can remove expired console auth tokens in database.
Actual result
=============
This periodic task is invalid.
Environment
===========
1. Exact version of OpenStack you are running. See the following
master
2. Which hypervisor did you use?
Libvirt + KVM
3. Which networking type did you use?
Neutron with OpenVSwitch
Logs & Configs
==============
1. In console_auth_tokens table, host's value is CONF.vnc.
def get_vnc_
def get_vnc_
guest = self._host.
xml = guest.get_
xml_dom = etree.fromstrin
graphic = xml_dom.
if graphic is not None:
# NOTE(rmk): We had VNC consoles enabled but the instance in
# question is not actually listening for connections.
raise exception.
port = get_vnc_
host = CONF.vnc.
return ctype.ConsoleVN
2. In periodic task, the host's value is hostname.
@periodic_
def _cleanup_
"""Remove expired console auth tokens for this host.
Console authorization tokens and their connection data are stored
in the database when a user asks for a console connection to an
instance. After a time they expire. We periodically remove any expired
tokens from the database.
"""
# If the database backend isn't in use, don't bother looking for
# expired tokens. The database backend is not supported for cells v1.
if not CONF.cells.enable:
tags: | added: console |
Changed in nova: | |
assignee: | nobody → Takashi NATSUME (natsume-takashi) |
status: | New → In Progress |
tags: | added: stein-rc-potential |
Changed in nova: | |
importance: | Undecided → Medium |
Fix proposed to branch: master /review. openstack. org/637716
Review: https:/