Unexpected behavior when ephemeral "primary"role strategy set to parallel

Bug #1547604 reported by Dmitriy Stremkovskiy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Fuel Python (Deprecated)
Mitaka
Won't Fix
Medium
Fuel Python (Deprecated)
Newton
Invalid
Medium
Fuel Python (Deprecated)

Bug Description

Unexpected behavior when ephemeral "primary"role strategy set to parallel
primary-<rolename> gets NilClass weight.

Steps to reproduce:

1) Compile plugin with following
deployment_tasks.yaml:
- id: primary-lcm
  type: group
  role: [primary-lcm]
  tasks: [hiera, globals, tools, logging, netconfig, hosts, deploy_start]
  required_for: [lcm]
  parameters:
    strategy:
      type: parallel

- id: lcm
  type: group
  role: [lcm]
  tasks: [hiera, globals, tools, logging, netconfig, hosts, deploy_start]
  requires: [primary-lcm]
  parameters:
    strategy:
      type: parallel

- id: lcm-primary-controller
  type: puppet
  required_for: [deploy_end]
  requires: [hiera, netconfig, hosts, deploy_start]
  groups: [primary-lcm]
  parameters:
    puppet_manifest: "puppet/modules/plugin_lcm/manifests/lcm_primary.pp"
    puppet_modules: "puppet/modules:/etc/puppet/modules"
    timeout: 600

- id: lcm-controller
  type: puppet
  required_for: [deploy_end]
  requires: [deploy_start, hosts, lcm-primary-controller]
  groups: [lcm]
  parameters:
    puppet_manifest: "puppet/modules/plugin_lcm/manifests/lcm.pp"
    puppet_modules: "puppet/modules:/etc/puppet/modules"
    timeout: 600

node_roles.yaml:
lcm:
  name: "LCM - controller"
  description: "Install LCM controller"
  has_primary: true # whether has primary role or not
  public_ip_required: false # whether requires public net or not
  weight: 1000 # weight that will be used for ordering on fuel ui
  conflicts:
    - '*'

2) Install plugin
3) Enable plugin
4) Deploy new environment with this plugin

You should get empty role weight for 'primary-lcm' role

Strace:
2016-02-19 14:52:46 ERROR [2609] Error running RPC method granular_deploy: comparison of NilClass with 200 failed, trace:
["/usr/share/gems/gems/astute-9.0.0/lib/astute/deployment_engine.rb:45:in `sort_by'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/deployment_engine.rb:45:in `deploy'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/orchestrator.rb:216:in `deploy_cluster'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/orchestrator.rb:52:in `granular_deploy'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/dispatcher.rb:92:in `granular_deploy'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/server.rb:187:in `dispatch_message'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/server.rb:146:in `block in dispatch'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/task_queue.rb:64:in `call'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/task_queue.rb:64:in `block in each'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/task_queue.rb:56:in `each'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/task_queue.rb:56:in `each'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/server.rb:144:in `each_with_index'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/server.rb:144:in `dispatch'",
 "/usr/share/gems/gems/astute-9.0.0/lib/astute/server/server.rb:123:in `block in perform_main_job'"]

2016-02-19 14:52:46 INFO [2609] Casting message to Nailgun:
{"method"=>"deploy_resp",
 "args"=>
  {"task_uuid"=>"2636a9c3-8fa8-461d-98cf-55bae2a63b0c",
   "status"=>"error",
   "error"=>
    "Method granular_deploy. comparison of NilClass with 200 failed.\nInspect Astute logs for the details"}}

astute log attached.

Sad, but my fuel diagnostic snapshot is about 300M and could not be attached.

Expected: ephemeral role primary-<rolename> gets integer value weight

Revision history for this message
Dmitriy Stremkovskiy (dstremkouski) wrote :

Astute.log for debugging

Dmitry Klenov (dklenov)
tags: added: area-python
Changed in fuel:
milestone: none → 9.0
assignee: nobody → Fuel Python Team (fuel-python)
importance: Undecided → Medium
status: New → Confirmed
Dmitry Pyzhov (dpyzhov)
tags: added: team-enhancements
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

I wrote a unittest and checked graph serializer with the same set of deployment_tasks and the following role assignment

{'uid': '3', 'role': 'primary-lcm'},
                 {'uid': '1', 'role': 'lcm'},
                 {'uid': '2', 'role': 'primary-controller'},
                 {'uid': '4', 'role': 'controller'},
                 {'uid': '6', 'role': 'controller'},
                 {'uid': '7', 'role': 'lcm'}

I got the following priorities assignment.

[{'priority': 200, 'role': 'primary-lcm', 'uid': '3'}, {'priority': 400, 'role': 'lcm', 'uid': '1'}, {'priority': 100, 'role': 'primary-controller', 'uid': '2'}, {'priority': 300, 'role': 'controller', 'uid': '4'}, {'priority': 300, 'role': 'controller', 'uid': '6'}, {'priority': 400, 'role': 'lcm', 'uid': '7'}]

As you can see, there are no groups with empty priorities. We need to know what was your role assignment to continue troubleshooting this issue.

Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Maciej Relewicz (rlu) wrote :

Due to inactivity, bug was closed. Feel free to reopen the bug by providing the requested information and set the bug status back to ''New''.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.