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

Clean install doesn't work on RH7 #40

Open
oCHRISo opened this issue Jun 16, 2023 · 3 comments
Open

Clean install doesn't work on RH7 #40

oCHRISo opened this issue Jun 16, 2023 · 3 comments

Comments

@oCHRISo
Copy link

oCHRISo commented Jun 16, 2023

Describe the bug

When running the install on Red Hat 7 machine it fails on prerequisites/setup-certs.yml:17

To reproduce

Steps to reproduce the behavior:

  1. Deploy the Ansible NGINX Management Suite role using playbook.yml
    Used example playbook here https://github.com/nginxinc/ansible-role-nginx-management-suite/blob/main/molecule/default/converge.yml

  2. View ansible output

  3. See error

TASK [ansible-role-nginx-management-suite : (Debian/Red Hat) Install cryptography package] ***********************************************************************************************************************************
task path: /Users/ch.adams/git/github/ansible-inventory/roles/ansible-role-nginx-management-suite/tasks/prerequisites/setup-certs.yml:17
fatal: [x.x.x.x]: FAILED! => {"changed": false, "cmd": ["/usr/bin/python", "-m", "pip.__main__", "install", "cryptography"], "msg": "stdout: Collecting cryptography\n  Using cached https://files.pythonhosted.org/packages/19/8c/47f061de65d1571210dc46436c14a0a4c260fd0f3eaf61ce9b9d445ce12f/cryptography-41.0.1.tar.gz\n    Complete output from command python setup.py egg_info:\n    Traceback (most recent call last):\n      File \"<string>\", line 1, in <module>\n      File \"/tmp/pip-build-U4n8D6/cryptography/setup.py\", line 87\n        print(f\"    Python: {'.'.join(str(v) for v in sys.version_info[:3])}\")\n                                                                            ^\n    SyntaxError: invalid syntax\n    \n    ----------------------------------------\n\n:stderr: Command \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-build-U4n8D6/cryptography/\nYou are using pip version 8.1.2, however version 23.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n"}

Expected behavior

A clear and concise description of what you expected to happen.
NMS to install successfully

Your environment

  • Version of the Ansible NGINX Management Suite role or specific commit
    0.2.0

  • Version of Ansible
    2.15.0

  • Version of Jinja2 (if you are using any templating capability)

  • Target deployment platform
    AWS EC2 RH 7 instance

Additional context

Add any other context about the problem here.

@jswongF5
Copy link
Collaborator

jswongF5 commented Jul 7, 2023

Do you have the minor version of RHEL7 you are using? I brought up RHEL7 from AWS to try reproducing this... Not sure if this is already fixed or if I am not using the correct RHEL7 version.

My RHEL version I used

[ec2-user@ip-10-0-11-8 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.7 (Maipo)

@oCHRISo
Copy link
Author

oCHRISo commented Jul 10, 2023

Thanks very much for your response @jswongF5. I'm also using AWS, I have tried again there and was able to reproduce the issue.

[ec2-user@ip-x-x-x-x ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
TASK [ansible-role-nginx-management-suite : (Debian/Red Hat) Install cryptography package] **************************************************************************************************************************
fatal: [x.x.x.x]: FAILED! => {"changed": false, "cmd": ["/usr/bin/python", "-m", "pip.__main__", "install", "cryptography"], "msg": "stdout: Collecting cryptography\n  Downloading https://files.pythonhosted.org/packages/19/8c/47f061de65d1571210dc46436c14a0a4c260fd0f3eaf61ce9b9d445ce12f/cryptography-41.0.1.tar.gz (629kB)\n    Complete output from command python setup.py egg_info:\n    Traceback (most recent call last):\n      File \"<string>\", line 1, in <module>\n      File \"/tmp/pip-build-FqMVMu/cryptography/setup.py\", line 87\n        print(f\"    Python: {'.'.join(str(v) for v in sys.version_info[:3])}\")\n                                                                            ^\n    SyntaxError: invalid syntax\n    \n    ----------------------------------------\n\n:stderr: Command \"python setup.py egg_info\" failed with error code 1 in /tmp/pip-build-FqMVMu/cryptography/\nYou are using pip version 8.1.2, however version 23.1.2 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\n"}

@jswongF5
Copy link
Collaborator

jswongF5 commented Jul 10, 2023

Can you share the AMI ID you are using? I just tried with the following:

AMI ID: ami-0e4a9c85c36c8d230
AMI Name: SupportedImages RHEL-7.9 20220213-3bc3b5ac-2cf9-4a76-a1d3-dbc2bce20f69

I am now using the same version as you.

[ec2-user@ip-10-0-8-174 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)

If you scroll up a bit, does it look like it installs pip?

TASK [ansible-role-nginx-management-suite : (Python 2) Get version 2.7 'pip' script] ************************************************************************************************************************************************************
changed: [35.89.85.176]

TASK [ansible-role-nginx-management-suite : (Python 2) Check if 'pip' binary exists] ************************************************************************************************************************************************************
ok: [35.89.85.176]

TASK [ansible-role-nginx-management-suite : (Python 2) Install 'pip' version 2.7] ***************************************************************************************************************************************************************
changed: [35.89.85.176]

When you ssh into your VM, what pip version does it look like it have?

[ec2-user@ip-10-0-8-174 ~]$ pip --version
pip 20.3.4 from /usr/lib/python2.7/site-packages/pip (python 2.7)

Also, what version are you using (ansible-galaxy list)? I just released a new one 0.3.0 (worth a shot although I am not entirely sure what would fix it).

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

2 participants