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

Pre-installation playbook failed on #81

Open
5 tasks
peterscp93 opened this issue Apr 7, 2021 · 4 comments
Open
5 tasks

Pre-installation playbook failed on #81

peterscp93 opened this issue Apr 7, 2021 · 4 comments
Assignees

Comments

@peterscp93
Copy link

peterscp93 commented Apr 7, 2021

Describe the bug
A clear and concise description of what the issue is.

In the task to compare require packages for nss and curl, the Viya-ARK is failing with an error shown below pre.package_version_check.yml failed. This issue seems to be similar to the reported issue, #61

curl version: curl.x86_64 7.29.0-59.el7_9.1 @rhel-7-server-rpms

nss version: nss.x86_64 3.53.1-3.el7_9 @rhel-7-server-rpms

Environment

  • Ansible version: 2.8.2
  • Python version: Python 3.6.8
  • OS version: Red Hat Enterprise Linux Server release 7.9 (Maipo)
  • Failed playbook tasks log (or entire playbook log) [Attach]
    fatal: [opcgg100000322]: FAILED! => {"msg": "The conditional check 'installed_package.rc == 0 and installed_package_version.stdout is version_compare(item.value, '>=')' failed. The error was: Version comparison: '<' not supported between instances of 'str' and 'int'\n\nThe error appears to be in '/sas/install/sas_viya_playbook/viya-ark/playbooks/pre-install-playbook/roles/viya-ark.preinstall/tasks/pre.package_version_check.yml': line 38, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Set valid installed package flag\n ^ here\n"}
  • What version of Viya 3.x is being deployed? Viya 3.5

To Reproduce
Steps to reproduce the behavior:

  1. Execute pre-installation playbook contained in Viya-ARK.
    a. ansible-playbook viya-ark/playbooks/pre-install-playbook/viya_pre_install_playbook.yml --skip-tags=sudo_checks,skipstoragefail --check

  2. Playbook fails after successfully passing curl version task. I suspect the playbook has failed on checking nss version.

Expected behavior
Successful execution of SAS Viya pre-installation playbook.

Thank you.
Seung Park

@kevinlinglesas kevinlinglesas self-assigned this Apr 9, 2021
@kevinlinglesas
Copy link
Collaborator

We will investigate. Thank you for submitting the issue.

@kevinlinglesas
Copy link
Collaborator

@peterscp93, deep apologies for the neglect of this issue.
I attempted to reproduce the reported issue with two test target hosts, both running RHEL 7.9 and each installed with Ansible 2.8.2 and 4.10.0 respectively. The 4.10.0 was included as it falls in our current support window (2.10 - 2.12 core). Ansible 4.10.0 contains 2.11.12 core.

My understanding of the problem is that on the 'nss' package iteration, the Set valid installed package flag task failed based on mis-match of types used in the version comparison built-in module.

In each instance of execution (curl & nss iterations) in my attempt to reproduce the issue, this task was successful. My environment was one in which both 'curl' and 'nss' packages were at a level exceeding the required versions, so no installation was attempted - not withstanding it was a --check run. Those install and repo version available tasks were skipped once the package_meets_requirement variable was set 'true'. From the curl and nss versions you referenced at the top, I believe your execution would have taken the same path had it made it past the 'nss' check.

Based on failing to reproduce the issue and the outdated Ansible version involved, I am closing this issue.

@KaminoU
Copy link

KaminoU commented Nov 5, 2022

Hello,

I have faced the same issue lately.

fatal [...] "msg": "The conditional check 'installed_package.rc == 0 and installed_package_version.stdout is version_compare(item.value, '>=')' failed. The error was: Version comparison: '<' not supported between instances of 'str' and 'int' [...]

As you can see, python raises the same error because of two different instances of the objects in the comparison.

If we execute the full command $ sudo yum list installed curl | tail -1 | awk '{print $2}' the stdout is plugins:

because the stdout of the command $ sudo yum list installed curl is

Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Installed Packages
curl.x86_64 7.29.0-59.el7_9.1 @rhel-7-server-rpms
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

That's why...

So, the solution is to set the plugins to 0 in the /etc/yum.conf

But I believe that in the yml command, we could add the --noplugins option as possible tiny improvement ($ sudo yum list installed curl --noplugins | tail -1 | awk '{print $2}').

Thank you for your attention

Cheers

Michel

@kevinlinglesas
Copy link
Collaborator

@KaminoU , thank you for the details on the issue you are facing. Re-opening for further investigation.

@kevinlinglesas kevinlinglesas reopened this Nov 6, 2022
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

No branches or pull requests

3 participants