[engine] destroy method not called for objects removed by actions

Bug #1562804 reported by Kirill Zaitsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
High
Stan Lagun

Bug Description

To reproduce: add the following code to any murano app (MySQL or Apache)

Call addSlave 3 times, then call delSlave 3 times.

Expected result: 2 instances are running (1 original and 1 from recently deleted slave)
Actual result: 4 instances are running.

  addSlave:
    Usage: Action
    Body:
      - $nodeCount: len($.slaveNodes)
      - $inst: new(res:LinuxMuranoInstance, $this,
            name => format('slave-{0}', $nodeCount+1),
            flavor => $.instance.flavor,
            assignFloatingIp => $.instance.assignFloatingIp,
            image => $.instance.image
            )
      - $inst.deploy()
      - $.slaveNodes: $.slaveNodes.append($inst)

      - $._environment.reporter.report($this, format('Adding Slave {0}', $inst.name))

  delSlave:
    Usage: Action
    Body:
      - $nodeCount: len($.slaveNodes)

      - If: $nodeCount < 1
        Then:
          - $._environment.reporter.report($this, 'No slave nodes to remove')
          - Return: 0

      # - $.slaveNodes.skip($nodeCount-1).select($.releaseResources())
      - $.slaveNodes: $.slaveNodes.take($nodeCount-1)

      - $._environment.reporter.report($this, format('Removed a slave. New slave count is {0}', $nodeCount - 1))

Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :
description: updated
Stan Lagun (slagun)
Changed in murano:
assignee: nobody → Stan Lagun (slagun)
milestone: none → mitaka-rc2
tags: added: liberty-backport-potential
Changed in murano:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/299666

Changed in murano:
status: Confirmed → In Progress
Changed in murano:
milestone: mitaka-rc2 → mitaka-rc3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (master)

Reviewed: https://review.openstack.org/299659
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=855e5f0d3452341706c07c861050941923cf316d
Submitter: Jenkins
Branch: master

commit 855e5f0d3452341706c07c861050941923cf316d
Author: Stan Lagun <email address hidden>
Date: Thu Mar 31 02:06:59 2016 +0300

    Destroy orphan objects

    Murano has a garbage collector that destroys objects
    which were deleted in API after last deployment.
    However if objects were removed from object model
    during deployment (action execution) or were created
    and not saved there they left unnoticed by the engine
    causing resource leak.

    With this change all objects that are presented in object store
    but were not serialized to result object model are get destroyed.

    Change-Id: I107b34e3ae4e1b5835645e116f9445535dfb7636
    Closes-Bug: #1562804

Changed in murano:
status: In Progress → Fix Released
tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano (stable/mitaka)

Reviewed: https://review.openstack.org/299666
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=579731aeec384623acb9d88722cb5306a68f1290
Submitter: Jenkins
Branch: stable/mitaka

commit 579731aeec384623acb9d88722cb5306a68f1290
Author: Stan Lagun <email address hidden>
Date: Thu Mar 31 02:06:59 2016 +0300

    Destroy orphan objects

    Murano has a garbage collector that destroys objects
    which were deleted in API after last deployment.
    However if objects were removed from object model
    during deployment (action execution) or were created
    and not saved there they left unnoticed by the engine
    causing resource leak.

    With this change all objects that are presented in object store
    but were not serialized to result object model are get destroyed.

    Change-Id: I107b34e3ae4e1b5835645e116f9445535dfb7636
    Closes-Bug: #1562804

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano 3.0.0.0b1

This issue was fixed in the openstack/murano 3.0.0.0b1 development milestone.

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

Other bug subscribers

Bug attachments

Remote bug watches

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