PowerVM driver passing bad kwargs into Task init method

Bug #1748950 reported by Eric Berglund
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Eric Berglund

Bug Description

The PowerVM virt driver is passing the instance as the first argument to the Task init in a few places [1] [2]. The init method [3] expects the first arg to be the task name. This results in the task name being the string representation of the instance. The instance should no longer be passed into the Task init and the task names should be passed to the init using the name kwarg.

This doesn't break the typical flows, however if the instance has any non-ascii characters in the string representation, the task will fail to compile.

This affects queens and master branches using the PowerVM virt driver.

[1] https://github.com/openstack/nova/blob/17.0.0.0rc1/nova/virt/powervm/tasks/storage.py#L160
[2] https://github.com/openstack/nova/blob/17.0.0.0rc1/nova/virt/powervm/tasks/storage.py#L200
[3] https://github.com/openstack/taskflow/blob/3.1.0/taskflow/task.py#L62

Eric Berglund (esberglu)
Changed in nova:
assignee: nobody → Eric Berglund (esberglu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
Matthew Edmonds (edmondsw) wrote :

This problem was introduced in Queens, so I'd like to see us get it into RC2 if possible.

tags: added: queens-rc-potential
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/544109

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/543571
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=db686fe1856456e5e1486f0935aa4426c805520f
Submitter: Zuul
Branch: master

commit db686fe1856456e5e1486f0935aa4426c805520f
Author: esberglu <email address hidden>
Date: Mon Feb 12 12:18:57 2018 -0600

    Use correct arguments in task inits

    The CreateAndConnectCfgDrive and DeleteVOpt tasks were passing the
    instance into the task.Task init as the first argument. The first arg
    for the Task init is actually the task name [1]. This means that those
    task names were string representations of the instance which will cause
    failures if there are any non-ascii characters. This corrects the Task
    init calls by removing instance as the first argument. The name kwarg
    is now being used throughout the PowerVM tasks to avoid similar issues
    in the future.

    [1] https://github.com/openstack/taskflow/blob/3.1.0/taskflow/task.py#L62

    Change-Id: I991a5ea33daa9a21f774fe24882ed40f990b8e0e
    Closes-Bug: #1748950

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.openstack.org/544109
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a01caaa30bd44d1836c5b191b7cf9b573a1d2eff
Submitter: Zuul
Branch: stable/queens

commit a01caaa30bd44d1836c5b191b7cf9b573a1d2eff
Author: esberglu <email address hidden>
Date: Mon Feb 12 12:18:57 2018 -0600

    Use correct arguments in task inits

    The CreateAndConnectCfgDrive and DeleteVOpt tasks were passing the
    instance into the task.Task init as the first argument. The first arg
    for the Task init is actually the task name [1]. This means that those
    task names were string representations of the instance which will cause
    failures if there are any non-ascii characters. This corrects the Task
    init calls by removing instance as the first argument. The name kwarg
    is now being used throughout the PowerVM tasks to avoid similar issues
    in the future.

    [1] https://github.com/openstack/taskflow/blob/3.1.0/taskflow/task.py#L62

    Change-Id: I991a5ea33daa9a21f774fe24882ed40f990b8e0e
    Closes-Bug: #1748950
    (cherry picked from commit db686fe1856456e5e1486f0935aa4426c805520f)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0rc2

This issue was fixed in the openstack/nova 17.0.0.0rc2 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.0.0.0b1

This issue was fixed in the openstack/nova 18.0.0.0b1 development milestone.

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.