Comment 14 for bug 1227575

Revision history for this message
Aswad Rangnekar (aswad-r) wrote :

nova-core please review the attached patch.

Description:
- I have implemented solution#2 as discussed above and have reused consoles and console_pools table to achieve this.
- Maximum number of consoles that can be open for any instance is configurable using "console_max_count"
- A console data stored in consoles table, is related to one of the compute hosts on which the instance is spawned. This information is stored in console_pools table and is identified by public_hostname, host, compute_host fields.
- All consoles associated with a console_pool are cleaned up after a compute host or novnc-proxy service comes up after a unexpected failure.

Following scenarios are considered:
1. Open vm console for any one of the vm, for "console_max_count" times in separate tabs.
Expected:
- All consoles should successfully open till its is count = "console_max_count"
- If attempt is made to open a console session and the resulting count is > "console_max_count" then exception "ConsoleMaxCountExceeded" is raised

2. Open vm console of each vm. Kill nova-console service from each server.
Expected:
- All console session should get disconnected.
- Start nova-console service on each server, it should delete all previous opened consoles from the consoles table.
- Now if you try to connect to any of the vm console, it should connect successfully.

3. Open vm console of each vm. Shutdown vm using virsh command.
Expected:
- Console session should get disconnected and nova-console should delete the console successfully.