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

Closed
YoNoSoyVictor opened this issue Feb 3, 2025 · 12 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

@YoNoSoyVictor
Copy link
Author

Hey thanks taking the time to look into this @sdherr, I really appreciate it.

I also had the same observations you did so I escalated this to my team internally as well. They were able to fix it. Sorry I could not find the time to reply earlier they just updated me.

I'll close the issue thanks for the help :)

@yomofo2s
Copy link

yomofo2s commented Feb 5, 2025

@YoNoSoyVictor Sorry not sure if this is fully fixed. I still received a similar error but this time < 10 version

`Error:
Problem: conflicting requests

  • nothing provides system-release < 10 needed by packages-microsoft-prod-1.1-2.noarch from @commandline
    (try to add '--skip-broken' to skip uninstallable packages)`

@Jack-Hazelden-Blackdot
Copy link

@yomofo2s Which distro are you using? Trying to install the cli on Amazon Linux myself and whilst it worked prior to this change, it is no longer possible

@yomofo2s
Copy link

yomofo2s commented Feb 7, 2025

Hi @Jack-Hazelden-Blackdot i have the same distro as yours

`Amazon Linux 2023 repository 32 MB/s | 31 MB 00:00
Last metadata expiration check: 0:00:11 ago on Fri Feb 7 13:11:29 2025.
packages-microsoft-prod.rpm 133 kB/s | 9.2 kB 00:00
Error:
Problem: conflicting requests

  • nothing provides system-release < 10 needed by packages-microsoft-prod-1.1-2.noarch from @commandline
    (try to add '--skip-broken' to skip uninstallable packages)`

@MrPaulAR
Copy link

MrPaulAR commented Feb 7, 2025

I'm also seeing the issue on Rocky 9

Release: Rocky Linux release 9.5 (Blue Onyx)

Full error from sudo dnf upgrade
Error:
Problem: cannot install the best update candidate for package packages-microsoft-prod-1.0-1.noarch

  • nothing provides system-release < 9 needed by packages-microsoft-prod-1.1-2.noarch from packages-microsoft-com-prod

@sdherr
Copy link

sdherr commented Feb 10, 2025

Please ensure that you all are installing the correct package / repo for your system. We do publish Amazon Linux and Rocky Linux versions of this package that will subscribe your system to the Amazon / Rocky repositories, not the RHEL repository. Packages built for different systems are not guaranteed to be cross-compatible.
https://packages.microsoft.com/config/amazonlinux/2023/packages-microsoft-prod.rpm
https://packages.microsoft.com/config/rocky/9/packages-microsoft-prod.rpm

You can see what you're currently subscribed to by cating the repo file in /etc/yum.repos.d/. The baseurl should be self-explanatory. The name of the file should be microsoft.repo or microsoft-prod.repo or just prod.repo.

Part of the confusion here, considering this is a azure-cli repo, may be that the Azure CLI team publishes the cli for RHEL 9 repo but not for Amazon / Rocky, so you may be intentionally subscribing to the wrong repo in order to fetch it. Which may work given how similar the systems are, but I don't think the Azure CLI team will support it at all. If you want to continue doing that you may, simply by fetching the RHEL 9 repo file an putting it in the right place on your system yourself:
curl https://packages.microsoft.com/config/rhel/9/prod.repo > /etc/yum.repos.d/microsoft-rhel-9.repo

@yomofo2s
Copy link

yomofo2s commented Feb 10, 2025 via email

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

7 participants