Comment 2 for bug 1547889

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/291119
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=68c4379e2c07bf284d952193a75401ec59365bfe
Submitter: Jenkins
Branch: master

commit 68c4379e2c07bf284d952193a75401ec59365bfe
Author: Vladimir Kuklin <email address hidden>
Date: Mon Mar 14 19:45:24 2016 +0300

    Make Nailgun cut self referring cross-dependencies loops

    This commit introduces an additional check on whether
    a cross-dependency resolves to the same task on the same
    node. This is very handy and allows a deployment engineer
    to keep the same task name and create a sequence of execution
    for it, e.g.:
    make database deploy on primary controller first

    database:
      ...
      groups: [primary-controller, controller]
      cross-depends:
        name: database
        role: primary-controller
      ...

    instead of

    primary-database:
      ...
      groups: [primary-controller]
      ...

    database:
      groups: [controller]
      cross-depends:
        name: primary-database

    But this might introduce a loop where task depends
    on itself on the same node.

    The commit below introduces an additional condition for this
    to not yield such looping dependencies when they are met.

    This behaviour is not triggered for cross-dependencies referring to
    role:self as they are essentially an extension of required and
    required_for varinats with support of regular expressions.

    This commit also fixes some tests that had such loops defined in unit
    tests, thus failing with this new condition enabled.

    Change-Id: I6aea7cc75bc9fa2c512083ff776a831137b6e220
    Closes-bug: #1547889