role restriction format could be full or short

Bug #1586334 reported by Vladimir Kozhukalov
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Bulat Gaifullin
Mitaka
Fix Released
High
Bulat Gaifullin

Bug Description

According to wiki page role restrictions could be defined in full or short format

restrictions:
  - condition: "settings:other_plugin == null or settings:other_plugin.metadata.enabled != true"
    strict: false
    message: "Other plugin must be installed and enabled"

restrictions:
  - "settings:common.libvirt_type.value != 'kvm'": "KVM only is supported"
  - "settings:storage.volumes_ceph.value == true"

our current code does not corresponds to this

https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/api/v1/validators/assignment.py#L148-L157

Tags: area-python
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/322044

Changed in fuel:
status: New → In Progress
Changed in fuel:
assignee: Vladimir Kozhukalov (kozhukalov) → Bulat Gaifullin (bgaifullin)
Revision history for this message
Bulat Gaifullin (bulat.gaifullin) wrote :

ETA: 1 day

Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/324566

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

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

commit 8eb9c613b498723fa19b93f19b6d9f3637feed50
Author: Vladimir Kozhukalov <email address hidden>
Date: Fri May 27 12:53:59 2016 +0300

    Fix role restriction iteration cycle according to docs

    Role restrictions could be defined in full or short format

    restrictions:
      - condition: "settings:other_plugin == null or settings:other_plugin.metadata.enabled != true"
        message: "Other plugin must be installed and enabled"
      - "settings:common.libvirt_type.value != 'kvm'": "KVM only is supported"
      - "settings:storage.volumes_ceph.value == true"

    This patch fixes restriction iteration cycle.

    Change-Id: I6072ea9e92999ae7a94f28f42bb475b30bb7fff1
    Closes-Bug: #1586334

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

Reviewed: https://review.openstack.org/324566
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=566417718634e1b94f35d6341d9e098ec9ebba3a
Submitter: Jenkins
Branch: stable/mitaka

commit 566417718634e1b94f35d6341d9e098ec9ebba3a
Author: Vladimir Kozhukalov <email address hidden>
Date: Fri May 27 12:53:59 2016 +0300

    Fix role restriction iteration cycle according to docs

    Role restrictions could be defined in full or short format

    restrictions:
      - condition: "settings:other_plugin == null or settings:other_plugin.metadata.enabled != true"
        message: "Other plugin must be installed and enabled"
      - "settings:common.libvirt_type.value != 'kvm'": "KVM only is supported"
      - "settings:storage.volumes_ceph.value == true"

    This patch fixes restriction iteration cycle.

    Change-Id: I6072ea9e92999ae7a94f28f42bb475b30bb7fff1
    Closes-Bug: #1586334

tags: added: on-verification
Revision history for this message
Maksym Strukov (unbelll) wrote :

Verified as fixed in 9.0-mos-485

Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.0 ISO #465 (fuel-9.0-mos-465-2016-06-09_22-51-38.iso).

Steps for verification have been taken from duplicated bugs: 1586287, 1587415.
In both cases re-deployment after adding new node with appropriate role was finished successfully.

[root@nailgun ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 465
cat /etc/fuel_build_number:
 465
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-release-9.0.0-1.mos6349.noarch
 fuel-misc-9.0.0-1.mos8454.noarch
 python-packetary-9.0.0-1.mos140.noarch
 fuel-bootstrap-cli-9.0.0-1.mos285.noarch
 fuel-migrate-9.0.0-1.mos8454.noarch
 shotgun-9.0.0-1.mos90.noarch
 fuel-notify-9.0.0-1.mos8454.noarch
 nailgun-mcagents-9.0.0-1.mos750.noarch
 python-fuelclient-9.0.0-1.mos325.noarch
 fuel-9.0.0-1.mos6349.noarch
 fuel-utils-9.0.0-1.mos8454.noarch
 fuel-setup-9.0.0-1.mos6349.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8742.noarch
 fuel-library9.0-9.0.0-1.mos8454.noarch
 network-checker-9.0.0-1.mos74.x86_64
 fuel-agent-9.0.0-1.mos285.noarch
 fuel-ui-9.0.0-1.mos2717.noarch
 fuel-ostf-9.0.0-1.mos935.noarch
 fuelmenu-9.0.0-1.mos274.noarch
 fuel-nailgun-9.0.0-1.mos8742.noarch
 rubygem-astute-9.0.0-1.mos750.noarch
 fuel-mirror-9.0.0-1.mos140.noarch
 fuel-openstack-metadata-9.0.0-1.mos8742.noarch

[root@nailgun ~]# fuel plugins list
id | name | version | package_version | releases
---+-----------------+---------+-----------------+--------------------
1 | detach-database | 1.1.0 | 3.0.0 | ubuntu (mitaka-9.0)
2 | detach-keystone | 1.0.2 | 3.0.0 | ubuntu (mitaka-9.0)
3 | detach-rabbitmq | 1.0.1 | 3.0.0 | ubuntu (mitaka-9.0)

[root@nailgun ~]# rpm -qp detach-database-1.1-1.1.0-1.noarch.rpm
detach-database-1.1-1.1.0-1.noarch
[root@nailgun ~]# rpm -qp detach-keystone-1.0-1.0.2-1.noarch.rpm
detach-keystone-1.0-1.0.2-1.noarch
[root@nailgun ~]# rpm -qp detach-rabbitmq-1.0-1.0.1-1.noarch.rpm
detach-rabbitmq-1.0-1.0.1-1.noarch

tags: removed: on-verification
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.