I can assign node to nodegroup for other environment

Bug #1508395 reported by Anastasia Palkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Maciej Kwiek

Bug Description

1. I have node-12 which I added to env = 4
2. My nodegroup list
[root@fuel ~]# fuel nodegroup
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 | cluster | name
---|---------|--------
2 | 2 | default
3 | 3 | default
4 | 4 | default
[root@fuel ~]#

3. Try to assign node-12 to nodegroup=2
[root@fuel ~]# fuel --env 4 nodegroup --assign --node 12 --group 2
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.
[root@fuel ~]#

[root@fuel ~]# fuel node
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 | status | name | cluster | ip | mac | roles | pending_roles | online | group_id
---|-------------|------------------|---------|------------|-------------------|------------------------------------------|---------------|--------|---------
5 | provisioned | Untitled (63:5c) | 2 | 10.20.0.11 | 08:00:27:c0:63:5c | compute | | True | 2
3 | error | Untitled (71:d0) | 2 | 10.20.0.10 | 08:00:27:9a:71:d0 | controller | | True | 2
6 | ready | Untitled (f1:27) | 2 | 10.20.0.12 | 08:00:27:b6:f1:27 | standalone-database, standalone-keystone | | True | 2
12 | discover | Untitled (ac:ef) | 4 | 10.20.0.16 | 08:00:27:af:ac:ef | | controller | True | 2
11 | ready | Untitled (45:9e) | 3 | 10.20.0.8 | 08:00:27:bb:45:9e | controller | | True | 3
10 | ready | Untitled (cc:9e) | 3 | 10.20.0.5 | 08:00:27:43:cc:9e | mongo | | True | 3
7 | ready | Untitled (13:5d) | 3 | 10.20.0.9 | 08:00:27:de:13:5d | cinder, compute | | True | 3
15 | discover | Untitled (5e:2b) | None | 10.20.0.15 | 08:00:27:de:5e:2b | | | True | None
13 | discover | Untitled (6d:45) | None | 10.20.0.13 | 08:00:27:ec:6d:45 | | | True | None
14 | discover | Untitled (96:a9) | None | 10.20.0.14 | 08:00:27:b4:96:a9 | | | True | None
[root@fuel ~]#

Expected result: node should not assign to nodegroup for other environment

"fuel-createmirror_sha": "843736e50534d184f4b07744d68d0f2d27284cae", "api": "1.0", "fuelmain_sha": "eb669555ca18b0fb372c53857f1c7b2f10e669dd", "astute_sha": "7cea69bd021d6132cde473cdd25e5142fdddad95", "fuel-ostf_sha": "618eb749d78cce075c2b14664b59a06d92f142c2", "openstack_version": "2015.1.0-8.0", "build_id": "167", "build_number": "167", "auth_required": true, "fuel-library_sha": "790fa9354d06504698d8c722316bb428a35ef9b0", "fuel-nailgun-agent_sha": "08e0a11cf1f29b705e4b910d9b9db5e9b708b6e3", "fuel-nailgun_sha": "2e948eaa0152c886f280c5f42e88500a73c75011", "fuel-agent_sha": "49e2e8a08a3cf39d1b38ee155015332aa84e47fd", "production": "docker", "python-fuelclient_sha": "3975398ea980c4ab3786c043843dfaaf97b4404a", "feature_groups": ["mirantis"], "release": "8.0", "release_versions": {"2015.1.0-8.0": {"VERSION": {"fuel-createmirror_sha": "843736e50534d184f4b07744d68d0f2d27284cae", "api": "1.0", "fuelmain_sha": "eb669555ca18b0fb372c53857f1c7b2f10e669dd", "astute_sha": "7cea69bd021d6132cde473cdd25e5142fdddad95", "fuel-ostf_sha": "618eb749d78cce075c2b14664b59a06d92f142c2", "openstack_version": "2015.1.0-8.0", "build_id": "167", "build_number": "167", "fuel-library_sha": "790fa9354d06504698d8c722316bb428a35ef9b0", "fuel-nailgun-agent_sha": "08e0a11cf1f29b705e4b910d9b9db5e9b708b6e3", "fuel-nailgun_sha": "2e948eaa0152c886f280c5f42e88500a73c75011", "fuel-agent_sha": "49e2e8a08a3cf39d1b38ee155015332aa84e47fd", "production": "docker", "python-fuelclient_sha": "3975398ea980c4ab3786c043843dfaaf97b4404a", "feature_groups": ["mirantis"], "release": "8.0"}}}

Dmitry Pyzhov (dpyzhov)
tags: added: feature-nodegroup
Changed in fuel:
status: New → Confirmed
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Alexander Saprykin (cutwater)
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
Szymon Banka (sbanka)
Changed in fuel:
assignee: Alexander Saprykin (cutwater) → Fuel Python Team (fuel-python)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Maciej Kwiek (maciej-iai)
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/239673

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

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

commit aae84550e26af4a63a3ad78552c7d662983b7ef8
Author: Maciej Kwiek <email address hidden>
Date: Tue Oct 27 14:19:23 2015 +0100

    Adding node to group from other env is bad request

    Validator was tweaked to check if node cluster is the same as node group
    cluster.

    Change-Id: I5021c21fce736d595c604981d8c53cf0dde495ba
    Closes-bug: #1508395

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Anastasia Palkina (apalkina) wrote :

Verified on ISO #94

[root@fuel ~]# fuel --env 2 nodegroup --assign --node 3 --group 1
400 Client Error: Bad Request (Cannot assign node group (ID=1) to node 3. Node belongs to other cluster than node group)
[root@fuel ~]#

"release_versions": {"2015.1.0-8.0": {"VERSION": {"fuel-createmirror_sha": "5b61266e19eb7cdc745fea7a7d97c90f2515c921", "shotgun_sha": "bbbfccff9eb90895b13fae3fac398e65efe646f4", "api": "1.0", "fuelmain_sha": "0e375fb9f996ee6c3bf25b99321d9635c62844ae", "astute_sha": "687458e949dedfa6877e3a2e683f8ee0c1cbd43c", "fuel-ostf_sha": "1ab201cb8c3bba04522bf56ce72e863a03ff09b3", "openstack_version": "2015.1.0-8.0", "build_id": "94", "fuelmenu_sha": "153c91e884a4601d30f8ebe3349170f96e3456e2", "build_number": "94", "fuel-library_sha": "e1ad5b695e4bebc823b1786610efc0bafc078495", "fuel-nailgun-agent_sha": "00b4b11553c250f22c0079fb74c8b782dcb7b740", "fuel-nailgun_sha": "ca678db51afd14a1485d0a8a9d2194abdd226d3b", "fuel-agent_sha": "d2103bee6e216396eb8e308ec5448328c9ee4261", "production": "docker", "network-checker_sha": "518f7ef2706e564950469435f7cf27df175e1b27", "feature_groups": ["mirantis"], "release": "8.0", "python-fuelclient_sha": "2a1b048cc439986e222ece43a290b5cc68e92a77"}}}, "fuel-createmirror_sha": "5b61266e19eb7cdc745fea7a7d97c90f2515c921", "shotgun_sha": "bbbfccff9eb90895b13fae3fac398e65efe646f4", "api": "1.0", "fuelmain_sha": "0e375fb9f996ee6c3bf25b99321d9635c62844ae", "astute_sha": "687458e949dedfa6877e3a2e683f8ee0c1cbd43c", "fuel-ostf_sha": "1ab201cb8c3bba04522bf56ce72e863a03ff09b3", "openstack_version": "2015.1.0-8.0", "build_id": "94", "fuelmenu_sha": "153c91e884a4601d30f8ebe3349170f96e3456e2", "build_number": "94", "auth_required": true, "fuel-library_sha": "e1ad5b695e4bebc823b1786610efc0bafc078495", "fuel-nailgun-agent_sha": "00b4b11553c250f22c0079fb74c8b782dcb7b740", "fuel-nailgun_sha": "ca678db51afd14a1485d0a8a9d2194abdd226d3b", "fuel-agent_sha": "d2103bee6e216396eb8e308ec5448328c9ee4261", "production": "docker", "network-checker_sha": "518f7ef2706e564950469435f7cf27df175e1b27", "feature_groups": ["mirantis"], "release": "8.0", "python-fuelclient_sha": "2a1b048cc439986e222ece43a290b5cc68e92a77"

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.