Failed to load VM in multi-node setup

Bug #1641626 reported by Yuli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Invalid
Medium
Unassigned

Bug Description

After creating a VM in command line it was not working
and I found an exception in the log file:

[-] Dragonflow application 'DHCPApp' failed in add_local_port
Traceback (most recent call last):
   File "/opt/stack/dragonflow/dragonflow/controller/dispatcher.py", line 46, in dispatch
     handler(*args, **kwargs)
   File "/opt/stack/dragonflow/dragonflow/controller/dhcp_app.py", line 419, in add_local_port
     if not self._is_dhcp_enabled_for_port(lport):
   File "/opt/stack/dragonflow/dragonflow/controller/dhcp_app.py", line 354, in _is_dhcp_enabled_for_port
     subnet = self._get_subnet_by_port(lport)
   File "/opt/stack/dragonflow/dragonflow/controller/dhcp_app.py", line 332, in _get_subnet_by_port
     subnets = l_switch.get_subnets()
 AttributeError: 'NoneType' object has no attribute 'get_subnets'

Yuli (stremovsky)
Changed in dragonflow:
importance: Undecided → Medium
assignee: nobody → Yuli (stremovsky)
Revision history for this message
Yuli (stremovsky) wrote :

I was researching this bug and found the following.

I was creating VM as an admin user and admin group (tenant_a).
When creating the VM I assigned it to the "private" network
(tenant_b).

So, when a local port for VM is created, it is assigned to tenant_a.
While, it's switch is assigned to tenant_b.

In log I see that the system is subscribed to tenant_a topic
(and not to tenant_b).
Subscribe topic: tenant_a by lport

As a result, nothing is returned for: self.db_store.get_lswitch(l_switch_id)

Revision history for this message
Yuli (stremovsky) wrote :

When running the same command as a demo tenant everything works.

Revision history for this message
Yuli (stremovsky) wrote :

When creating a VM as an Admin user and Admin tenant,
I can not select the private network as it assigned
to the demo tenant.

To prevent the above bug, I suppose we need to prevent
creating of this port at the higher level API.

Yuli (stremovsky)
Changed in dragonflow:
importance: Medium → Critical
assignee: Yuli (stremovsky) → nobody
importance: Critical → Medium
Li Ma (nick-ma-z)
Changed in dragonflow:
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.