flake8 failing on ubuntu-focal zuul machine

Bug #1895054 reported by Don Penney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Don Penney

Bug Description

Brief Description
-----------------
Zuul jobs running older flake8 (2.5.5, locked down by hacking==0.12.0) are failing on ubuntu-focal machines with the following error:
AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

This is causing Zuul failures in starlingx/utilities and starlingx/metal, for example:
https://review.opendev.org/750803
https://review.opendev.org/750805

Severity
--------
Critical

Steps to Reproduce
------------------
Can be reproduced by running tox in a ubuntu-focal container

Expected Behavior
------------------
flake8 should pass

Actual Behavior
----------------
older flake8 fails on python 3.8

Reproducibility
---------------
Reproducible, if zuul test runs on ubuntu-focal

Branch/Pull Time/Commit
-----------------------
master, as of Sept 9, 2020

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Adding stx.3.0, 4.0 & 5.0 (master) tags as this issue will impact submissions to any of these branches.

Changed in starlingx:
importance: Undecided → Critical
assignee: nobody → Don Penney (dpenney)
tags: added: stx.3.0 stx.4.0 stx.5.0 stx.zuul
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to metal (master)

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

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

Reviewed: https://review.opendev.org/750813
Committed: https://git.openstack.org/cgit/starlingx/utilities/commit/?id=5bc7a33773e947eef8caeb3f371afa816fbcb774
Submitter: Zuul
Branch: master

commit 5bc7a33773e947eef8caeb3f371afa816fbcb774
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:12:45 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the hacking constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: Ib24639adeea4da3063fb403a8e8484937f9e1a9f
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

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

Reviewed: https://review.opendev.org/750819
Committed: https://git.openstack.org/cgit/starlingx/metal/commit/?id=fcae730d65fe145e76a3d384360327a6b8f61c44
Submitter: Zuul
Branch: master

commit fcae730d65fe145e76a3d384360327a6b8f61c44
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:59:49 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 3.5.0 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: I16dc579f7ee803881c42ff6048ddd2f6bb0c553b
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (master)

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

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

Reviewed: https://review.opendev.org/751004
Committed: https://git.openstack.org/cgit/starlingx/stx-puppet/commit/?id=49de3e954e3187da34b43f2093d244bcb47127d1
Submitter: Zuul
Branch: master

commit 49de3e954e3187da34b43f2093d244bcb47127d1
Author: Don Penney <email address hidden>
Date: Thu Sep 10 10:27:53 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8.

    Change-Id: I8f82c818fd9653da14f042fffa4acf304fd76789
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

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

Reviewed: https://review.opendev.org/752286
Committed: https://git.openstack.org/cgit/starlingx/ha/commit/?id=57225bb34ae5380c95dddd0e556847f7a17e3d61
Submitter: Zuul
Branch: master

commit 57225bb34ae5380c95dddd0e556847f7a17e3d61
Author: albailey <email address hidden>
Date: Wed Sep 16 13:01:03 2020 -0500

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8.

    The linters can be run in python3.
    Pylint cannot be run in python3 because mysql-python is not
    compatable, so a new zuul job for pylint is now added.

    The flake8 errors that the newer version raises are all suppressed,
    and some of them should be addressed by someone with familiarity in
    this repo.

    Change-Id: Ida6447728d4175173c02130cb04a6013e4f966f9
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

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

Reviewed: https://review.opendev.org/753445
Committed: https://git.openstack.org/cgit/starlingx/integ/commit/?id=f779502f5a216d094cb5277cab65f268aa08956c
Submitter: Zuul
Branch: master

commit f779502f5a216d094cb5277cab65f268aa08956c
Author: Steven Webster <email address hidden>
Date: Tue Sep 22 16:20:02 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 3.6.0 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the version constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores

    Change-Id: Id22fb14e2cce76c2f4f5234abb3be4db68c70555
    Partial-Bug: 1895054
    Signed-off-by: Steven Webster <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to utilities (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/757417

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to utilities (f/centos8)

Reviewed: https://review.opendev.org/757417
Committed: https://git.openstack.org/cgit/starlingx/utilities/commit/?id=d29ed62e9e2413da3009b926aa3b274da516891a
Submitter: Zuul
Branch: f/centos8

commit d29ed62e9e2413da3009b926aa3b274da516891a
Author: Don Penney <email address hidden>
Date: Wed Sep 9 17:12:45 2020 -0400

    Use newer flake8 to run on ubuntu-focal Zuul machines

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    The update removes the hacking constraint to use newer flake8. This
    also ignores new warnings/errors, which should be addressed in a
    future update to remove the ignores.

    Change-Id: Ib24639adeea4da3063fb403a8e8484937f9e1a9f
    Partial-Bug: 1895054
    Signed-off-by: Don Penney <email address hidden>

tags: added: in-f-centos8
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to monitoring (master)

Reviewed: https://review.opendev.org/761668
Committed: https://git.openstack.org/cgit/starlingx/monitoring/commit/?id=ee7ae99d4181293368fb1d5bce4e6e69ccffd815
Submitter: Zuul
Branch: master

commit ee7ae99d4181293368fb1d5bce4e6e69ccffd815
Author: albailey <email address hidden>
Date: Thu Nov 5 14:56:47 2020 -0600

    Use newer flake8 on python3.8 zuul systems

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    Suppresses the following:
     W503 line break before binary operator
     W504 line break after binary operator
     W605 invalid escape sequence '\d'

     E117 over-indented
     E266 too many leading '#' for block comment
     E305 expected 2 blank lines after class or function definition, found 1
     E402 module level import not at top of file
     E722 do not use bare 'except'
     E741 ambiguous variable name 'I'

     F632 use ==/!= to compare constant literals
     F821 undefined name 'dpdk' (this is a flake8 bug)

    Change-Id: I6c2ef05d765b57b7be0b038d6e384cb2af589054
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-puppet (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/762919

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to integ (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/762968

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

Reviewed: https://review.opendev.org/762907
Committed: https://git.openstack.org/cgit/starlingx/fault/commit/?id=42a9cfa8829dba61b78a4784c5dfbe582e53ec4f
Submitter: Zuul
Branch: master

commit 42a9cfa8829dba61b78a4784c5dfbe582e53ec4f
Author: albailey <email address hidden>
Date: Mon Nov 16 13:09:11 2020 -0600

    Use newer flake8 on python3.8 zuul systems

    flake8 2.5.5 fails on ubuntu-focal zuul machines running python3.8
    with the following error:
    AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT'

    Fixed:
     E117 over-indented
     E741 ambiguous variable name
     F841 local variable is assigned to but never used

    Per-Line-Suppressed:
     E402 module level import not at top of file
     F632 use ==/!= to compare constant literals

    Global Suppress:
     W504 line break after binary operator
     W605 invalid escape sequence

    The suppressed errors can be fixed by later submissions.

    Change-Id: I2df3ece427f0c84ce16c1a82f4d9f0c9a5a6982b
    Partial-Bug: 1895054
    Signed-off-by: albailey <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on integ (f/centos8)

Change abandoned by Yong Fu (<email address hidden>) on branch: f/centos8
Review: https://review.opendev.org/762968

Don Penney (dpenney)
Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ha (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/ha/+/787550

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to utilities (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/utilities/+/792213

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ha (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/ha/+/792251

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gui (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/gui/+/792252

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gui (f/centos8)
Download full text (16.7 KiB)

Reviewed: https://review.opendev.org/c/starlingx/gui/+/792252
Committed: https://opendev.org/starlingx/gui/commit/63d6de4701a7f21779ad9ea4060fce9ed85bc71f
Submitter: "Zuul (22348)"
Branch: f/centos8

commit e05e1a43531499d94cfb1e538683ee36eea92b43
Author: Teresa Ho <email address hidden>
Date: Thu May 13 23:04:04 2021 -0400

    Do not display primary_reselect if not specified

    If the attribute 'primary_reselect' is not specified, the sysinv API
    will leave it as null and GUI will not display the attribute.

    Closes-Bug: 1928461

    Change-Id: I5b8ef8b29fb7775dde8607bb14cd733015269f82
    Signed-off-by: Teresa Ho <email address hidden>

commit f1a4d30eca91c7a239ebd7479a56fef7870a4b2e
Author: Pablo Bovina <email address hidden>
Date: Fri May 7 16:59:50 2021 -0300

    Display DataNetworks list

    DataNetworks are listed for pci-sriov
    under Create/Edit Interface forms.

    Closes-bug: 1927782
    Signed-off-by: Pablo Bovina <email address hidden>
    Change-Id: If927bb0facdec9e587a13354bef56eca5df08785

commit 7973677a3d7d518c31757b36037373d2c4ac769c
Author: Andre Fernando Zanella Kantek <email address hidden>
Date: Thu May 6 07:32:59 2021 -0400

    In AIO-SX, interface edit rejected with Host administrative unlocked

    It was detected the edit rejection when the user, on an unlocked
    host, tries to convert an ethernet non-SRIOV to an SRIOV-PF
    interface, with the server responding "Host 'controller-0' is
    administrative 'unlocked'".

    This is caused because UpdateInterface.handle() executes first the
    datanetwork assignment and then modifies the interface. Since the
    assignment, on an unlocked host, is only possible for SRIOV
    interfaces, the order of execution matters, we need to have the
    interface modified and then assigned. The correction consists of
    altering the order (first modify then assign) to do the described.

    Tests:
    To ensure the continuous operation of the other types of conversion
    the following combinations were tested (all were done adding the
    interface to a network or datanetwork, depending on the class):

    Unlocked state:
    ethernet/[none,data,pci-pt,platform] to pci-sriov: accepted
    modify parameters of a pci-sriov: rejected
    conversion to other than pci-sriov: rejected

    Locked state:
    all conversions (with network/datanetwork assignment) are accepted

    Closes-Bug: 1925183

    Signed-off-by: Andre Fernando Zanella Kantek <email address hidden>
    Change-Id: Ib124bf7222e07966becbb81198f65f5bc55715ce

commit ddcc4fd3ccb4c02580c71414345993252b089761
Author: Enzo Candotti <email address hidden>
Date: Tue May 4 11:08:57 2021 -0300

    Enable add/edit Worker personality on DC AIO-DX's GUI

    This update is to allow the option to add a new host with Worker
    personality on Distributed Cloud mode.

    Closes-Bug: 1927107

    Signed-off-by: Enzo Candotti <email address hidden>
    Change-Id: Idfed9352c7c6467014a2ed2cf10b70f6b470c28c

commit de43c019c0b7f038d0184d10aab2bf61b6c5e147
Author: Andre Fer...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to utilities (f/centos8)
Download full text (29.4 KiB)

Reviewed: https://review.opendev.org/c/starlingx/utilities/+/792213
Committed: https://opendev.org/starlingx/utilities/commit/c4d042615e6fe8944a4628fa1a29e86e012a9bf5
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 557cada006fd5a3bd81ad5af387c37657801f8c5
Author: Fernando Theirs <email address hidden>
Date: Thu May 13 16:21:47 2021 -0300

    Collect is missing etcdctl output

    When the collect tool is run, it does not include the contents
    of the etcd database. Fixes have been made for this to dump the
    contents in "etcd_database.dump" file.

    Verify if etcd access is secured. In that case, certificates
    will be used.

    Closes-Bug: 1911935

    Signed-off-by: Fernando Theirs <email address hidden>
    Change-Id: Idbc60edffa978a7a6bead939a4eb54f4abae29a6

commit 6045b1b8a0d8ed6a94d06cdfc994bf1a5fa9dbb5
Author: Jim Gauld <email address hidden>
Date: Thu May 6 11:58:34 2021 -0400

    Provide utility script is-rootdisk-device.sh

    This provides a utility script to determine which disk contains the root
    filesystem. This can also be used as a helper function for io-scheduler
    udev rules that require specific configuration for root disk.

    Example usage:
    /usr/local/bin/is-rootdisk-device.sh
    ROOTDISK_DEVICE=sda

    /usr/local/bin/is-rootdisk-device.sh /dev/sda
    ROOTDISK_DEVICE=sda

    /usr/local/bin/is-rootdisk-device.sh /dev/sdb
    (i.e., no output)

    Partial-Bug: 1927515
    Signed-off-by: Jim Gauld <email address hidden>
    Change-Id: Ib0d4a161a407b08d294c5ff9aa0b7590961e18c9

commit 88a678f142cfe86c58b6405aae6babbc08de0e8f
Author: Chen, Haochuan Z <email address hidden>
Date: Fri Mar 26 09:09:41 2021 +0800

    Add packages to stx-ceph-manager image

    This update installs ceph-mgr, ceph-mon, ceph-osd packages as part
    of stx-ceph-manager image.

    Partial-Bug: 1920882

    Change-Id: I4afde8b1476e14453fac8561f1edde7360b8ee96
    Signed-off-by: Chen, Haochuan Z <email address hidden>

commit 09b3542fcc6cc0300a9cae0d302225e6977780f3
Author: Scott Little <email address hidden>
Date: Thu Mar 25 11:49:49 2021 -0400

    Set SW_VERSION 21.05

    Prep for the StarlingX 5.0 release.
    SW_VERSION, also known as PLATFORM_RELEASE, uses YY.MM format.

    Story: 2008055
    Task: 42115
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: If7c91a2b523358269ae4850961cf4189ffcd7a75

commit ae4cefd0e2a0001476782c31e1003810da2b4838
Author: Chris Friesen <email address hidden>
Date: Thu Mar 4 18:04:12 2021 -0500

    add dcmanager-audit-worker to patch restart script

    Need to add the new process to the patch restart script.

    Story: 2007267
    Task: 41999
    Signed-off-by: Chris Friesen <email address hidden>
    Change-Id: If5faa806bd0d52ddbf1343b064959f4207cf975a

commit 27fce5a52321f3014fa8ae9181d344bc774289da
Author: Enzo Candotti <email address hidden>
Date: Mon Feb 1 12:47:38 2021 -0300

    Add resource CPU and memory info in collect

    This adds commands to collect more data to debug
    resource allocations and...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ha (f/centos8)
Download full text (20.2 KiB)

Reviewed: https://review.opendev.org/c/starlingx/ha/+/792251
Committed: https://opendev.org/starlingx/ha/commit/85bab5d2b394114feabe524504339a55eb8904e0
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 9f70df63fd0d83bf0f94d1b9ac2f98516d5971c8
Author: Bin Qian <email address hidden>
Date: Fri May 7 16:36:23 2021 -0400

    Fix no swact for failure of critical services

    This fix is to ensure keeping service failure counting over successful
    audit.

    When service enabled audit successfully completes, SM reset the service
    failure state. However it should not reset the service fail-count.
    The fail-count should only be reset after the grace period.

    Closes-Bug: 1893669
    Change-Id: I6996fe3f1c08c38da6f26243aee2b95b083069f0
    Signed-off-by: Bin Qian <email address hidden>

commit 0b99b594f83b7c626cc0c4f7dc970ce373a7b748
Author: Bin Qian <email address hidden>
Date: Tue May 4 11:33:43 2021 -0400

    Fix AIO-DX failover issues

    This fix is to fix AIO unexpected failover behaviors.
    1. active controller reboots itself when standby controller
       reboot/lost power
    2. standby controller becomes degraded after active controller
       reboot/lost power

    Closes-bug: 1927133
    Change-Id: If3c9f6251f689a89cd206c672092ba296f00bd6b
    Signed-off-by: Bin Qian <email address hidden>

commit cb5fa9510f3ebda66f9850ac697e542bf041ce8c
Author: Eric MacDonald <email address hidden>
Date: Tue Apr 27 09:43:00 2021 -0400

    Remove hbsAgent restart in failover failure recovery handling

    A forced reboot of the active controller in an AIO DC system
    puts SM into a failover failure recovery loop that prevents
    maintenance from detecting the heartbeat failure of the just-
    rebooted controller.

    The SM's failover failure recovery handling algorithm includes
    a self (sm process) restart preceded by a restart of the
    hbsAgent, both added by the following update last year.

    update: Add unhealthy state recovery audit to service management (sm)
    review: https://review.opendev.org/c/starlingx/ha/+/735219

    The self restart of SM was and is required in this case. However,
    the restart of the hbsAgent was only included as a safety measure,
    at the time, to ensure SM received updated cluster state info. The
    hbsAgent restart was only added at that time with the longer term
    intention to have it removed once the hbsAgent cluster state change
    notification improvement was implemented. That change is now
    implemented and merged by the following update.

    update: Mtce heartbeat cluster state change notification improvement
    review: https://review.opendev.org/c/starlingx/metal/+/769936

    Testing of the fix for the following issue in an AIO DC system
    resulted in the takeover controller not detecting a heartbeat loss
    of the just rebooted standby controller.

    title: Force active controller reboot results in a second reboot
    issue: https://bugs.launchpad.net/starlingx/+bug/1922584

    The hbsAgent is not able to detect the heartbeat loss of the just-
    booted controller because SM keeps re...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ha (f/centos8)

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/ha/+/787550

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by "Bart Wensley <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/ha/+/765061
Reason: This patch has been idle for more than six months. I am abandoning it to keep the review queue sane. If you are still interested in working on this patch, please unabandon it and upload a new patchset.

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.