Inconsistent role assignment rules

Bug #1510354 reported by Sergii Shevchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Maciej Kwiek

Bug Description

Fuel 7.0

There is an inconsistency in role/task assignment rules for 'master' role. These tasks are meant to be executed on Fuel master node.

If 'master' role is supplied as an array value the system does not recognize this task and does not execute it on Fuel master node. Here is an example of a problem task definition in Fuel plugin:

...
- id: generate_keystone_keys
  parameters:
    cmd: sh /var/www/nailgun/plugins/token-provider-1.0/generate_keys.sh
    cwd: /
    timeout: 180
  required_for:
  - pre_deployment_end
  requires:
  - pre_deployment_start
  role:
  - master
  type: shell
...

Here is an example of an 'out-of-box' 'master' task:

fuel env --env <env_number> --deployment-tasks --download

in deployment_tasks.yaml:

...
- id: generate_keys
  parameters:
    cmd: sh /etc/puppet/modules/osnailyfacter/modular/astute/generate_keys.sh -i {CLUSTER_ID}
      -o 'mongodb' -s 'neutron nova mysql' -p /var/lib/fuel/keys/
    timeout: 180
  required_for:
  - copy_keys
  requires:
  - pre_deployment_start
  role: master
  type: shell
...

note 'master' is a string value here, while non-master tasks have arrays of roles assigned.

If a task is created using Fuel plugin, you can't assign string value to a role - fuel plugin builder does not allow to build plugin with such a task.

As a workaround I had to manually change role definition from array to string after plugin installation and perform plugins sync.

In order to resolve the problem it's needed to either allow fuel plugin builder to build plugins with strings in role definitions or make Fuel to recognize 'master' as an array value in role definitions.

Changed in fuel:
milestone: none → 8.0
assignee: nobody → Fuel Python Team (fuel-python)
Maciej Relewicz (rlu)
Changed in fuel:
importance: Undecided → Medium
Dmitry Pyzhov (dpyzhov)
tags: added: area-python
tags: added: customer-found
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: New → Confirmed
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-plugins (master)

Fix proposed to branch: master
Review: https://review.openstack.org/241165

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

Reviewed: https://review.openstack.org/241165
Committed: https://git.openstack.org/cgit/openstack/fuel-plugins/commit/?id=4fc2499243f0dba0444581eaaf2c3a156f19fa65
Submitter: Jenkins
Branch: master

commit 4fc2499243f0dba0444581eaaf2c3a156f19fa65
Author: Maciej Kwiek <email address hidden>
Date: Tue Nov 3 12:11:53 2015 +0100

    Fuel plugin builder accepts 'master' as task role

    Schema for all versions was updated to accept also 'master' string as
    deployment task role, in addition to previous possible values:
    '*' string and array of strings matching '^[0-9a-zA-Z_-]+$' regex.

    Closes-bug: #1510354
    DocImpact

    Change-Id: Iaaf17bf42efb27beda23cf6a46137e380f8569c0

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Nastya Urlapova (aurlapova) wrote :

Verified: on:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "570"
  build_id: "570"
  fuel-nailgun_sha: "558ca91a854cf29e395940c232911ffb851899c1"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "c2a335b5b725f1b994f78d4c78723d29fa44685a"
  fuel-ostf_sha: "3bc76a63a9e7d195ff34eadc29552f4235fa6c52"
  fuel-mirror_sha: "fb45b80d7bee5899d931f926e5c9512e2b442749"
  fuelmenu_sha: "78ffc73065a9674b707c081d128cb7eea611474f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "d605bcbabf315382d56d0ce8143458be67c53434"

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.