RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1859932 - InstanceHA does not evacuate instances created with private flavor in tenant project.
Summary: InstanceHA does not evacuate instances created with private flavor in tenant ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: fence-agents
Version: 8.2
Hardware: x86_64
OS: All
low
medium
Target Milestone: rc
: 8.4
Assignee: pkomarov
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1862024 1867156
TreeView+ depends on / blocked
 
Reported: 2020-07-23 10:44 UTC by Rohini Diwakar
Modified: 2023-10-06 21:13 UTC (History)
11 users (show)

Fixed In Version: fence-agents-4.2.1-53.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1862024 1867156 (view as bug list)
Environment:
Last Closed: 2020-11-04 02:29:00 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Verification steps (65.79 KB, text/plain)
2020-08-27 23:59 UTC, pkomarov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ClusterLabs fence-agents pull 350 0 None closed [fence_evacuate] Enable evacuation of instances using private flavors 2020-11-06 15:08:47 UTC
Red Hat Knowledge Base (Solution) 5316601 0 None None None 2020-09-08 14:48:22 UTC
Red Hat Product Errata RHBA-2020:4622 0 None None None 2020-11-04 02:29:18 UTC

Description Rohini Diwakar 2020-07-23 10:44:14 UTC
Description of problem:

When compute node crashes, only the instances which are created with public flavor in tenant project gets evacuated to another compute but the ones created from private flavor remain on the crashed node.  

InstanceHA works for public and private flavors in admin project but it fails for tenant project. 

Version-Release number of selected component (if applicable):
RHOSP13 with InstaneHA

How reproducible:


Steps to Reproduce:

1. Create a project 
# openstack project show test_ha
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description |                                  |
| domain_id   | default                          |
| enabled     | True                             |
| id          | 7438dcb4bcd048a2864e3c62b72ced3e |
| is_domain   | False                            |
| name        | test_ha                          |
| parent_id   | default                          |
| tags        | []                               |
+-------------+----------------------------------+

2. Create a public flavor and a private flavor in the project
# openstack flavor show test_ha_private_1
+----------------------------+-------------------------------------------+
| Field                      | Value                                     |
+----------------------------+-------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                     |
| OS-FLV-EXT-DATA:ephemeral  | 0                                         |
| access_project_ids         | 7438dcb4bcd048a2864e3c62b72ced3e          |
| disk                       | 10                                        |
| id                         | bb286bc0-f150-42fd-b061-cea0ff236188      |
| name                       | test_ha_private_1                         |
| os-flavor-access:is_public | False                                     |
| properties                 | evacuable='true'                          |
| ram                        | 4096                                      |
| rxtx_factor                | 1.0                                       |
| swap                       |                                           |
| vcpus                      | 2                                         |
+----------------------------+-------------------------------------------+

# openstack flavor show test_ha_public
+----------------------------+-------------------------------------------+
| Field                      | Value                                     |
+----------------------------+-------------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                     |
| OS-FLV-EXT-DATA:ephemeral  | 0                                         |
| access_project_ids         | None                                      |
| disk                       | 10                                        |
| id                         | cd4b2bc2-c2f6-4a40-a21d-42fd8b4399da      |
| name                       | test_ha_public                            |
| os-flavor-access:is_public | True                                      |
| properties                 | evacuable='true'                          |
| ram                        | 4096                                      |
| rxtx_factor                | 1.0                                       |
| swap                       |                                           |
| vcpus                      | 2                                         |
+----------------------------+-------------------------------------------+

3. Create a public instance and a private instance


4. Test InstanceHA by crashing the node, public instance gets evacuated but private one doesn't.


Actual results:
Only public instances in tenant project are evacuated

Expected results:
Both public and private instances should get evacuated

Additional info:

Comment 2 Luca Miccini 2020-07-23 12:03:59 UTC
we can probably address the private flavor and private image usecases in a single patch.

    diff --git a/agents/evacuate/fence_evacuate.py b/agents/evacuate/fence_evacuate.py
    index 88837dd8..d18a9d3d 100644
    --- a/agents/evacuate/fence_evacuate.py
    +++ b/agents/evacuate/fence_evacuate.py
    @@ -87,7 +87,7 @@ def _is_server_evacuable(server, evac_flavors, evac_images):
     
     def _get_evacuable_flavors(connection):
            result = []
    -       flavors = connection.flavors.list()
    +       flavors = connection.flavors.list(is_public=None)
            # Since the detailed view for all flavors doesn't provide the extra specs,
            # we need to call each of the flavor to get them.
            for flavor in flavors:
    @@ -103,7 +103,7 @@ def _get_evacuable_images(connection):
                    images = connection.images.list(detailed=True)
            elif hasattr(connection, "glance"):
                    # OSP12+
    -               images = connection.glance.list()
    +               images = connection.glance.list(is_public=None)
     
            for image in images:
                    if hasattr(image, 'metadata'):

Comment 3 Luca Miccini 2020-07-23 12:33:51 UTC
probably this is not needed:

    -               images = connection.glance.list()
    +               images = connection.glance.list(is_public=None)

Comment 11 pkomarov 2020-08-27 23:59:08 UTC
Created attachment 1712891 [details]
Verification steps

Verified , 

verification steps are in the attachment (too long for a regular comment)

Comment 14 errata-xmlrpc 2020-11-04 02:29:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (fence-agents bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4622


Note You need to log in before you can comment on or make changes to this bug.