[fuel-plugin-builder] verify usage of 'groups' and 'role' for tasks

Bug #1596949 reported by Eugene Korekin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel Sustaining
8.0.x
Won't Fix
Medium
Fuel Sustaining

Bug Description

Plugin tasks in the main deployment stage are supposed to have the 'groups' keyword in them, while tasks in pre/post deployment stage are supposed to have the 'role' keyword in it. It creates severe confusion for our partners as FPB does not in any way restricts this and the effects of the misuse are hard to debug.

For example, if we define the task:

- id: fuel-plugin-example-iotop
  type: puppet
  groups: [primary-controller, controller]
  requires: [post_deployment_start]
  required_for: [post_deployment_end]
  parameters:
    puppet_manifest: puppet/manifests/install_iotop.pp
    puppet_modules: puppet/modules:/etc/puppet/modules

in our plugin, the deployment will fail with the error: Tasks can not be processed because it contains cycles in it.

I suggest to add the explicit checks to FPB. It should fail to build a plugin if plugin's tasks contain:

1) 'groups' in pre/post-deployment tasks
2) 'role' in main stage of deployment

May be it's also worth to add the corresponding check to nailgun itself.

# cat /etc/fuel/version.yaml
VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "589"
  build_id: "589"
  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: "643a1ef27c7dccc1c2a2ad26b85c09226b35a67d"

# python -c 'import pkg_resources; print pkg_resources.get_distribution("fuel-plugin-builder").version'
4.0.0

But as far as I know it affects any version of Fuel and FPB.

tags: added: area-plugins
Changed in fuel:
importance: Undecided → Medium
status: New → Confirmed
milestone: none → 10.0
Changed in fuel:
assignee: nobody → Fuel Python (Deprecated) (fuel-python)
Changed in fuel:
assignee: Fuel Python (Deprecated) (fuel-python) → Fuel Sustaining (fuel-sustaining-team)
tags: added: area-python
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

We moved to task based deployments in Mitaka that doesn't have this issue. Closing the bug.

Changed in fuel:
status: Confirmed → Invalid
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.