Cant't update network group meta

Bug #1510591 reported by Kyrylo Galanov
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
High
Fuel Python (Deprecated)
7.0.x
Incomplete
High
Fuel Python (Deprecated)

Bug Description

Hello,

I can't update network meta in using release image. It returns a traceback.

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "301"
  build_id: "301"
  nailgun_sha: "4162b0c15adb425b37608c787944d1983f543aa8"
  python-fuelclient_sha: "486bde57cda1badb68f915f66c61b544108606f3"
  fuel-agent_sha: "50e90af6e3d560e9085ff71d2950cfbcca91af67"
  fuel-nailgun-agent_sha: "d7027952870a35db8dc52f185bb1158cdd3d1ebd"
  astute_sha: "6c5b73f93e24cc781c809db9159927655ced5012"
  fuel-library_sha: "5d50055aeca1dd0dc53b43825dc4c8f7780be9dd"
  fuel-ostf_sha: "2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c"
  fuelmain_sha: "a65d453215edb0284a2e4761be7a156bb5627677"

---
# fuel network-group
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
id | name | vlan_start | cidr | gateway | group_id
---|---------------|------------|----------------|-------------|---------
1 | fuelweb_admin | None | 10.109.10.0/24 | 10.109.10.1 | None
3 | management | 101 | 192.168.0.0/24 | None | 1
4 | storage | 102 | 192.168.1.0/24 | None | 1
2 | public | None | 10.109.11.0/24 | 10.109.11.1 | 1
5 | private | None | 192.168.2.0/24 | None | 1

---

# fuel network-group --set --network 5 --meta '{"name":
> "private", "notation": "cidr", "render_type": null, "map_priority": 2,
> "configurable": true, "use_gateway": true, "render_addr_mask":
> "internal", "vlan_start": null, "cidr": "192.168.2.0/24"}'
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
500 Server Error: Internal Server Error (Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nailgun/api/v1/handlers/base.py", line 166, in checked_data
    valid_data = method(data, **kwargs)
  File "/usr/lib/python2.6/site-packages/nailgun/api/v1/validators/network.py", line 543, in validate_update
    valid_data = cls.validate(data)
  File "/usr/lib/python2.6/site-packages/nailgun/api/v1/validators/network.py", line 524, in validate
    node_group = objects.NodeGroup.get_by_uid(d.get('group_id'))
  File "/usr/lib/python2.6/site-packages/nailgun/objects/base.py", line 88, in get_by_uid
    res = q.get(uid)
  File "/usr/lib64/python2.6/site-packages/sqlalchemy/orm/query.py", line 798, in get
    if len(ident) != len(mapper.primary_key):
TypeError: object of type 'NoneType' has no len()
)
---

Best regards,
Kyrylo

Tags: area-python
Changed in fuel:
assignee: nobody → Fuel Bugfix (fuel-bugfix-team)
Maciej Relewicz (rlu)
Changed in fuel:
importance: Undecided → Medium
Maciej Relewicz (rlu)
Changed in fuel:
milestone: none → 8.0
Revision history for this message
Dmitry Klenov (dklenov) wrote :

Kyrylo, can you please attach diagnostic snapshot to this bug?

Changed in fuel:
status: New → Incomplete
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Bugfix (fuel-bugfix-team) → Fuel Python Team (fuel-python)
tags: added: area-python
Revision history for this message
Dmitry Klenov (dklenov) wrote :

Too long in incomplete state. Closing as invalid.

@Kyrylo, feel free to reopen once you have new data.

Changed in fuel:
status: Incomplete → Invalid
Revision history for this message
Iryna Vovk (ivovk) wrote :
Download full text (3.7 KiB)

This issue occurred on my lab:

[root@nailgun ~]# fuel fuel-version
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
api: '1.0'
astute_sha: 6c5b73f93e24cc781c809db9159927655ced5012
auth_required: true
build_id: '301'
build_number: '301'
feature_groups:
- mirantis
fuel-agent_sha: 50e90af6e3d560e9085ff71d2950cfbcca91af67
fuel-library_sha: 5d50055aeca1dd0dc53b43825dc4c8f7780be9dd
fuel-nailgun-agent_sha: d7027952870a35db8dc52f185bb1158cdd3d1ebd
fuel-ostf_sha: 2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c
fuelmain_sha: a65d453215edb0284a2e4761be7a156bb5627677
nailgun_sha: 4162b0c15adb425b37608c787944d1983f543aa8
openstack_version: 2015.1.0-7.0
production: docker
python-fuelclient_sha: 486bde57cda1badb68f915f66c61b544108606f3
release: '7.0'
release_versions:
  2015.1.0-7.0:
    VERSION:
      api: '1.0'
      astute_sha: 6c5b73f93e24cc781c809db9159927655ced5012
      build_id: '301'
      build_number: '301'
      feature_groups:
      - mirantis
      fuel-agent_sha: 50e90af6e3d560e9085ff71d2950cfbcca91af67
      fuel-library_sha: 5d50055aeca1dd0dc53b43825dc4c8f7780be9dd
      fuel-nailgun-agent_sha: d7027952870a35db8dc52f185bb1158cdd3d1ebd
      fuel-ostf_sha: 2cd967dccd66cfc3a0abd6af9f31e5b4d150a11c
      fuelmain_sha: a65d453215edb0284a2e4761be7a156bb5627677
      nailgun_sha: 4162b0c15adb425b37608c787944d1983f543aa8
      openstack_version: 2015.1.0-7.0
      production: docker
      python-fuelclient_sha: 486bde57cda1badb68f915f66c61b544108606f3
      release: '7.0'

[root@nailgun ~]# fuel network-group --env 1
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
id | name | vlan_start | cidr | gateway | group_id
---|---------------|------------|---------------|------------|---------
1 | fuelweb_admin | None | 10.109.5.0/24 | 10.109.5.1 | None
2 | public | 101 | 10.109.6.0/24 | 10.109.6.1 | 1
4 | storage | 102 | 10.109.9.0/24 | 10.109.9.1 | 1
3 | management | 103 | 10.109.7.0/24 | 10.109.7.1 | 1
6 | private | None | 10.109.3.0/24 | 10.109.3.1 | 1

[root@nailgun ~]# fuel network-group --set --network 6 --meta '{"name": "private", "notation": "cidr", "render_type": null, "map_priority": 2, "configurable": true, "use_gateway": true, "render_addr_mask": "internal", "vlan_start": null, "cidr": "10.109.3.0/24"}'
DEPRECATION WARNING: /etc/fuel/client/config.yaml exists and will be used as the source for settings. This behavior is deprecated. Please specify the path to your custom settings file in the FUELCLIENT_CUSTOM_SETTINGS environment variable.
500 Server Error: Internal Server Error (Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nailgun/api/v1/handlers/base.py", line 166, in checked_data
    valid_data = method(data, **kwargs)
  File "/...

Read more...

Revision history for this message
Iryna Vovk (ivovk) wrote :
Changed in fuel:
status: Invalid → Confirmed
importance: Medium → High
Revision history for this message
Illia Polliul (ipolliul) wrote :

I've tried to apply MU on master node, but it doesn't fix the problem.

At the same time if you create master node from custom image from stable-7.0 branch, this command executes without errors.

Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

It was fixed on Sep, 24 by this commit: f7dac02379d706926757fca6c0fb42a2e2c7dcb2

Improve network group validation

The validation for creating network groups and updating
them has been split into two independent methods.
This change also prevents a network group's nodegroup from
being changed.

Change-Id: I0fb6e9c5f77effa8f1c81014f6151dafd98357d8
Closes-bug: #1494842
Closes-bug: #1494974

I'm not sure it is on MU.

Changed in fuel:
status: Confirmed → Invalid
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

Workaround: provide "--node-group <id>"

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.