Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-6467

User VM state listener publishes to event bus incompletely

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.2.0, 4.3.0, 4.4.0, 4.5.0
    • 4.5.0
    • Management Server
    • Security Level: Public (Anyone can view this level - this is the default.)
    • CentOS 6.5

    Description

      The UserVMStateListener is responsible for publishing resource state transition events and usage events for virtual machines. It has an issue where, from the point of view of any listener bound on the event bus, it publishes resource state transition events for user VMs twice and only publishes events for system VMs (e.g. virtual routers) once, but before the state transition happens. Usage events are unaffected.

      This is because of two issues:

      1. The publishOnEventBusMethod receives a status parameter to determine whether the event is pre- or post-transition. It ignores this parameter when publishing.
      2. Only pre-transition events are published for system VMs like routers. This means there is no reliable way to act on a state transition event for system VMs if we are interested in doing something AFTER they have changed the state.

      The easiest solution to these issues is to move the the publishOnEventBus call in postStateTransitionEvent to before it returns for non-user VMs, and then also add the status string into the event description map when publishing to the event bus.

      I've also submitted a patch for this change to review board.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jeff@greenqloud.com Jeff Hair
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: