fuel-devops not trackig dependencies between network devices

Bug #1591750 reported by Sergey Yudin
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Medium
Fuel QA Team

Bug Description

https://github.com/openstack/fuel-devops/blob/master/devops/models/group.py#L45

this code return network objs in random order, meanwhile we may have dependencies between them, e.g.

public network may be bridged with public-raw and we must ensure public raw will be started first.

Workaround is to order networks by ifaces and first bring up ifaces with most dependecies like

- return self.l2networkdevice_set.filter(**kwargs)
+ devs = self.l2networkdevice_set.filter(**kwargs)
+ return sorted(devs, key=lambda dev: len(dev.interfaces), reverse=True)

but proper solution is to build tree and return first ifaces wo dependencies.

In attachment yaml which will help to reproduce issue. It will fail because public will be started before public-raw.

Tags: area-devops
Revision history for this message
Sergey Yudin (tsipa740) wrote :
Dmitry Klenov (dklenov)
tags: added: area-devops
Changed in fuel:
milestone: none → 10.0
assignee: nobody → Fuel QA Team (fuel-qa)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/319258
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=83bfa424a2113cd897b9b73cdd36ebfee4fe9ee1
Submitter: Jenkins
Branch: master

commit 83bfa424a2113cd897b9b73cdd36ebfee4fe9ee1
Author: Anton Studenov <email address hidden>
Date: Mon Jul 4 17:55:31 2016 +0300

    Proper ordering for objects loaded from templates

    - Use OrderedDict for loading objects from yaml template.
    - Load objects from db with the order they were saved.
      It guarantees that objects will be defined in the same order
      that they appear in template file.
    - added id field to Group
    - added unit tests for yaml_template_load

    Related-Bug: #1591750
    Change-Id: I2cafa1fbe156b1ddbd5546d06938e65c9b6bf4bf

Revision history for this message
Sergey Yudin (tsipa740) wrote :

I'd say commit "Proper ordering for objects loaded from templates" correct and valid, but not sufficient.
Since devops being used by other components like a f-qa with this approach we will have to change everything what relies on devops templates to use ordered hashes to get expected behavior. I still think since we may have a hierarchy of interfaces we should build a three with dependencies and start/define ifaces following those dependencies.

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.