DistributedCloud flake8 sometimes failing in bugbear

Bug #1907125 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Al Bailey

Bug Description

Brief Description
-----------------
The pep8/flake8 tox and zuul targets that use bugbear (like distributed cloud) sometimes fail
depending on the python environment.

This is because the upper-constraints expect
 attrs 19.0.1
 bugbear 20.1.1 added code that requires attrs 19.0.2
 bugbear did not properly 'enforce' that requirements until a later release of bugbear, so the flake8 test can randomly fail in python3 systems

Severity
--------
Minor - This does not appear to impact zuul, and local designers only see it on certain developer setups.

Steps to Reproduce
------------------
cd distributedcloud/distributedcloud
tox -e pep8

Expected Behavior
------------------
Should pass

Actual Behavior
----------------
stx/distributedcloud/distributedcloud/.tox/pep8/lib/python3.6/site-packages/bugbear.py", line 150, in visit_ExceptHandler
    names.append("{}.{}".format(e.value.id, e.attr))
AttributeError: 'Attribute' object has no attribute 'id'

Reproducibility
---------------
This is seen in certain designer environments.
The version of pip may also be a factor.

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
N/A

Last Pass
---------
I can reliably get this to pass in one env and reliably fail in another with the same code in both.

Timestamp/Logs
--------------
stx/distributedcloud/distributedcloud/.tox/pep8/lib/python3.6/site-packages/bugbear.py", line 150, in visit_ExceptHandler
    names.append("{}.{}".format(e.value.id, e.attr))
AttributeError: 'Attribute' object has no attribute 'id'

Test Activity
-------------
Development

Workaround
----------
The workaround is to explicitly set the version of bugbear to be 20.1.0
20.1.1 introduced the code that expects the new version of attrs, and the 'stein' upper constraints does not permit the higher version of attrs from being used.

Al Bailey (albailey1974)
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

low priority - would be nice to fix to avoid impacts to developer environments, but doesn't seem to be causing zuul failures on submissions as per the reporter's comments

tags: added: stx.zuul
Changed in starlingx:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Al Bailey (albailey1974) wrote :

Apparently the issue was two things
An unexpected version of bugbear was being installed.
A new version of pip was resolving the components it installs differently. This was the bigger issue, since it blocked sysinv from running zuul in python3.

https://review.opendev.org/c/starlingx/config/+/765863

https://review.opendev.org/c/starlingx/distcloud/+/766103

Revision history for this message
Al Bailey (albailey1974) wrote :

This submission will resolve this bug. (use legacy resolver)
https://review.opendev.org/c/starlingx/distcloud/+/766103

More extensive changes are being tracked through
https://bugs.launchpad.net/starlingx/+bug/1907678

Changed in starlingx:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to config (r/stx.4.0)

Fix proposed to branch: r/stx.4.0
Review: https://review.opendev.org/c/starlingx/config/+/787238

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (r/stx.4.0)

Reviewed: https://review.opendev.org/c/starlingx/config/+/787238
Committed: https://opendev.org/starlingx/config/commit/87d6eec5289e53097c6a0455900a0f93508f2d8d
Submitter: "Zuul (22348)"
Branch: r/stx.4.0

commit 87d6eec5289e53097c6a0455900a0f93508f2d8d
Author: albailey <email address hidden>
Date: Tue Dec 8 12:17:40 2020 -0600

    Fix tox failures from new version of virtualenv and pip

    New pip was released on Dec 3, 2020 which breaks downloads
    from pypi for some URLs (python 3).

    New virtualenv was released Dec 7 which includes that new pip.

    In order for sysinv in python3 on ubuntu-bionic to pass its
    tox and zuul jobs, the legacy resolver must be used.

    The requirements may need to be updated in future revisions.

    Closes-Bug: 1907125
    Change-Id: Idecaee7d83f4cbf02454e172aa254b7d8d449141
    Signed-off-by: albailey <email address hidden>
    (cherry picked from commit 473e55b494b556bae9a41904ab9b85aa78d68e7f)

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

Related 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 : Related fix proposed to platform-armada-app (f/centos8)

Related fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/platform-armada-app/+/792234

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

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

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

Change abandoned by "Chuck Short <email address hidden>" on branch: f/centos8
Review: https://review.opendev.org/c/starlingx/distcloud/+/792298
Reason: Updated merge soon

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related 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...

tags: added: in-f-centos8
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to platform-armada-app (f/centos8)
Download full text (11.0 KiB)

Reviewed: https://review.opendev.org/c/starlingx/platform-armada-app/+/792234
Committed: https://opendev.org/starlingx/platform-armada-app/commit/f3bb236173d8bb336513a868d36f601a23ab87dc
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 66fa48f04d926848a37f5fbb7689cf4b114cb3ba
Author: Pedro Henrique Linhares <email address hidden>
Date: Tue Apr 6 21:45:28 2021 -0300

    Update helm charts config maps after sx-dx migration with new CEPH monitors

    This commit adds annotations that allows config maps to be recreated
    after ceph monitor IP changes due to DX migration so that existing
    StorageClasses can get a reference to the correct monitor. StorageClasses
    and provisioners are recreated during platform-integ-apps auto re-apply.

    Story: 2008587
    Task: 42242

    Signed-off-by: Pedro Linhares <email address hidden>
    Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/783727
    Change-Id: I9cedc70326e92796f03520deed7f0857e119257f

commit 9d45149d29b8c05808bcd7e5a129f135b3386931
Author: Isac Souza <email address hidden>
Date: Mon Apr 5 11:07:21 2021 -0300

    Use new method for setting num of replicas

    Use the new _num_replicas_for_platform_app method from the
    helm base class to set the number of replicas in the chart.
    The new method will return the number of provisioned
    controllers with a minimum of 1.

    Tested by building an ISO and installing the armada apps.

    Partial-Bug: 1922278
    Signed-off-by: Isac Souza <email address hidden>
    Change-Id: Idb3c93274a1cb5c410d885d459784382525427a0

commit 1021d50142af6422c9a3f0853f4b7c525e724ab8
Author: Daniel Safta <email address hidden>
Date: Wed Mar 24 12:56:29 2021 +0000

    Removed extra serviceAccount from cephfs-provisioner

    cephfs-provisioner may need to create new resources
    in the kubernetes cluster. It was granted access to
    some of the resources including namespaces but when
    https://review.opendev.org/c/starlingx/platform-armada-app/+/778746
    got merged the serviceAccount was changed.

    I have updated the serviceAccount with access to
    creating new namespaces and secrets.

    The serviceAccount that was initially used to create
    namespaces and secrets is not needed anymore, so I
    have removed it.

    Closes-bug: 1921197
    Change-Id: I3c683776f3ecaf9c78d1a6b5b1108e9582497dde
    Signed-off-by: Daniel Safta <email address hidden>

commit 45fd0a6b2cd2dbaaf7ff21ef989824377c5b17dc
Author: Robert Church <email address hidden>
Date: Thu Mar 18 11:43:21 2021 -0400

    Build: Isolate platform plugins to an app specific directory

    When building the stx-platform-helm RPM for platform-integ-apps the helm
    plugins are installed in a location that could be populated with other
    app plugins if their spec files are not properly set up.

    Adjust the spec to provide an app specific location for the plugins to
    ensure that no other app plugins are included in the application tarball

    Closes-Bug: #1920066
    Change-Id: Id24227cd100a3c29809f1dd01f61ea717...

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

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

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

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

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

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/796528
Committed: https://opendev.org/starlingx/distcloud/commit/4c5344f8765b372cb84d2b1181589c16db2ae6e4
Submitter: "Zuul (22348)"
Branch: f/centos8

commit cb979811017bd193fc1f06e53bb7830fd3184859
Author: Yuxing Jiang <email address hidden>
Date: Wed Jun 9 11:11:27 2021 -0400

    Format the IP addresses in payload before adding a subcloud

    The IPv6 addresses can be represented in multiple formats. As IP
    addresses are stored as text in database, ansible inventory and
    overrides, this commit converts the IP addresses in payload to
    standard text format of IPv6 address during adding a new subcloud.

    Tested with installing and bootstrapping a new subcloud(RVMC
    configured) with the correct IPv6 address values, but with
    unrecommended upper case letters and '0'. The addresses are
    converted to standard format in database, ansible inventory and
    overrides files.

    Partial-Bug: 1931459
    Signed-off-by: Yuxing Jiang <email address hidden>
    Change-Id: I6c26e749941f1ea2597f91886ad8f7da64521f0d

commit 2cf5d6d5cef0808c354f7575336aec34253993b3
Author: albailey <email address hidden>
Date: Thu May 20 14:19:24 2021 -0500

    Delete existing vim strategy from subcloud during patch orch

    When dcmanager creates a patch strategy, if a subcloud has an
    existing vim patch strategy, it will attempt to re-use
    that strategy during its patching phase, which may result in an
    error.

    This commit deletes the existing vim patch strategy in
    a subcloud, if it exists, so it can be re-created.
    If the strategy cannot be deleted, orchestration fails.

    Change-Id: Id35ef26ed3ddae6d71874fc6bac11df147f72323
    Closes-Bug: 1929221
    Signed-off-by: albailey <email address hidden>

commit 9e14c83f0162549a2a94cb8bc1e73dbc4f4d4887
Author: albailey <email address hidden>
Date: Tue Jun 1 14:37:14 2021 -0500

    Adding activation retry to upgrade orchestration

    When performing an activation, the keystone endpoints may not
    be accessible in the subcloud due to the asyncronous way that
    cert-mon can trigger a restart of keystone.

    This would have occasionally resulted in the upgrade activation
    failing to be initiated, and orchestration needing to be invoked
    again to resume.

    This 'hack' adds retries and sleeps to the initial
    activation action.

    Change-Id: Ic757521dec7bdc248a51a70b5463caafe7927360
    Partial-Bug: 1927550
    Signed-off-by: albailey <email address hidden>

commit bb604c0a9b872efd65fa45f1e2269995818c6262
Author: Tee Ngo <email address hidden>
Date: Thu May 27 22:17:16 2021 -0400

    Fix subcloud show --detail command related issues

    If the subcloud is offline, the command stalls and eventually returns
    the "ERROR (app)" output. If the subcloud is online, the oam_floating_ip
    info is excluded from the output when the subcloud id instead of subcloud
    name is specified.

    This commit fixes both of the above issues.

    Closes-Bug: 1929893
    Change-Id: I995591368564539b0e6af185b1adba2db73e0e46
    Sign...

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.