Deployment should fail if there are no deployment tasks

Bug #1448066 reported by Matthew Mosesohn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Sylwester Brzeczkowski

Bug Description

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "6.1"
  openstack_version: "2014.2-6.1"
  api: "1.0"
  build_number: "337"
  build_id: "2015-04-21_22-54-31"
  nailgun_sha: "3928c5aee6e7aabad37cf0665acc6790ef220141"
  python-fuelclient_sha: "08640730176591a3818f24e75b710f8c95846e6e"
  astute_sha: "bf1751a4fe0d912325e3b4af629126a59c1b2b51"
  fuel-library_sha: "af4eee78a4dd6e6606079f5515bac91c45b04114"
  fuel-ostf_sha: "df8db1f48f03b18126ce5ec65317a1eb83a5a95f"
  fuelmain_sha: "aad0a7ad97a5660f5d53fa830b168d36fa9694eb"

[root@nailgun ~]# fuel rel --sync-deployment-tasks --dir /etc/puppet/; echo $?
DEPRECATION WARNING: file /etc/fuel/client/config.yaml is found and will be used as a source for settings. However, it deprecated and will not be used by default in the ongoing version of python-fuelclient.
No tasks found for release Juno on Ubuntu 14.04.1 of version 2014.2-6.1
No tasks found for release Juno on CentOS 6.5 of version 2014.2-6.1
0

This issue is fixed on most ISOs, but this is a silent failure and image-based deployment will fail later. We should fail here if there are releases without any tasks with a non-zero exit code.

Changed in fuel:
importance: Undecided → High
milestone: none → 6.1
assignee: nobody → Fuel Python Team (fuel-python)
Dmitry Pyzhov (dpyzhov)
tags: added: module-client
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

My concern is that the client should not fail if request to the server passed succesfully and the result was rendered correctly. If lack of tasks means an error on the server side then it the server that should fail, not the client.

Moreover, some people and projects use their own implementations of API clients so "fixing" this issue on the client side won't help them.

Revision history for this message
Dima Shulyak (dshulyak) wrote :

I would add additional validation before deployment to verify that tasks are stored in database for cluster with release > 6.1,
and if there is no tasks available return 400 (another error code) and ask user to upload them.

Also we can add a suggestion to look for tasks in /etc/puppet/ if they are operating from master node.

tags: added: module-nailgun module-tasks
removed: module-client
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Roman Prykhodchenko (romcheg) → Dima Shulyak (dshulyak)
status: New → Confirmed
Dima Shulyak (dshulyak)
Changed in fuel:
assignee: Dima Shulyak (dshulyak) → Fuel Python Team (fuel-python)
Dmitry Pyzhov (dpyzhov)
summary: - No tasks found for release Juno should return 1
+ Deployment should fail if there are no deployment tasks
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

We will try to fit this medium bug into 6.1

Changed in fuel:
importance: High → Medium
Changed in fuel:
importance: Medium → High
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Sylwester Brzeczkowski (sbrzeczkowski)
Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Sylwester Brzeczkowski (sbrzeczkowski) wrote :

I'm now trying to find out whether this is really a bug

Changed in fuel:
status: In Progress → Confirmed
Revision history for this message
Dima Shulyak (dshulyak) wrote :

For all releases >= 6.1 - there is no chance that deployment will succeed without tasks present in database.
By default we are always trying to upload tasks to nailgun db during bootstrap/upgrade of the Fuel master, but sometimes
bootstrap is done manually and/or artifacts that affects tasks lookup are changed (example: version in /etc/puppet/release).

That will lead to failed deployment - with hidden root cause, and that will confuse many people. So in order to help with debugging/troubleshotting - my suggestion is to add necessary validation as stated in https://bugs.launchpad.net/fuel/+bug/1448066/comments/2

Changed in fuel:
status: Confirmed → In Progress
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/180889

Revision history for this message
Mike Scherbakov (mihgen) wrote :

Folks, is the current status of this bug? What are the action items planned?

Revision history for this message
Sylwester Brzeczkowski (sbrzeczkowski) wrote :

It's actually done and it's working, but my fix broke down ~20 tests because I also discovered some deprecated code that I had to change.
So I'm working on the test now. In most cases assertions are expecting "cast" to be called, but since there's an error raised due to lack of deployment tasks, cast shouldn'd be called at all.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-dev-tools (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/183052

Changed in fuel:
assignee: Sylwester Brzeczkowski (sbrzeczkowski) → Sebastian Kalinowski (prmtl)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-dev-tools (master)

Change abandoned by Sylwester Brzeczkowski (<email address hidden>) on branch: master
Review: https://review.openstack.org/183052
Reason: cmd merged with "loaddefault"

Changed in fuel:
assignee: Sebastian Kalinowski (prmtl) → Sylwester Brzeczkowski (sbrzeczkowski)
Changed in fuel:
assignee: Sylwester Brzeczkowski (sbrzeczkowski) → Łukasz Oleś (loles)
Łukasz Oleś (loles)
Changed in fuel:
assignee: Łukasz Oleś (loles) → Sylwester Brzeczkowski (sbrzeczkowski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/180889
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=6b6219e74e60659305fd42fa59ba290d920061b6
Submitter: Jenkins
Branch: master

commit 6b6219e74e60659305fd42fa59ba290d920061b6
Author: Sylwester Brzeczkowski <email address hidden>
Date: Thu May 7 08:53:54 2015 +0200

    Raise error once there's no deployment tasks in db

    Added new exception 'NoDeploymentTasks' which is raised when user
    is trying to manually deploy cluster whose release has empty
    'deployment_tasks' and 'fuel_version' >= 6.1

    Added loading of fake deployment tasks in both test Environment class
    and 'loaddefault' command - so it also works in fake mode.

    Change-Id: Ibaee6912cfbca27dbb35c4f9c09feb74c81b02a1
    Closes-Bug: #1448066

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.