post-copy and auto-converge are mutually exclusive

Bug #1877470 reported by Andrea Ieri
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Nova Compute Charm
Triaged
Medium
Unassigned

Bug Description

live_migration_permit_post_copy and live_migration_permit_auto_converge cannot be true at the same time. Or rather, they can, but post-copy will win over auto-converge. See the config reference[0].

I think the charm should go in a blocked state if both are set to true, because although it is a valid configuration, the resulting behavior is not obvious, and has bitten us several times in the past.

[0] https://docs.openstack.org/nova/stein/configuration/config.html#libvirt.live_migration_permit_post_copy

Changed in charm-nova-compute:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Andrea Ieri (aieri) wrote :

On second thought, I have a better suggestion: since live_migration_permit_post_copy and live_migration_permit_auto_converge effectively implement a three-way switch, it would be more idiomatic to deprecate them in favor of a new setting. For example:

  live-migration-force-strategy:
    type: string
    default: stop
    description: |
      Selects which strategy will be used when migrations are force-completed.
      Valid options: stop, post-copy, auto-converge
      Only used if the deprecated live-migration-permit-post-copy and
      live-migration-permit-auto-converge options are unset
  live-migration-permit-post-copy:
    type: boolean
    default: False
    description: |
      DEPRECATED: use live-migration-force-strategy instead
      If live-migration is enabled, this option allows Nova to switch an on-
      going live migration to post-copy mode.
  live-migration-permit-auto-converge:
    type: boolean
    default: False
    description: |
      DEPRECATED: use live-migration-force-strategy instead
      If live-migration is enabled, this option allows Nova to throttle down
      CPU when an on-going live migration is slow.
      WARNING: auto-converge will only be used if post-copy is disabled

Revision history for this message
Adam Dyess (addyess) wrote :

I agree that these two options
 - live-migration-permit-post-copy
 - live-migration-permit-auto-converge

are entagled in that an enabled permit-post-copy ignores an enabled auto-converge.

See: https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L1151

a charmed config of this would be nice to capture that.

Revision history for this message
Andrea Ieri (aieri) wrote :

Yeah, Adam helped me clear up my confusion: auto-converge is not a force-completion strategy, it kicks in immediately if allowed.

Perhaps a better UI would be:

  live-migration-strategy:
    type: string
    default: abort
    description: |
      Selects which strategy will be used during live migrations.
      Valid options: abort, auto-converge
      Only used if the deprecated live-migration-permit-post-copy and
      live-migration-permit-auto-converge options are unset
  live-migration-force-completion-strategy:
    type: string
    default: pause
    description: |
      Selects which strategy will be used when migrations are force-completed.
      Valid options: pause, post-copy
      Only used if the deprecated live-migration-permit-post-copy and
      live-migration-permit-auto-converge options are unset
  live-migration-permit-post-copy:
    type: boolean
    default: False
    description: |
      DEPRECATED: use live-migration-force-strategy instead
      If live-migration is enabled, this option allows Nova to switch an on-
      going live migration to post-copy mode.
  live-migration-permit-auto-converge:
    type: boolean
    default: False
    description: |
      DEPRECATED: use live-migration-force-strategy instead
      If live-migration is enabled, this option allows Nova to throttle down
      CPU when an on-going live migration is slow.
      WARNING: auto-converge will only be used if post-copy is disabled

I think the above would make it easier for a user to select how they want standard live migrations to be handled vs how they want force-completions to happen.
If both post-copy and auto-converge are selected the charm should go in a blocked state.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.