paunch: get_all_cpus() isn't consistent on PPC

Bug #1868135 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

In Paunch, we have a method to figure out all available CPUs on a host: get_all_cpus().

The code is the following:

"0-" + str(psutil.cpu_count() - 1)

But it can be problematic on PPC and some servers where the CPUs numbers aren't following from each other.

e.g. 0,8,16,24,32,40,48,56,64,72,80

The method sounds dangerous, and we should rather let Docker figuring out by itself what CPUs are online.

Changed in tripleo:
status: New → Triaged
importance: Undecided → High
milestone: none → ussuri-3
assignee: nobody → Emilien Macchi (emilienm)
tags: added: queens-backport-potential
tags: added: stein-backport-potential train-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (master)

Fix proposed to branch: master
Review: https://review.opendev.org/713932

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/713985

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/713987

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to paunch (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/713991

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

Reviewed: https://review.opendev.org/713932
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=9b6276512141693bddd064c915b08c1d027e5985
Submitter: Zuul
Branch: master

commit 9b6276512141693bddd064c915b08c1d027e5985
Author: Emilien Macchi <email address hidden>
Date: Thu Mar 19 12:47:57 2020 -0400

    Do not set cpuset-cpus if cconfig['cpuset_cpus'] == 'all'

    In the case of nova_libvirt container, we want to use all CPUs that are
    reported online.
    Rather than computing the list with Python (which has proven to be
    problematic on PPC), let the container engine figuring it out by itself
    like it was the case before.

    Change-Id: I5d1b88c90dbc4114d996008a407cd1dd9a6eb9da
    Closes-Bug: #1868135

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

Reviewed: https://review.opendev.org/713991
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=341e5f6337f8260c9ee2304a8b6562f8aff98cd9
Submitter: Zuul
Branch: stable/queens

commit 341e5f6337f8260c9ee2304a8b6562f8aff98cd9
Author: Emilien Macchi <email address hidden>
Date: Thu Mar 19 12:47:57 2020 -0400

    Do not set cpuset-cpus if cconfig['cpuset_cpus'] == 'all'

    In the case of nova_libvirt container, we want to use all CPUs that are
    reported online.
    Rather than computing the list with Python (which has proven to be
    problematic on PPC), let the container engine figuring it out by itself
    like it was the case before.

    Change-Id: I5d1b88c90dbc4114d996008a407cd1dd9a6eb9da
    Closes-Bug: #1868135
    (cherry picked from commit 9b6276512141693bddd064c915b08c1d027e5985)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to paunch (stable/train)

Reviewed: https://review.opendev.org/713985
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=ebc49c444f2fa3077d60dd79c221a7dcd1f443ec
Submitter: Zuul
Branch: stable/train

commit ebc49c444f2fa3077d60dd79c221a7dcd1f443ec
Author: Emilien Macchi <email address hidden>
Date: Thu Mar 19 12:47:57 2020 -0400

    Do not set cpuset-cpus if cconfig['cpuset_cpus'] == 'all'

    In the case of nova_libvirt container, we want to use all CPUs that are
    reported online.
    Rather than computing the list with Python (which has proven to be
    problematic on PPC), let the container engine figuring it out by itself
    like it was the case before.

    Change-Id: I5d1b88c90dbc4114d996008a407cd1dd9a6eb9da
    Closes-Bug: #1868135
    (cherry picked from commit 9b6276512141693bddd064c915b08c1d027e5985)

tags: added: in-stable-train
tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to paunch (stable/stein)

Reviewed: https://review.opendev.org/713987
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=01d9f1c7348963ea5778a4a89ddb6c93f6365a21
Submitter: Zuul
Branch: stable/stein

commit 01d9f1c7348963ea5778a4a89ddb6c93f6365a21
Author: Emilien Macchi <email address hidden>
Date: Thu Mar 19 12:47:57 2020 -0400

    Do not set cpuset-cpus if cconfig['cpuset_cpus'] == 'all'

    In the case of nova_libvirt container, we want to use all CPUs that are
    reported online.
    Rather than computing the list with Python (which has proven to be
    problematic on PPC), let the container engine figuring it out by itself
    like it was the case before.

    Change-Id: I5d1b88c90dbc4114d996008a407cd1dd9a6eb9da
    Closes-Bug: #1868135
    (cherry picked from commit 9b6276512141693bddd064c915b08c1d027e5985)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/paunch 6.0.2

This issue was fixed in the openstack/paunch 6.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/paunch queens-eol

This issue was fixed in the openstack/paunch queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/paunch stein-eol

This issue was fixed in the openstack/paunch stein-eol release.

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.