openstack-config can be assigned to node with invalid cluster_id

Bug #1523534 reported by Alexander Saprykin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Alexander Saprykin

Bug Description

[root@fuel ~]# fuel nodes
id | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|--------|------------------|---------|-----------|-------------------|------------|---------------|--------|---------
2 | ready | Untitled (c4:ac) | 2 | 10.20.0.5 | be:08:13:82:c4:ac | compute | | True | 2
1 | ready | Untitled (21:a5) | 2 | 10.20.0.4 | 7a:01:6d:7c:21:a5 | controller | | True | 2

[root@fuel ~]# fuel openstack-config --upload --env-id 3 --node-id 1 --file test.yaml
Openstack configuration with id 3 has been uploaded from file 'test.yaml'
[root@fuel ~]# fuel openstack-config --list --env-id 2
id | is_active | config_type | cluster_id | node_id | node_role
---|-----------|-------------|------------|---------|----------
1 | True | cluster | 2 | None | None

Expected behavior:
API should check node's cluster id and return an error if they are not equal.

Changed in fuel:
importance: Undecided → High
assignee: nobody → Fuel Mixed (fuel-mixed-team)
milestone: none → 8.0
tags: added: area-build module-nailgun
tags: added: tech-debt
Changed in fuel:
status: New → Confirmed
assignee: Fuel Mixed (fuel-mixed-team) → Fuel Python Team (fuel-python)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Alexander Saprykin (cutwater)
status: Confirmed → In Progress
tags: added: feature-openstack-config-change team-mixed
tags: removed: team-mixed
tags: added: team-mixed
Roman Vyalov (r0mikiam)
tags: removed: area-build
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/254757

Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/254757
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=4f028385f8cd4a9385754fde7c9a6d1e528a422d
Submitter: Jenkins
Branch: master

commit 4f028385f8cd4a9385754fde7c9a6d1e528a422d
Author: Alexander Saprykin <email address hidden>
Date: Tue Dec 8 14:29:53 2015 +0100

    Raise an error when trying to upload config with invalid cluster_id

    Check if node is assigned to specified cluster when trying to
    upload new configuration. Otherwise fail.

    Change-Id: I434b61d3887fbe2b23ae2ddedb41c80b944b2451
    Closes-Bug: #1523534

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

Verify with ISO 284

[root@nailgun ~]# fuel openstack-config --upload --env-id 3 --node-id 1 --file 1.yaml
404 Client Error: Not Found (Cluster not found)

Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

For the node-id:

[root@nailgun ~]# fuel openstack-config --upload --env-id 1 --node-id 111 --file 1.yaml
404 Client Error: Not Found (Node not found)

Changed in fuel:
status: Fix Committed → Fix Released
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.