Make the API follow the real relations

Bug #1279765 reported by Ladislav Smola
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tuskar-ui
Won't Fix
High
Ladislav Smola

Bug Description

Right now the api relation is

Resource has one instance
Node has one instance

and resource gets omitted in all places

This is not following how the things really are!! (which is always bad for many reasons)

POSSIBLE REALITY:

resource has (zero,one) instance
resource has (zero,one) node

instance has (zero,one) node

node belongs to instance
node belongs to resource
...
...

CURRENT BUGS

1. there can be a failure that e.g. No available host found, which creates just Nova instance but doesn't associate the Node - doesn't show anything right now

2. when e.g. update fail, only stack resource can be created. We are now not showing a resource which result to created 1/1
but in reality there is only 1 of 2 created

Ladislav Smola (lsmola)
Changed in tuskar-ui:
importance: Undecided → High
milestone: none → icehouse-3
status: New → Triaged
Ladislav Smola (lsmola)
Changed in tuskar-ui:
assignee: nobody → Tzu-Mainn Chen (tzumainn)
Revision history for this message
Tzu-Mainn Chen (tzumainn) wrote :

I'm a little confused by this; the API does follow the real relation, as it does follow the resource/instance/node chain. The UI just ends up leaving out the resource object because there's no information there we need.

Revision history for this message
Tzu-Mainn Chen (tzumainn) wrote :

I got some clarification: the role node table retrieves the associated resources and then passes the associated nodes into the table:

tuskar_ui/infrastructure/overcloud/views.py:

    def _get_nodes(self, overcloud, role):
        resources = overcloud.resources(role, with_joins=True)
        return [r.node for r in resources]

However, if the node doesn't exist for whatever reason, the table will fail.

The table should retrieve the resources, and then display appropriate defaults if the node does not exist.

Changed in tuskar-ui:
assignee: Tzu-Mainn Chen (tzumainn) → Jordan OMara (jomara)
Changed in tuskar-ui:
importance: High → Medium
Changed in tuskar-ui:
importance: Medium → High
Revision history for this message
Ladislav Smola (lsmola) wrote :

Are you planning to work on this?

Ladislav Smola (lsmola)
Changed in tuskar-ui:
assignee: Jordan OMara (jomara) → Ladislav Smola (lsmola)
Revision history for this message
Ladislav Smola (lsmola) wrote :

It's too messed up to fix it in Icehouse. I will fix it in J1

What would be nice to have before that, so I don't do pointless work here:
- figure out what will happen with Overcloud Roles
- take the association to Overcloud Roles from the Heat not from instance image

I wanted to fix smaller failures in this bug cause doing the API properly would do that, I will start another smaller bugs for that.

Changed in tuskar-ui:
milestone: icehouse-3 → j-1
Dougal Matthews (d0ugal)
Changed in tuskar-ui:
status: Triaged → Won't Fix
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.