Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid python Azure package collision in SLES15 #232

Merged
merged 1 commit into from
May 21, 2024

Conversation

mpagot
Copy link
Collaborator

@mpagot mpagot commented May 16, 2024

Ticket TEAM-9307

Verification:

15SP5

BYOS

Zypper finds:

<solvable 
    type=\\"package\\" 
    name=\\"python311-azure-mgmt-compute\\"
    edition=\\"30.5.0-150400.14.3.1\\"
    arch=\\"noarch\\"
    repository=\\"Public_Cloud_Module_x86_64:SLE-Module-Public-Cloud15-SP5-Updates\\"
    summary=\\"Microsoft Azure Compute Management Client Library\\">
<description>
...
This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
</description>
</solvable>

...

 CHANGELOG.md file provided with this package
- Remove temporary version override
- Update Requires from setup.py
 
Changes in python-azure-mgmt-compute:
- Switch package to modern Python Stack on SLE-15
  + Use Python 3.11 on SLE-15 by default
  + Add Obsoletes for old python3 package on SLE-15
  + Drop support for older Python versions


<solvable type=\\"package\\" name=\\"python3-azure-mgmt-compute\\" edition=\\"26.1.0-150200.9.3.2\\" arch=\\"noarch\\" repository=\\"@System\\" summary=\\"Microsoft Azure Compute Management Client Library\\">\\n<description>This is the Microsoft Azure Compute Management Client Library.\\n\\nAzure Resource Manager (ARM) is the next generation of management APIs that\\nreplace the old Azure Service Management (ASM).\\n\\nThis package has been tested with Python 2.7, 3.5, 3.6 and 3.7.</description></solvable>

...

<download url=\\"[https://smt-azure.susecloud.net/repo/SUSE/Updates/SLE-Module-Public-Cloud/15-SP5/x86_64/update/noarch/python311-azure-mgmt-compute-30.5.0-150400.14.3.1.noarch.rpm?credentials=Public_Cloud_Module_x86_64\\"](https://smt-azure.susecloud.net/repo/SUSE/Updates/SLE-Module-Public-Cloud/15-SP5/x86_64/update/noarch/python311-azure-mgmt-compute-30.5.0-150400.14.3.1.noarch.rpm?credentials=Public_Cloud_Module_x86_64\\%22) percent=\\"-1\\" rate=\\"-1\\"/>

and

<solvable type=\"package\" name=\"python311-azure-identity\" edition=\"1.15.0-150400.11.3.1\" arch=\"noarch\" repository=\"Public_Cloud_Module_x86_64:SLE-Module-Public-Cloud15-SP5-Updates\" summary=\"Azure Identity client library for Python\">

This first Ansible deployment attempt fails on "Timed out waiting for last boot time check (timeout=900)" but it is not related to any python3 ansible packages.

Second attempt is logged in http://openqaworker15.qa.suse.cz/tests/283207/logfile?filename=deploy-qesap_ansible_retry.log.txt. The part about zypper patch is the same. It also has the part related to the ansible code changed in this PR in

DEBUG    >    ok: [vmhana02] => (item={'sles': '15', 'package': ['python311-azure-mgmt-compute', 'python311-azure-identity']}) => {
DEBUG    >        "ansible_loop_var": "item",
DEBUG    >        "attempts": 1,
DEBUG    >        "changed": false,
DEBUG    >        "invocation": {
DEBUG    >            "module_args": {
DEBUG    >                "allow_vendor_change": false,
DEBUG    >                "clean_deps": false,
DEBUG    >                "disable_gpg_check": false,
DEBUG    >                "disable_recommends": true,
DEBUG    >                "extra_args": null,
DEBUG    >                "extra_args_precommand": null,
DEBUG    >                "force": false,
DEBUG    >                "force_resolution": false,
DEBUG    >                "name": [
DEBUG    >                    "python311-azure-mgmt-compute",
DEBUG    >                    "python311-azure-identity"
DEBUG    >                ],
DEBUG    >                "oldpackage": false,
DEBUG    >                "replacefiles": false,
DEBUG    >                "state": "present",
DEBUG    >                "type": "package",
DEBUG    >                "update_cache": false
DEBUG    >            }
DEBUG    >        },
DEBUG    >        "item": {
DEBUG    >            "package": [
DEBUG    >                "python311-azure-mgmt-compute",
DEBUG    >                "python311-azure-identity"
DEBUG    >            ],
DEBUG    >            "sles": "15"
DEBUG    >        },
DEBUG    >        "name": [
DEBUG    >            "python311-azure-mgmt-compute",
DEBUG    >            "python311-azure-identity"
DEBUG    >        ],
DEBUG    >        "rc": 0,
DEBUG    >        "state": "present",
DEBUG    >        "update_cache": false
DEBUG    >    }

In SLES4SAP 15SP5, facts collected by Ansible are:

  • "ansible_distribution_release": "5",
  • "ansible_distribution_version": "15.5",
  • "ansible_distribution_major_version": "15"

TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [12sp5]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp<4]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]] is executed and pass

PAYG

MSI

sle-15-SP5-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE15_5_PAYG-qesap_azure_saptune_test_msi@64bit

Ansible log http://openqaworker15.qa.suse.cz/tests/283469/logfile?filename=deploy-qesap_exec_ansible__profile.log.txt has:

TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]] is executed and pass

Later in Ansible

DEBUG    OUTPUT:             "_raw_params": "crm configure primitive rsc_stonith_azure stonith:fence_azure_arm params msi=true subscriptionId=\"**************\" resourceGroup=\"rg-ha-sap-qesapval12345\" tenantId=\"**************\" pcmk_monitor_retries=4 pcmk_action_limit=3 power_timeout=240 pcmk_reboot_timeout=900 pcmk_delay_max=15 op monitor interval=3600 timeout=120",

...

DEBUG    OUTPUT:     "rc": 0,

DEBUG    OUTPUT:     "stderr": "\u001b[33mWARNING\u001b[0m: (unpack_config) \twarning: Blind faith: not fencing unseen nodes",

DEBUG    OUTPUT:     "stdout": "",

Checking the cluster, after that Ansible deployment concluded successfully, result in :
http://openqaworker15.qa.suse.cz/tests/283469#step/test_cluster/184

$ crm status

Full List of Resources:
  * rsc_stonith_azure	(stonith:fence_azure_arm):	 Stopped
 

and from the pacemaker.log

May 20 22:26:57.138 vmhana01 pacemaker-fenced    [19063] (log_op_output) 	info: fence_azure_arm_monitor_1of4[21110] error output [ 2024-05-20 22:26:57,110 ERROR: Azure Resource Manager Python SDK not found or not accessible ]

SPN

sle-15-SP5-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE15_5_PAYG-qesap_azure_saptune_test_spn@64bit

Updated module is

<solvable 
    type=\\"package\\"
    name=\\"python311-azure-identity\\"
    edition=\\"1.15.0-150400.11.3.1\\"
    arch=\\"noarch\\" 
    repository=\\"Public_Cloud_Module_x86_64:SLE-Module-Public-Cloud15-SP5-Updates\\" 
    summary=\\"Azure Identity client library for Python\\">

but there's a failure later in * rsc_stonith_azure (stonith:fence_azure_arm): Stopped

same error of MSI http://openqaworker15.qa.suse.cz/tests/283470#step/test_cluster/127
* rsc_stonith_azure (stonith:fence_azure_arm): Stopped

15SP4

PAYG

SBD fencing

TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [12sp5]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp<4]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]] is executed and pass

Native fencing SPN

15SP3

PAYG

SBD fencing

sle-15-SP3-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE15_3_PAYG-qesap_azure_sapconf_test@64bit

TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [12sp5]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp<4]] is executed and pass
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]] is skipped

Cluster is healthy after the deployment stonith-sbd (stonith:external/sbd): Started vmhana01

Native fencing SPN

sle-15-SP3-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE15_3_PAYG-qesap_azure_sapconf_test@64bit

12SP5

PAYG

sle-12-SP5-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE12_5_PAYG-qesap_azure_saptune_test@64bit

From http://openqaworker15.qa.suse.cz/tests/283473/logfile?filename=deploy-qesap_exec_ansible__profile.log.txt

TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [12sp5]] is executed and pass
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp<4]] is skipped
TASK [Ensure Azure Python SDK and Azure Identity python modules are installed [15 sp>=4]] is skipped

BYOS

15SP6

BYOS

SBD

sle-15-SP6-Qesap-Azure-Byos-Ibs-x86_64-BuildLATEST_AZURE_SLE15_6_BYOS_IBS-qesap_azure_uri@az_Standard_E8s_v3

Native fencing

@mpagot mpagot force-pushed the ansible_python_azuremgmt_311 branch 3 times, most recently from 7c13464 to 714da1c Compare May 20, 2024 15:27
15SP4 and 15SP5 move some Azure related Python packages to Python 3.11
@mpagot mpagot force-pushed the ansible_python_azuremgmt_311 branch from 714da1c to e267c15 Compare May 20, 2024 20:51
@mpagot mpagot marked this pull request as ready for review May 21, 2024 11:34
Copy link
Collaborator

@BillAnastasiadis BillAnastasiadis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (sp6 will still fail, but it's due to package availability, not on our side)

Copy link

@asmorodskyi asmorodskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@alvarocarvajald alvarocarvajald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I don't like the failures in SPN & MSI in test_cluster. Seems like cluster is not coming up healthy at the start, and that will give us a lot of headaches going forward.

@alvarocarvajald
Copy link
Collaborator

LGTM, but I don't like the failures in SPN & MSI in test_cluster. Seems like cluster is not coming up healthy at the start, and that will give us a lot of headaches going forward.

Could the changes in the python version be incompatible with the installed fence agents? Should we also force some specific version of the RA?

@mpagot mpagot merged commit d797322 into SUSE:main May 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants