Change assigned IP addresses representation from string

Bug #1484973 reported by Maciej Kwiek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Confirmed
Medium
Fuel Sustaining
Mitaka
Won't Fix
Medium
Fuel Python (Deprecated)
Newton
Confirmed
Medium
Fuel Sustaining

Bug Description

IP addresses are stored as strings in database. It makes them bigger than they need to be, and makes handling them harder. We should consider using native IP type, or integer type with custom SQLAlchemy field for automatic conversion (maybe use netaddr IP type for representing it in the application).

Changed in fuel:
milestone: none → 8.0
importance: Undecided → High
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: tech-debt
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Sergey Murashov (smurashov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Changed in fuel:
assignee: Sergey Murashov (smurashov) → Ilya Kharin (akscram)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/235865
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=83bd490394e1ca12e6729917ce13d39b2a83f995
Submitter: Jenkins
Branch: master

commit 83bd490394e1ca12e6729917ce13d39b2a83f995
Author: smurashov <email address hidden>
Date: Fri Oct 16 14:23:21 2015 +0300

    Use appropriate types to store IP and MAC addrs

    In PostgreSQL there are special types for storing IPv4, IPv6 address and
    subnetworks and also MAC addresses. Storing data in these types is more
    efficient than in strings because it requires less space. In addition,
    it provides additional operations for columns of these types.

    This patch changes types of some columns for models such as:

        IPAddr
            ip_addr: inet

        IPAddrRange
            first: inet
            last: inet

        Node
            mac: macaddr
            ip: inet

        NodeNICInterface
            mac: macaddr
            ip_addr: inet
            netmask: inet

        NodeNICInterface
            mac: macaddr

        NetworkGroup
            cidr: cidr
            gateway: inet

        NeutronConfig
            base_mac: macaddr
            internal_cidr: cidr
            internal_gateway: inet
            baremetal_gateway: inet

        NovaNetworkConfig
            fixed_networks_cidr: cidr

    Co-Authored-By: Ilya Kharin <email address hidden>
    Change-Id: Id8431eb7d2e3ca1a1cc29fc865d57359b29d0e35
    Partial-Bug: #1484973

Revision history for this message
Oleg S. Gelbukh (gelbuhos) wrote :

Ilya, do you plan to commit anything else on this bug? Please, share the plan or change the status to 'Fix Commited'.

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

It's too late for refactoring in 8.0. No response from assignee. Moving the bug back to the team.

Changed in fuel:
milestone: 8.0 → 9.0
assignee: Ilya Kharin (akscram) → Fuel Python Team (fuel-python)
status: In Progress → Confirmed
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

I don't see reason why it is marked as high priority

no longer affects: fuel/future
no longer affects: fuel/7.0.x
no longer affects: fuel/8.0.x
Changed in fuel:
importance: High → Medium
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.