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

packages-microsoft-com-prod repository for RHEL9 has a system-release < 9 as a dependency. #30748

Open
YoNoSoyVictor opened this issue Feb 3, 2025 · 5 comments
Assignees
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@YoNoSoyVictor
Copy link

YoNoSoyVictor commented Feb 3, 2025

Hey team. Hope everything is going well!

We just noticed some issues recently when installing the Azure CLI in an automated manner For RHEL 9 (The errors started round 2025-02-03) . We now receive this message:

"Depsolve Error occurred: \n Problem: conflicting requests\n - nothing provides system-release < 9 needed by packages-microsoft-prod-1.1-2.noarch from @commandline"

The error is self-explanatory - it expects a system-release version < 9. However the repository being added is https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm as explained in step 2 from the Azure CLI installation instructions [1]. This should be the correct repository for RHEL 9.

Is it possible that there were some recent changes in this repository?

[1] https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=dnf#install-azure-cli

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 3, 2025

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service microsoft-github-policy-service bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Feb 3, 2025
@YoNoSoyVictor
Copy link
Author

Seems like this works when performing the steps manually in our affected hosts. Issue is likely on our side.

Closing Issue.

@YoNoSoyVictor
Copy link
Author

Reopening as the root cause of the issue was found.

The package requirements are listed as follows:

[root@bastion-v8qhl ~]# rpm -qp packages-microsoft-prod.rpm --requires
config(packages-microsoft-prod) = 1.1-2
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
system-release < 10
system-release >= 9

system-release is an outdated package, if the package is for RHEL and the package name is officially redhat-release. See example:

[root@bastion-v8qhl ~]# rpm -qa|grep release
redhat-release-eula-9.4-0.5.el9.x86_64
redhat-release-9.4-0.5.el9.x86_64

This was likely changed recently which is why we started seeing issues.

While it seems to work installing manually with dnf it breaks things like the ansible dnf module [1]. This should be changed.

[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#ansible-collections-ansible-builtin-dnf-module

@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team Packaging labels Feb 3, 2025
@yonzhan yonzhan added this to the Backlog milestone Feb 3, 2025
@yonzhan yonzhan added the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Feb 3, 2025
@sdherr
Copy link

sdherr commented Feb 3, 2025

Hi @YoNoSoyVictor , the name of the package (system-release vs redhat-release) is irrelevant, what actually matters is if the RPM "provides" something that satisfies the requirement. Which it does in my testing:

# rpm -q --provides redhat-release
base-module(platform:el9)
config(redhat-release) = 9.5-0.6.el9
redhat-release = 9.5-0.6.el9
redhat-release(x86-64) = 9.5-0.6.el9
redhat-release-client
redhat-release-computenode
redhat-release-server
redhat-release-workstation
system-release = 9.5-0.6.el9
system-release(releasever) = 9

# rpm -q redhat-release
redhat-release-9.5-0.6.el9.x86_64

Here you see that this version of redhat-release provides a version of system-release that should satisfy the requirement.

Furthermore, if it works with dnf but not with an ansible script I think that's pretty clear evidence that the ansible script is broken. The ansible script may be relying on the package name, which is wrong.

You're correct that this requirement is a recent change and it explains why this only recently started failing, but so far I don't see any evidence that this change is wrong. The intent here is to prevent people from accidentally installing the wrong package/repo for their system, eg installing the RHEL 8 repo on a RHEL 9 system or vice-versa, and it seems to be working properly from what I can see.

@sdherr
Copy link

sdherr commented Feb 3, 2025

I'm also confused because the error message you reported in the initial comment does not match with your later investigation. That error message claims to be looking for a version of system-release < 9, which you correctly identified as incorrect for a RHEL 9 system. The RHEL 8 version of the package has that requirement. Are you sure that the RHEL 8 version of the package is not sneaking in to your ansible script somehow? The RHEL 9 package seems to have the correct requirements to me:

# curl -L https://packages.microsoft.com/config/rhel/9.0/packages-microsoft-prod.rpm > packages-microsoft-prod.rpm

# rpm -qp --requires packages-microsoft-prod.rpm 
config(packages-microsoft-prod) = 1.1-2
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
system-release < 10
system-release >= 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. Packaging question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants