Distributed Cloud: Unable to delete a subcloud

Bug #1870413 reported by Yosief Gebremariam
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Gerry Kopec

Bug Description

Brief Description
-----------------
Attempted to delete a subcloud from DC system with 10 subclouds. The subcloud being deleted was in a managed and in-sync state. Unmanaged and powered-off the subclouds for deletion, but the subclouds remained online and as a result, could not delete any of the subcloud for re-install:
+----+------------+------------+--------------+---------------+---------+
| id | name | management | availability | deploy status | sync |
+----+------------+------------+--------------+---------------+---------+
| 5 | subcloud1 | unmanaged | online | complete | unknown |
| 6 | subcloud2 | unmanaged | online | complete | unknown |
| 7 | subcloud3 | unmanaged | online | complete | unknown |
| 8 | subcloud4 | unmanaged | online | complete | unknown |
| 9 | subcloud5 | unmanaged | online | complete | unknown |
| 15 | subcloud10 | managed | online | complete | in-sync |
| 16 | subcloud9 | managed | online | complete | in-sync |
| 17 | subcloud7 | managed | online | complete | in-sync |
| 18 | subcloud8 | managed | online | complete | in-sync |
| 19 | subcloud6 | managed | online | complete | in-sync |
+----+------------+------------+--------------+---------------+---------+

Severity
--------
Major

Steps to Reproduce
------------------
Fully install DC system with 10 subclouds
Attempt to delete one or more subclouds

Expected Behavior
------------------
The dcmanager should be able to delete unmanaged and powered-off subclouds.

Actual Behavior
----------------
The subclouds remained online after powered-off the subclouds

Reproducibility
---------------
Intermittent.

System Configuration
--------------------
Distributed Cloud with 10 physical subclouds

Branch/Pull Time/Commit
-----------------------
2020-03-29_16-39-59

Last Pass
---------
unknown

Timestamp/Logs
--------------
2020-04-01T22:16:53.757171

Revision history for this message
Yosief Gebremariam (ygebrema) wrote :
Revision history for this message
Bart Wensley (bartwensley) wrote :

I took a quick look at the lab and the issue appears to be that the dcmanager subcloud audit stopped running. Here are the last logs from the subcloud audit:
2020-04-02 15:56:24.757 113908 INFO dcmanager.manager.subcloud_audit_manager [-] Triggered subcloud audit.
2020-04-02 15:56:24.863 113908 INFO dcmanager.manager.subcloud_audit_manager [-] Waiting for subcloud audits to complete.
2020-04-02 15:56:35.246 113908 INFO dccommon.drivers.openstack.sdk_platform [-] _is_token_valid handle: Request to http://[fd01:21::2]:5000/v3/auth/tokens?nocatalog timed out
2020-04-02 15:56:35.247 113908 INFO dccommon.drivers.openstack.sdk_platform [-] get new keystone client for subcloud subcloud1
2020-04-02 15:56:36.566 113908 INFO dccommon.drivers.openstack.sdk_platform [-] _is_token_valid handle: Failed to validate token (HTTP 404) (Request-ID: req-8db6642e-5b23-4720-8541-b0a86e433e0c)
2020-04-02 15:56:36.567 113908 INFO dccommon.drivers.openstack.sdk_platform [-] get new keystone client for subcloud subcloud5
2020-04-02 15:56:45.611 113908 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://[fd01:21::2]:5000/v3. Attempting to parse version from URL.: ConnectTimeout: Request to http://[fd01:21::2]:5000/v3 timed out
2020-04-02 15:56:46.572 113908 INFO dccommon.drivers.openstack.sdk_platform [-] _is_token_valid handle: Request to http://[fd01:22::2]:5000/v3/auth/tokens?nocatalog timed out
2020-04-02 15:56:46.573 113908 INFO dccommon.drivers.openstack.sdk_platform [-] get new keystone client for subcloud subcloud2
2020-04-02 15:56:49.558 113908 INFO dcmanager.manager.patch_audit_manager [-] Triggered patch audit.
2020-04-02 15:56:55.614 113908 ERROR dccommon.drivers.openstack.sdk_platform [-] keystone_client region subcloud1 error: Request to http://[fd01:21::2]:5000/v3/auth/tokens timed out: ConnectTimeout: Request to http://[fd01:21::2]:5000/v3/auth/tokens timed out
2020-04-02 15:56:55.614 113908 ERROR dcmanager.manager.subcloud_audit_manager [-] Identity or Platform endpoint for online subcloud: subcloud1 not found.: ConnectTimeout: Request to http://[fd01:21::2]:5000/v3/auth/tokens timed out
2020-04-02 15:56:56.921 113908 WARNING keystoneauth.identity.generic.base [-] Failed to discover available identity versions when contacting http://[fd01:22::2]:5000/v3. Attempting to parse version from URL.: ConnectTimeout: Request to http://[fd01:22::2]:5000/v3 timed out
2020-04-02 15:57:06.925 113908 ERROR dccommon.drivers.openstack.sdk_platform [-] keystone_client region subcloud2 error: Request to http://[fd01:22::2]:5000/v3/auth/tokens timed out: ConnectTimeout: Request to http://[fd01:22::2]:5000/v3/auth/tokens timed out
2020-04-02 15:57:06.925 113908 ERROR dcmanager.manager.subcloud_audit_manager [-] Identity or Platform endpoint for online subcloud: subcloud2 not found.: ConnectTimeout: Request to http://[fd01:22::2]:5000/v3/auth/tokens timed out

There was a recent change in the subcloud audit:
https://opendev.org/starlingx/distcloud/commit/7f3827f24d2fb3cb546d3caf71d505d23187b0dc

Tao should probably take a look at this.

tags: added: stx.distcloud
Changed in starlingx:
assignee: nobody → Tao Liu (tliu88)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.4.0 / medium priority - intermittent issue w/ subcloud deletion

Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
tags: added: stx.4.0
Revision history for this message
Tao Liu (tliu88) wrote :

I looked through the collected logs, and I did not see anything that lead to a dead lock. I also traced the code path after the last audit log, I did not see anything that could be locked up (unless there are silent failure in db or rpc requests).

I tried to reproduce the issue on my Virtual DC system with 2 subclouds. I was not able to reproduce the problem after repeating 20 unmanage/poweroff/delete/add/manage operations.

Revision history for this message
Bart Wensley (bartwensley) wrote :

I believe the same issue was reported in https://bugs.launchpad.net/starlingx/+bug/1884560. See that LP for a summary of the probably cause.

Changed in starlingx:
assignee: Tao Liu (tliu88) → Gerry Kopec (gerry-kopec)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud (master)

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

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/738089
Committed: https://git.openstack.org/cgit/starlingx/distcloud/commit/?id=8ecba753119da83e80f4933bd24dac311b5979f1
Submitter: Zuul
Branch: master

commit 8ecba753119da83e80f4933bd24dac311b5979f1
Author: Gerry Kopec <email address hidden>
Date: Thu Jun 25 14:16:45 2020 -0400

    Add timeouts to DC sysinv and patching clients

    If a subcloud is powered off or loses communication with the system
    controller while the subcloud audit is waiting for a response to a
    sysinv or patching request, the subcloud audit will hang forever.
    Add some failsafe 10 minute timeouts to ensure the audit can recover.

    Change-Id: I369225119f89ab5a2f05137aba955dda982d51c5
    Closes-Bug: 1884560
    Closes-Bug: 1870413
    Signed-off-by: Gerry Kopec <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Bart Wensley (bartwensley) wrote :

Bug 1886037 was opened to address the rest of the REST API calls in the distributed cloud code.

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 : 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...

tags: added: in-f-centos8
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.