Libvirt: Support console log migration during live-migration

Registered by Loganathan Parthipan

Currently, in libvirt driver with a kvm hypervisor, a file called console.log. However, during a live-migration the file is not moved along with the instance. This blueprint fixes that.

See spec for more details.

Blueprint information

Status:
Started
Approver:
John Garbutt
Priority:
Low
Drafter:
Loganathan Parthipan
Direction:
Needs approval
Assignee:
Loganathan Parthipan
Definition:
Pending Approval
Series goal:
Accepted for trunk
Implementation:
Started
Milestone target:
None
Started by
Loganathan Parthipan

Related branches

Sprints

Whiteboard

@mikal:

We would like to achieve the following.

1. Rotated console logs
2. Use the previously rotated log in get_console_logs if the current log is less than MAX_CONSOLE_BYTES.

The second feature will let us fix the console log issue during live-migration, which is actually the main motivation behind this bp.

We can make this dependent on bp/fix-libvirt-console-logging and focus the second bit. Would that be ok with you? Or would you rather we do this as part of the bp/fix-libvirt-console-logging?

~parthi 13 March 2014

----------------

This BP looks like a duplicate of bp/fix-libvirt-console-logging, which I am updating for Juno now.
  -- mikal 13 March 2014.

-----

https://bugs.launchpad.net/nova/+bug/1203193

The main change proposed is:

Change get_console_output to read the next console.log.? file when the console.log contents are less than MAX_CONSOLE_BYTES and perform the same length test and move to the next file if required and so on.

Once such a feature is in, we can call into the same get_console_output from post_live_migration_destination and retrieve the console log and persist it and it will make console logs transfer during live-migration without libvirt changes.@mikal:

We would like to achieve the following.

1. Rotated console logs
2. Use the previously rotated log in get_console_logs if the current log is less than MAX_CONSOLE_BYTES.

The second feature will let us fix the console log issue during live-migration, which is actually the main motivation behind this bp.

We can make this dependent on bp/fix-libvirt-console-logging and focus the second bit. Would that be ok with you? Or would you rather we do this as part of the bp/fix-libvirt-console-logging?

~parthi 13 March 2014

----------------

This BP looks like a duplicate of bp/fix-libvirt-console-logging, which I am updating for Juno now.
  -- mikal 13 March 2014.

-----

https://bugs.launchpad.net/nova/+bug/1203193

The main change proposed is:

Change get_console_output to read the next console.log.? file when the console.log contents are less than MAX_CONSOLE_BYTES and perform the same length test and move to the next file if required and so on.

Once such a feature is in, we can call into the same get_console_output from post_live_migration_destination and retrieve the console log and persist it and it will make console logs transfer during live-migration without libvirt changes.

If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)

Gerrit topic: https://review.openstack.org/#q,topic:bp/for,n,z

Addressed by: https://review.openstack.org/84766
    Blueprint for migrating console logs

Spec has been approved, and merged, so updating this blueprint to the Juno service, after updating the spec and its URL. --johnthetubaguy (28th April 2014)

Please upload code and choose a milestone, to get this blueprint approved --johnthetubaguy (28th April 2014)

Gerrit topic: https://review.openstack.org/#q,topic:bp/support-console-log-migration,n,z

Addressed by: https://review.openstack.org/94870
    Migrate console logs from source

The patches are marked as WIP, so moving to juno-3. But please move this back to juno-2, should you get your patches approved in time. --johnthetubaguy 21st July 2014

Feature Proposal Freeze means this must not land in juno, because it appears like the code is not all currently ready to be reviewed. To be able to merge in kilo, we would first need to merge a kilo spec. More details on the exact process will be available on the ML shortly. --johnthetubaguy 22nd August 2014

(?)

Work Items

Work items:
Change get_console_output to merge rotated console logs when appropriate: TODO

This blueprint contains Public information 
Everyone can see this information.