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

Fixes #26461 - Added environment variable for beta repos #251

Merged
merged 1 commit into from Apr 2, 2019

Conversation

kgaikwad
Copy link
Member

No description provided.

@theforeman-bot
Copy link
Member

Issues: #26461

@mbacovsky
Copy link
Member

@kgaikwad any insight on if we can add some kind of auto-detection here to avoid moving this piece of code back and forth with every release? Can we get the Sat release status from some external source e.g. https://access.redhat.com/articles/1365633 or presence of the non-beta repos?

This PR looks good to go if we decide to go this way. Is there any particular date when we want to merge and release it? How merging affect 6.5 testing before GA?

@kgaikwad
Copy link
Member Author

@mbacovsky,
+1
I agree for having an auto-detection to avoid this back and forth.
We also had a discussion around it once. I will check on this if we can rely on any external source which is/will be up to date time to time for future use.
For now, can we merge this and will do above changes for next version?

I have confirmed with @ntkathole that we can merge this changes and publish new version.
For testing, they will need a small change in automation.

@kgaikwad kgaikwad force-pushed the 26461_ga_repos_for_6_5 branch 2 times, most recently from ec872b3 to 057fc2b Compare March 29, 2019 10:20
@kgaikwad
Copy link
Member Author

@mbacovsky, @ntkathole
Updated PR with environment variable change.

@jameerpathan111,
Could you please check if those changes are working for you? :-)

@kgaikwad kgaikwad changed the title Fixes #26461 - GA repositories enabled for 6.5 Fixes #26461 - Added environment variable for beta repos Mar 29, 2019
@jameerpathan111
Copy link
Contributor

@kgaikwad
tested this PR and it works as expected. 👍

[root@hp-nehalem-02 foreman_maintain]#  export FOREMAN_MAINTAIN_USE_BETA='ON'
[root@hp-nehalem-02 foreman_maintain]# ./bin/foreman-maintain advanced procedure run repositories-setup --version 6.5
Running ForemanMaintain::Scenario
================================================================================
Setup repositories: 
- Configuring repositories for 6.5                                    [OK]      
--------------------------------------------------------------------------------

[root@hp-nehalem-02 foreman_maintain]# yum repolist
repo id                                                                                       repo name                                                                                                      status
maintain_repo                                                                                 maintain_repo                                                                                                      15
rhel-7-server-ansible-2.6-rpms/x86_64                                                         Red Hat Ansible Engine 2.6 RPMs for Red Hat Enterprise Linux 7 Server                                              20
rhel-7-server-rpms/7Server/x86_64                                                             Red Hat Enterprise Linux 7 Server (RPMs)                                                                       23,918
rhel-7-server-satellite-maintenance-6-beta-rpms/x86_64                                        Red Hat Satellite Maintenance 6 Beta (for RHEL 7 Server) (RPMs)                                                    14
rhel-7-server-satellite-tools-6-beta-rpms/x86_64                                              Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)                                                          63
rhel-server-7-satellite-6-beta-rpms/x86_64                                                    Red Hat Satellite 6 Beta (for RHEL 7 Server) (RPMs)                                                               389
rhel-server-rhscl-7-rpms/7Server/x86_64                                                       Red Hat Software Collections RPMs for Red Hat Enterprise Linux 7 Server                                        10,948

README.md Outdated
To use beta repositories during upgrade, set the following environment variable

```
export FOREMAN_MAINTAIN_USE_BETA='ON'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kgaikwad, I wonder if it wouldn't be more convenient/consistent to use export FOREMAN_MAINTAIN_USE_BETA=1 as in other CLI tools we use 1/true/yes for positive values. What do you think? Otherwise it looks good to go.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mbacovsky, done 👍

@@ -81,7 +81,7 @@ def sat_and_tools_repos(rh_version_major, sat_version)
sat_maintenance_repo_id = "rhel-#{rh_version_major}-server-satellite-maintenance-6-rpms"

# Override to use Beta repositories for sat version until GA
if sat_version.to_s == '6.5'
if ENV['FOREMAN_MAINTAIN_USE_BETA'] && ENV['FOREMAN_MAINTAIN_USE_BETA'].casecmp('1').zero?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't if ENV['FOREMAN_MAINTAIN_USE_BETA'] == '1' read better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, updated PR!

Copy link
Member

@mbacovsky mbacovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kgaikwad thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants