-
Notifications
You must be signed in to change notification settings - Fork 991
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 #37606 - Drop old CentOS installation media #10227
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class RenameCentosStreamMirrorToCentos < ActiveRecord::Migration[6.1] | ||
OLD_NAME = "CentOS Stream 9 mirror" | ||
NEW_NAME = "CentOS mirror" | ||
|
||
def up | ||
# Name column isn't unique, so we can't just rename and catch | ||
# ActiveRecord::RecordNotUnique | ||
old = Medium.unscoped.where(name: OLD_NAME) | ||
return unless old.exists? | ||
|
||
if Medium.unscoped.where(name: NEW_NAME).exists? | ||
logger.warn("Couldn't rename medium '#{OLD_NAME}' to '#{NEW_NAME}': already exists") | ||
else | ||
old.update_all(name: NEW_NAME) | ||
end | ||
end | ||
|
||
def down | ||
Medium.unscoped.where(name: NEW_NAME).update_all(name: OLD_NAME) | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,17 +6,7 @@ | |
Medium.without_auditing do | ||
[ | ||
{ | ||
:name => "CentOS 7 mirror", | ||
:os_family => "Redhat", | ||
:path => "http://mirror.centos.org/centos/$major/os/$arch", | ||
}, | ||
{ | ||
:name => "CentOS Stream", | ||
:os_family => "Redhat", | ||
:path => "http://mirror.centos.org/centos/$major-stream/BaseOS/$arch/os", | ||
}, | ||
{ | ||
:name => "CentOS Stream 9 mirror", | ||
:name => "CentOS mirror", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this may need a DB migration to rename the existing entry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, this will definitely require a migration. On fresh dev machine:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we also delete the Centos Stream mirror and use that in place of the Centos one we are switching to? I see Stream 9 and Stream are both in there?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deletion is something we usually don't do. Users may have modified them to point to some internal link. That's a can of worms we prefer to keep closed |
||
:os_family => "Redhat", | ||
:path => "http://mirror.stream.centos.org/$major-stream/BaseOS/$arch/os", | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This old CentOS mirror is still available for older CentOS versions, so can we keep both
CentOS Stream
andCentOS
media's, since 8-stream content still exists on old mirrors?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not: mirror.centos.org no longer has any DNS records and the whole infrastructure has been retired. And I don't want to set something up pointing to vault.centos.org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, upon checking, I discovered 8-stream has only a readme which states "This directory (and version of CentOS) is deprecated.". So, we're fine with the current approach since 8-stream is already EOL