element-info incorrectly errors when a dependency is virtual and the provides comes after the dependency

Bug #1303911 reported by Jon-Paul Sullivan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
High
Unassigned

Bug Description

This is due to the dependency being added to the queue and examined before the user-input has been fully parsed to see what is provided by them.

This also shows a weakness where the dependencies of a provided element are loaded from the element of the name of the dependency before the dependencies of the element providing that are loaded, potentially leading to unwanted elements in an image.

Example:

The following is a simple change to the provides test that shows the incorrect dependency behaviour:

        _populate_element(self.element_dir,
                          'provides_virtual',
                          [],
                          ['virtual'])
        _populate_element(self.element_dir, 'requires_virtual', ['virtual'])
        _populate_element(self.element_dir, 'virtual', ['extra_dependency'])
        _populate_element(self.element_dir, 'extra_dependency', [])

    def test_provide(self):
        result = element_dependencies.expand_dependencies(
            ['provides_virtual', 'requires_virtual'],
            elements_dir=self.element_dir)
        self.assertEqual(set(['requires_virtual', 'provides_virtual']), result)

The following is a simple test to show the incorrect provides behaviour:

        _populate_element(self.element_dir,
                          'provides_new_virtual',
                          [],
                          ['new_virtual'])
        _populate_element(self.element_dir, 'requires_new_virtual', ['new_virtual'])

    def test_provide_virtual_ordering(self):
        result = element_dependencies.expand_dependencies(
            ['requires_new_virtual', 'provides_new_virtual'],
            elements_dir=self.element_dir)
        self.assertEqual(set(['requires_new_virtual', 'provides_new_virtual']), result)

Changed in tripleo:
status: New → Confirmed
assignee: nobody → Jon-Paul Sullivan (jonpaul-sullivan)
Changed in tripleo:
importance: Undecided → High
Revision history for this message
Brent Eagles (beagles) wrote :

I've reset this to "nobody" and putting on list for re-triage (see https://etherpad.openstack.org/p/tripleo-bug-cleanup-2016)

Changed in tripleo:
assignee: Jon-Paul Sullivan (jonpaul-sullivan) → nobody
status: Confirmed → New
Revision history for this message
Ben Nemec (bnemec) wrote :

This is a diskimage-builder bug. If it still exists, it should be opened against that project.

Changed in tripleo:
status: New → Invalid
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.