Bug 1730031 - Ruby module upgrade UX is not the best
Summary: Ruby module upgrade UX is not the best
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ruby-2.6-module
Version: 8.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 8.0
Assignee: Jun Aruga
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-15 15:57 UTC by Honza Horak
Modified: 2020-02-18 07:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-18 07:30:58 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Honza Horak 2019-07-15 15:57:03 UTC
Description of problem:
When trying to upgrade packages from ruby:2.5 module to ruby:2.6 module, I see yum transaction error (see below). The process should work if possible, at least for the packages that are available in both streams.

For example if ruby-hivex is not built for ruby:2.6, then it might be required to remove it (or use yum distro-sync --allowerasing), but it should work smoothly otherwise.

It should be also considered whether the depended modules (whatever module that rubygem-hivex and ruby-libguestfs are part of) should not be built with both ruby streams.


Version-Release number of selected component (if applicable):
ruby-2.5-8010020190711131821.cdc1202b
ruby-2.6-8010020190711095715.cdc1202b


How reproducible:
every-time


Steps to Reproduce:
1. # yum install ruby\*
2. # dnf module reset ruby
3. # yum module enable ruby:2.6
4. # yum update
5. # yum distro-sync


Actual results:

# yum update
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:28:25 ago on Mon Jul 15 12:58:50 2019.
Error: 
 Problem 1: cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - cannot install the best update candidate for package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 2: package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch requires rubygem-bundler = 1.16.1-3.module+el8.1.0+3656+f80bfa1d, but none of the providers can be installed
  - cannot install both rubygem-bundler-1.17.2-106.module+el8.1.0+3653+beb38eb0.noarch and rubygem-bundler-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch
  - problem with installed package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch
  - cannot install the best update candidate for package rubygem-bundler-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch
  - package rubygem-bundler-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch is excluded
  - package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch is excluded
 Problem 3: cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - package ruby-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - package ruby-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires ruby-libs(x86-64) = 2.6.3-106.module+el8.1.0+3653+beb38eb0, but none of the providers can be installed
  - cannot install the best update candidate for package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64
  - cannot install the best update candidate for package ruby-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 4: problem with installed package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-devel-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package ruby-devel-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 5: problem with installed package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package rubygem-bigdecimal-1.4.1-106.module+el8.1.0+3653+beb38eb0.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package rubygem-bigdecimal-1.3.4-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded


# yum distro-sync
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:28:45 ago on Mon Jul 15 12:58:50 2019.
Error: 
 Problem 1: package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64
  - ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 does not belong to a distupgrade repository
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 2: package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch requires rubygem-bundler = 1.16.1-3.module+el8.1.0+3656+f80bfa1d, but none of the providers can be installed
  - problem with installed package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch
  - rubygem-bundler-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch does not belong to a distupgrade repository
  - package rubygem-bundler-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch is excluded
  - package rubygem-bundler-doc-1.16.1-3.module+el8.1.0+3656+f80bfa1d.noarch is excluded
 Problem 3: cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - cannot install the best update candidate for package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 4: problem with installed package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-libguestfs-1:1.38.4-13.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - package ruby-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires ruby-libs(x86-64) = 2.6.3-106.module+el8.1.0+3653+beb38eb0, but none of the providers can be installed
  - cannot install the best update candidate for package ruby-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded
 Problem 5: problem with installed package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64
  - package ruby-hivex-1.3.15-7.module+el8.1.0+3531+2918145b.x86_64 requires libruby.so.2.5()(64bit), but none of the providers can be installed
  - cannot install both ruby-libs-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 and ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-devel-2.6.3-106.module+el8.1.0+3653+beb38eb0.x86_64 requires libruby.so.2.6()(64bit), but none of the providers can be installed
  - cannot install the best update candidate for package ruby-devel-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64
  - package ruby-libs-2.5.5-105.module+el8.1.0+3656+f80bfa1d.x86_64 is excluded


Expected results:

Packages should update cleanly.


Additional info:
This modularity upstream issue might be related: https://pagure.io/fm-orchestrator/issue/1342

Comment 1 Jun Aruga 2019-07-16 17:37:16 UTC
There are 2 document to think about the best way to switch modules/ruby's stream to upgrade Ruby 2.5 to 2.6.

1. https://docs.fedoraproject.org/en-US/modularity/using-modules/#_updating_the_system
2. https://developers.redhat.com/blog/2019/05/16/modular-perl-in-red-hat-enterprise-linux-8/

I am testing to think the best way. But right now I have some comments.

For document 1, `dnf update` is written on the page. But `dnf update` is deprecated according to `man dnf`. `dnf upgrade` is better.
When running `yum --help | less` on ubi8 container. `yum update` is not on the page. So, when we use `yum update`, `yum upgrade` is better.
For document 2, `# yum --allowerasing distrosync` is used as a tutorial of module.

* `yum --allowerasing upgrade <RPM files>` might give you better experience than `yum upgrade <RPM files>`.
* `yum --allowerasing downgrade <RPM files>` might work when downgrading Ruby such as switch modules/ruby:2.6 to 2.5.
* `yum --allowerasing distrosync` might be better than `yum distrosync`.

Comment 2 Jun Aruga 2019-07-17 16:27:51 UTC
I think below is the better steps to upgrade Ruby rather than "yum update" and "yum distro-sync" if the RPM is included in the existing profile of modules/ruby:2.6.
Maybe we have to create the profile "all" that means all the RPMs in modules/ruby:2.6, other profile that means all the binary RPM of rpms/ruby SRPM for the best user experience.
Right now there is only one profile "default" that is default profile that means ruby, ruby-devel, ruby-libs RPMs.

Below "yum module install ruby:2.6" enables ruby:2.6 too when there is no enabled ruby stream.

```
1. # yum install ruby\*
2. # yum module reset ruby
3. # yum module install ruby:2.6
```

If the upgraded RPM is not included in the profile, I think below steps are currently best.

```
1. # yum install ruby\*
2. # yum module reset ruby
3. # yum module enable ruby:2.6
4. # yum --allowerasing distro-sync <RPMs>
```

I also commented below about Fedora.
https://pagure.io/fm-orchestrator/issue/1342#comment-582911

I have not tested ruby:2.6 on RHEL 8.1 yet. This is just my predictions based on the tests on Fedora.

Comment 3 Jun Aruga 2019-07-25 12:12:28 UTC
Yesterday we released the documentation about the use case to switch module stream (upgrade module stream).
Now remaining task for this ticket is to add Ruby specific notes with examples to new chapter.
https://projects.engineering.redhat.com/browse/RHELPLAN-17911
https://bugzilla.redhat.com/show_bug.cgi?id=1672575#c33


Note You need to log in before you can comment on or make changes to this bug.