Deploy stucks when new custom role added without deployment tasks

Bug #1446651 reported by Alexander Kurenyshev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Roman Prykhodchenko

Bug Description

Steps to reproduce:

1) Setup master node
2) SSH to the master node
3) Create file nginx.yaml with role description:

meta:
  description: Install Nginx
  name: Nginx
name: nginx
volumes_roles_mapping:
- allocate_size: min
  id: os

4) Create new role from file with a command:
fuel role --rel 2 --create --file nginx.yaml

5) Go to the Fuel UI and create new environment.
6) Add controller, compute, and new nginx role to the environment.
7) Provide correct configuration for network, settings, etc.
8) Deploy environment.

Expected behaviour:
Deploy will fail, because there is no tasks for new role

Actual behaviour:
Deploy stucks. There is an error in the log:

[7f1a0acca740] (manager) Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/nailgun/task/manager.py", line 55, in _call_silently
    to_return = method(task, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/nailgun/task/task.py", line 165, in message
    orchestrator_graph, task.cluster, nodes)
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 1826, in serialize
    cluster, nodes, ignore_customized=ignore_customized)
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 1381, in serialize
    cluster, node_group))
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 1390, in serialize_generated
    self.set_tasks(nodes)
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_serializers.py", line 1359, in set_tasks
    node['tasks'] = self.graph.deploy_task_serialize(node)
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_graph.py", line 385, in deploy_task_serialize
    tasks = self.graph.get_tasks(node['role']).topology
  File "/usr/lib/python2.6/site-packages/nailgun/orchestrator/deployment_graph.py", line 142, in get_tasks
    for task in self.predecessors(group_name):
  File "/usr/lib/python2.6/site-packages/networkx/classes/digraph.py", line 686, in predecessors
    return list(self.predecessors_iter(n))
  File "/usr/lib/python2.6/site-packages/networkx/classes/digraph.py", line 675, in predecessors_iter
    raise NetworkXError("The node %s is not in the digraph."%(n,))
NetworkXError: The node nginx is not in the digraph.

Fuel used:
api: '1.0'
astute_sha: d96a80b63198a578b2c159edbd76048819039eb0
auth_required: true
build_id: 2015-04-13_22-54-31
build_number: '310'
feature_groups:
- mirantis
fuellib_sha: 8b80657e9ceed8d59c2dff1c11e1481c7e69380e
fuelmain_sha: 335d3ed09ed79bd37e1f7a90442c4831c8845582
nailgun_sha: d22c074dec091e5ddd8ea3003c37665058303cd5
openstack_version: 2014.2-6.1
ostf_sha: c2a76a60ec4ebbd78e508216c2e12787bf25e423
production: docker
python-fuelclient_sha: 9208ff4a08dcb674ce2df132399a5aa3ddfac21c
release: '6.1'
release_versions:
  2014.2-6.1:
    VERSION:
      api: '1.0'
      astute_sha: d96a80b63198a578b2c159edbd76048819039eb0
      build_id: 2015-04-13_22-54-31
      build_number: '310'
      feature_groups:
      - mirantis
      fuellib_sha: 8b80657e9ceed8d59c2dff1c11e1481c7e69380e
      fuelmain_sha: 335d3ed09ed79bd37e1f7a90442c4831c8845582
      nailgun_sha: d22c074dec091e5ddd8ea3003c37665058303cd5
      openstack_version: 2014.2-6.1
      ostf_sha: c2a76a60ec4ebbd78e508216c2e12787bf25e423
      production: docker
      python-fuelclient_sha: 9208ff4a08dcb674ce2df132399a5aa3ddfac21c
      release: '6.1'

Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :
Changed in fuel:
milestone: none → 6.1
Revision history for this message
Dima Shulyak (dshulyak) wrote :

I think this is because we "lost" error handling when added background tasks with mules.
We need to check if that is true

Changed in fuel:
importance: Medium → High
status: New → Confirmed
tags: added: module-nailgun
Kamil Sambor (ksambor)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Kamil Sambor (ksambor)
Kamil Sambor (ksambor)
Changed in fuel:
status: Confirmed → In Progress
Kamil Sambor (ksambor)
Changed in fuel:
assignee: Kamil Sambor (ksambor) → Fuel Python Team (fuel-python)
status: In Progress → Confirmed
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Looks like this issue has the same background as this one https://bugs.launchpad.net/fuel/+bug/1436821. The patch for that is already published but it needs more research. I'll post an update on that soon.

Changed in fuel:
status: Confirmed → Triaged
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)
Changed in fuel:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/177279
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=5c6deb65230126cdc10748daa2355243e5232fe9
Submitter: Jenkins
Branch: master

commit 5c6deb65230126cdc10748daa2355243e5232fe9
Author: Roman Prykhodchenko <email address hidden>
Date: Fri Apr 24 16:13:32 2015 +0200

    Commit transactions after an exception in a task

    Tasks are now executed in mules so when an exception
    happens during an execution of one, task status is updated
    but not commited to the database because mules start separate
    transactions.

    This patch adds a commit clause to the error handler in tasks.

    Closes-bug: #1436821
    Closes-bug: #1446651
    Change-Id: I6c17d1cd88321940f2e23379965675e6b185ab1e

Changed in fuel:
status: In Progress → Fix Committed
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.