Move "ips" field from Subnet object to VIF object

Bug #1720175 reported by Rodolfo Alonso
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-vif
Fix Released
High
Rodolfo Alonso

Bug Description

"ips" field in Subnet object [1] is a legacy field from Nova networks. This is still used in the virt Firewall, but is not used in os-vif project. Furthemore, the VIF object used by Nova to extract the port IPs [2] is not provided by os-vif.

The reason to move this field from Subnet to VIF is because the IP list should belong to the VIF object, which is linked with the port. The Subnet object contains the CIDR of the subnetwork, but shouldn't store the IPs given to an specific port.

This object modification should be ready before the os-vif Neutron/Nova migration process.

[1] https://github.com/openstack/os-vif/blob/1.7.0/os_vif/objects/subnet.py#L30
[2] https://github.com/openstack/nova/blob/16.0.1/nova/virt/firewall.py#L180-L181

Revision history for this message
sean mooney (sean-k-mooney) wrote :

this is currently not used by anyting in os-vif so we should remove it before anything uses it incorrectly.
as pointed out this is legacy code form when the subnet object was imported for nova networks originally and it is only used for firwalling when not using neutron.

in the legacy nova-networks code path currently nova does not use the os-vif object when creating the firewall rules, only when pluging the interface so there is no use of these field in nova either so its safe to remove them from the subnet object in os-vif.

Changed in os-vif:
importance: Undecided → High
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-vif (master)

Fix proposed to branch: master
Review: https://review.openstack.org/508498

Changed in os-vif:
assignee: nobody → Rodolfo Alonso (rodolfo-alonso-hernandez)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-vif (master)

Reviewed: https://review.openstack.org/508498
Committed: https://git.openstack.org/cgit/openstack/os-vif/commit/?id=a441c08f26441b3eb2b5c49259d0cbb6b5345bcc
Submitter: Jenkins
Branch: master

commit a441c08f26441b3eb2b5c49259d0cbb6b5345bcc
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Fri Sep 29 12:19:16 2017 +0100

    Move 'ips' field from Subnet object to VIF object

    'ips' field in Subnet object [1] is a legacy field from Nova networks.
    This is still used in the virt Firewall, but is not used in os-vif
    project. Furthemore, the VIF object used by Nova to extract the port
    IPs [2] is not provided by os-vif.

    The reason to move this field from Subnet to VIF is because the IP list
    should belong to the VIF object, which is linked with the port. The
    Subnet object contains the CIDR of the subnetwork, but shouldn't store
    the IPs given to an specific port.

    [1] https://github.com/openstack/os-vif/blob/1.7.0/os_vif/objects/subnet.py#L30
    [2] https://github.com/openstack/nova/blob/16.0.1/nova/virt/firewall.py#L180-L181

    Change-Id: I99a4df96ee8e72915bdf9fc1327b9575dfa94586
    Closes-Bug: #1720175

Changed in os-vif:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-vif 1.8.0

This issue was fixed in the openstack/os-vif 1.8.0 release.

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.