curl package installation on Rocky 9.3

Bug #2046172 reported by Feng Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Critical
Neil Hanlon

Bug Description

Hi,

Rocky Linux 9.3. openstack-ansible master git.

When run

scripts/bootstrap-aio.sh

Got error as:

fatal: [localhost]: FAILED! => {"changed": false, "failures": [], "msg": "Depsolve Error occurred: \n Problem: problem with installed package curl-7.76.1-26.el9_3.2.0.1.x86_64\n - package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 from baseos conflicts with curl provided by curl-7.76.1-26.el9_3.2.0.1.x86_64 from @System\n - package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 from baseos conflicts with curl provided by curl-7.76.1-26.el9_3.2.0.1.x86_64 from baseos\n - conflicting requests", "rc": 1, "results": []}

The curl package has been installed y default, and it is required by dnf package.

Update file "ests/roles/bootstrap-host/vars/redhat.yml ", comment the "/usr/bin/curl" line, and run scripts/bootstrap-aio.sh, worked fine.

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Hi there,

Thanks for reporting that.

Actually, it's quite weird that you are facing this issue. I believe it should have been fixed a while ago and backported back to yoga with this patch:
https://review.opendev.org/c/openstack/openstack-ansible/+/872896

Can you kindly confirm that you do have this patch, but still experiencing issues?

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

Hi

I believe it has this patch included already. I cloned the whole trpository. and then checkout the maste.

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

Sorry correct tip:

I cloned the whole repository. and then checkout the master.

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Ok, yes, I missed that you wrote originally that you've commented out "/usr/bin/curl" line, which means patch is there.

We will look into that shortly.

Changed in openstack-ansible:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

I'm actually not able to reproduce the issue. I've just spawned a Rocky host from latest image. On the first login `curl-minimal` was already installed. With that `dnf install /usr/bin/curl` is happy and does not claim any conflict.

[rocky@server-1212-1108 ~]$ sudo -s
[root@server-1212-1108 rocky]# dnf install /usr/bin/curl
Last metadata expiration check: 0:07:23 ago on Tue Dec 12 10:12:48 2023.
Package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@server-1212-1108 rocky]#

And eventually ./scripts/bootstrap-aio.sh as well as bootstrap-ansible.sh pass nicely on master branch.

I've also tried a sample playbook that tries to install `/usr/bin/curl` using package module and it passed without raising any issues.

So in fact I am not able to reproduce the issue.

However, from what I see in your first output, you currently have `curl` installed - not `curl-minimal`. But I am pretty sure that Rocky 9.3 goes with `curl-minimal` out of the box.
So how you ended up with `curl` being installed there? Was it some older image upgraded with DNF to 9.3, like 9.1 or 9.0?

As I assume that this exact difference (of having curl instead of curl-minimal out of the box) what potentially leads to the issue.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/openstack-ansible/+/903488

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Please disregard that automated message above - it was linked wrongly.

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

Hi,

I downloaded the ISO file from Rocky web site, and installed it on a bare metal machine.

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

Looks like the curl is installed by default in this way(from ISO), not curl-minimal. Maybe add some options for DNF can avoid throwing out an error, instead a warning message should be enough.

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

The ISO is 9.3

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Can you kindly check if `dnf install /usr/bin/curl` does error out with the pretty much same conflict?

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

Here is the result:

dnf install /usr/bin/curl
Last metadata expiration check: 2:09:04 ago on Tue 12 Dec 2023 08:14:43 AM EST.
Package curl-7.76.1-26.el9_3.2.0.1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!

Revision history for this message
Feng Zhang (fengzhang2023) wrote :

and also:

 dnf install curl-minimal
Last metadata expiration check: 2:10:19 ago on Tue 12 Dec 2023 08:14:43 AM EST.
Error:
 Problem: problem with installed package curl-7.76.1-26.el9_3.2.0.1.x86_64
  - package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 from baseos conflicts with curl provided by curl-7.76.1-26.el9_3.2.0.1.x86_64 from @System
  - package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 from baseos conflicts with curl provided by curl-7.76.1-26.el9_3.2.0.1.x86_64 from baseos
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Neil Hanlon (nhanlon)
Changed in openstack-ansible:
assignee: nobody → Neil Hanlon (nhanlon)
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Hi,

Sorry for the delay.

We eventually do not try to install curl or curl-minimal explicitly - instead we always do try installation of `/usr/bin/curl` which should not raise any issue or conflict as both packages do satisfy the requirement.

As you wrote in the beginning of the report - you had "/usr/bin/curl" line in vars file, that should be a safe option.

I'm still not able to reproduce the issue, though it might be that OpenStack image I'm trying to use is completely different from the ISO image that's being used for servers.

Just out of interest, have you tried to use `dnf swap curl curl-minimal`?

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote (last edit ):

Ok, right after I wrote an update - I was able to reproduce the issue. For that, I had to swap curl-minimal that's being installed in my image with curl, and then run a sample and easy playbook:

- hosts: localhost
  tasks:
    - package:
        name: /usr/bin/curl
        state: present

[root@server-1128-0945 openstack-ansible]# rpm -qa | grep curl
libcurl-minimal-7.76.1-26.el9_3.2.0.1.x86_64
curl-7.76.1-26.el9_3.2.0.1.x86_64
[root@server-1128-0945 openstack-ansible]#

Running dnf install directly does not result in any issues:
[root@server-1128-0945 openstack-ansible]# dnf install /usr/bin/curl
Last metadata expiration check: 2:33:20 ago on Thu Dec 28 12:18:50 2023.
Package curl-7.76.1-26.el9_3.2.0.1.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@server-1128-0945 openstack-ansible]#

However running the playbook does:

TASK [package] *****************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failures": [], "msg": "Depsolve Error occurred: \n Problem: problem with installed package curl-7.76.1-26.el9_3.2.0.1.x86_64\n - package curl-minimal-7.76.1-26.el9_3.2.0.1.x86_64 conflicts with curl provided by curl-7.76.1-26.el9_3.2.0.1.x86_64\n - conflicting requests", "rc": 1, "results": []}

Running `dnf swap curl curl-minimal` does solve the issue though

Changed in openstack-ansible:
status: Triaged → Confirmed
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

So I'm inclined to think that this is an Ansible bug originally, thus I've submitted a bug report for it:
https://github.com/ansible/ansible/issues/82461

What to do with our code is a different story though...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (master)
Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-openstack_hosts (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/904403
Committed: https://opendev.org/openstack/openstack-ansible-openstack_hosts/commit/1584983367b6bf0df6bd622d8820ae61d2f6687d
Submitter: "Zuul (22348)"
Branch: master

commit 1584983367b6bf0df6bd622d8820ae61d2f6687d
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:12:36 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I0f1bd3aa3dbce93c42fdb9399948c41edab2369d

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-openstack_hosts (stable/2023.2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-openstack_hosts (stable/2023.1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-openstack_hosts (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible/+/904402
Committed: https://opendev.org/openstack/openstack-ansible/commit/60a1196fe69730d9c2aed51b72a8495464e6c5ed
Submitter: "Zuul (22348)"
Branch: master

commit 60a1196fe69730d9c2aed51b72a8495464e6c5ed
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:11:38 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I65d3fa2e3d6d38f0a51ce1f402ac25d976b67b89

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/904460
Committed: https://opendev.org/openstack/openstack-ansible-openstack_hosts/commit/26f13a7a108dc1688b0369cf0526b45dc7b847cf
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 26f13a7a108dc1688b0369cf0526b45dc7b847cf
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:12:36 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I0f1bd3aa3dbce93c42fdb9399948c41edab2369d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/904461
Committed: https://opendev.org/openstack/openstack-ansible-openstack_hosts/commit/6b0f7753c566ca3c0b38caa03f1eb74615ceff35
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 6b0f7753c566ca3c0b38caa03f1eb74615ceff35
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:12:36 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I0f1bd3aa3dbce93c42fdb9399948c41edab2369d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-openstack_hosts (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/904462
Committed: https://opendev.org/openstack/openstack-ansible-openstack_hosts/commit/99e6ab829dc7c54832d3d2e6c6910cbcf23e6d9a
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 99e6ab829dc7c54832d3d2e6c6910cbcf23e6d9a
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:12:36 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I0f1bd3aa3dbce93c42fdb9399948c41edab2369d

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/2023.2)

Fix proposed to branch: stable/2023.2
Review: https://review.opendev.org/c/openstack/openstack-ansible/+/904845

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/openstack-ansible/+/904846

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible/+/904846
Committed: https://opendev.org/openstack/openstack-ansible/commit/6c5217aa89a43fa6ab0622da00ccac7acf718dec
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 6c5217aa89a43fa6ab0622da00ccac7acf718dec
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:11:38 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I65d3fa2e3d6d38f0a51ce1f402ac25d976b67b89
    (cherry picked from commit 60a1196fe69730d9c2aed51b72a8495464e6c5ed)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible/+/904847
Committed: https://opendev.org/openstack/openstack-ansible/commit/bd6d6437f5ca542f80bbec98c4152a68a810ec99
Submitter: "Zuul (22348)"
Branch: stable/zed

commit bd6d6437f5ca542f80bbec98c4152a68a810ec99
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:11:38 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I65d3fa2e3d6d38f0a51ce1f402ac25d976b67b89
    (cherry picked from commit 60a1196fe69730d9c2aed51b72a8495464e6c5ed)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible/+/904845
Committed: https://opendev.org/openstack/openstack-ansible/commit/fda9704cee2558744394c7557ed3fc9caec441ec
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit fda9704cee2558744394c7557ed3fc9caec441ec
Author: Dmitriy Rabotyagov <email address hidden>
Date: Thu Dec 28 19:11:38 2023 +0100

    Skip installing curl for EL

    Due to the bug in Ansible [1] it does not resolve requirement of /usr/bin/curl
    properly, always trying to install `curl-minimal`, which would fail on systems with
    already installed `curl`.

    Since `curl` presence is essential for DNF, we should be able to skip installation
    of curl to EL systems, as they are all shipped with it as of today.

    [1] https://github.com/ansible/ansible/issues/82461

    Closes-Bug: #2046172
    Change-Id: I65d3fa2e3d6d38f0a51ce1f402ac25d976b67b89
    (cherry picked from commit 60a1196fe69730d9c2aed51b72a8495464e6c5ed)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 28.0.1

This issue was fixed in the openstack/openstack-ansible 28.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 27.4.0

This issue was fixed in the openstack/openstack-ansible 27.4.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 26.5.0

This issue was fixed in the openstack/openstack-ansible 26.5.0 release.

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.