Networks are created without all necessary fields, preventing update

Bug #1495506 reported by Alexandr Kostrikov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel QA Team
7.0.x
Won't Fix
Medium
Fuel QA Team

Bug Description

There is a network in nailgun, created with fuel-qa multiple networks

dockerctl shell postgres su - postgres -c 'psql -d nailgun'
psql (9.3.5)
Type "help" for help.

nailgun=# select * from network_groups where id = 7;
 id | name | release | vlan_start | cidr | gateway | meta | group_id
----+------------+---------+------------+---------------+---------+----------------------------------------------+----------
  7 | management | 2 | 101 | 10.250.2.0/24 | | {"ip_range": ["10.250.2.1", "10.250.2.254"]} | 2
(1 row)

But update checks for notation in meta.
https://github.com/stackforge/fuel-web/blob/master/nailgun/nailgun/objects/network_group.py#L116

So, this produces a conflict.

Should it be fixed in fuel-qa or more strict validation should be also applied in nailgun?

summary: - In networks are created without all fields, preventing update
+ Networks are created without all necessary fields, preventing update
Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

In python after prepare_slaves_5 with multiple_networks=true 'fuel_web.client.get_network_groups()' returns
{u'vlan_start': None, u'meta': {u'ip_range': [u'10.250.1.1', u'10.250.1.254']}, u'name': u'public', u'release': 2, u'cidr': u'10.250.1.0/24', u'group_id': 2, u'gateway': u'172.16.0.1', u'id': 6}
{u'vlan_start': 101, u'meta': {u'ip_range': [u'10.250.2.1', u'10.250.2.254']}, u'name': u'management', u'release': 2, u'cidr': u'10.250.2.0/24', u'group_id': 2, u'gateway': None, u'id': 7}
{u'vlan_start': 102, u'meta': {u'ip_range': [u'10.250.3.1', u'10.250.3.254']}, u'name': u'storage', u'release': 2, u'cidr': u'10.250.3.0/24', u'group_id': 2, u'gateway': None, u'id': 8}

{u'vlan_start': None, u'meta': {u'vips': [u'haproxy', u'vrouter'], u'notation': u'ip_ranges', u'render_type': None, u'map_priority': 1, u'floating_range_var': u'floating_ranges', u'ip_range': [u'172.16.0.2', u'172.16.0.126'], u'vlan_start': None, u'cidr': u'172.16.0.0/24', u'name': u'public', u'configurable': True, u'use_gateway': True, u'render_addr_mask': u'public'}, u'name': u'public', u'release': 2, u'cidr': u'172.16.0.0/24', u'group_id': 1, u'gateway': u'172.16.0.1', u'id': 2}
{u'vlan_start': 101, u'meta': {u'vips': [u'haproxy', u'vrouter'], u'name': u'management', u'notation': u'cidr', u'render_addr_mask': u'internal', u'vlan_start': 101, u'use_gateway': False, u'cidr': u'192.168.0.0/24', u'render_type': u'cidr', u'map_priority': 2, u'configurable': True}, u'name': u'management', u'release': 2, u'cidr': u'192.168.0.0/24', u'group_id': 1, u'gateway': None, u'id': 3}
{u'vlan_start': 102, u'meta': {u'name': u'storage', u'notation': u'cidr', u'render_addr_mask': u'storage', u'vlan_start': 102, u'use_gateway': False, u'cidr': u'192.168.1.0/24', u'render_type': u'cidr', u'map_priority': 2, u'configurable': True}, u'name': u'storage', u'release': 2, u'cidr': u'192.168.1.0/24', u'group_id': 1, u'gateway': None, u'id': 4}

Not sure when and where the fields diverge. Will continue to investigate fuel-qa code.

Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

In a fuel-web it is created as it should.
Possible problem in fuel-qa.

Changed in fuel:
assignee: Aleksey Kasatkin (alekseyk-ru) → Alexandr Kostrikov (akostrikov-mirantis)
Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

As I found out networks were created correctly, but they were updated with corrupted data via put.
I am going to verify it. Will post update with logs ASAP.

Changed in fuel:
status: New → Confirmed
Revision history for this message
Vitaly Sedelnik (vsedelnik) wrote :

Won't Fix for 7.0-updates because of Medium importance

Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/8.0.x
Dmitry Pyzhov (dpyzhov)
tags: added: area-qa
Revision history for this message
Tatyanka (tatyana-leontovich) wrote :

move to 9.0 according to we do not fix medium issues in 8.0 anymore

Changed in fuel:
milestone: 8.0 → 9.0
Changed in fuel:
assignee: Alexandr Kostrikov (akostrikov-mirantis) → Fuel QA Team (fuel-qa)
Changed in fuel:
status: Confirmed → 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.