Centos 8 To Centos Stream

Centos 8 To Centos Stream

Reading time1 min
#Linux#OpenSource#IT#CentOS#Migration#Sysadmin

Migrating from CentOS 8 to CentOS Stream: Field Notes and Procedures

CentOS 8’s EOL (end-of-life: 2021-12-31) pushed operational teams to rethink their workflows. If you want bugfixes or CVEs resolved, those updates are gone from classic CentOS 8. CentOS Stream isn’t a minor update. It moves you into the development lane feeding directly into RHEL—a rolling distribution that gets updates ahead of traditional downstream RHEL releases. Prepare for more velocity, but less polished releases.


Workflow Impact: From Static to Rolling Stability

CentOS Stream 8 is approximately RHEL 8.n+0.1. Newer kernels, GCCs, and library packages appear first in Stream, then in RHEL proper after QA. This impacts stability (occasional breaking change), but offers faster bugfix turnaround.

Gotcha: Some ISV applications (e.g., Oracle, some backup agents) certify only against RHEL point releases or CentOS Linux, not Stream. Validate compatibility before pulling the trigger.


Pre-Migration Checklist

  • Asset inventory: Generate a manifest of all CentOS 8 instances (ansible-inventory or CMDB export).
  • Critical apps: List all custom and third-party applications, note kernel or glibc dependencies.
  • Backup: Non-negotiable. Create full disk images and application-level backups. VM snapshotting via something like virsh snapshot-create-as is preferred in virtualized environments.
  • Change window plan: Schedule after hours; average downtime: 10–20 minutes per node if no conflicts.

Step 1: Upgrade CentOS 8 to Latest Packages

All packages must be current. Out-of-date kernels or glibc versions occasionally cause distro-sync failures.

sudo dnf clean all
sudo dnf upgrade --refresh -y
sudo reboot

Note: Do not skip the reboot. Kernel changes, especially recent 4.18.0-425 or higher, may not be active otherwise.


Step 2: Migrate Repository Configurations

The actual cutover involves repository replacement and a full sync of installed packages.

Standard procedure:

sudo dnf install centos-release-stream -y
sudo dnf swap centos-linux-repos centos-stream-repos -y
sudo dnf distro-sync -y --allowerasing
  • The --allowerasing flag prevents dependency deadlocks; rarely needed in clean environments but crucial for systems with EPEL or SCL overlays.

Repo validation:

grep 'mirror' /etc/yum.repos.d/CentOS-Stream*.repo

You should see mirrors.centos.org/centos/8-stream (not /8/).


Step 3: Reboot and Validation

Reboot into the new Stream packages.

sudo reboot

Post-upgrade, validate:

cat /etc/centos-release
# Output: CentOS Stream release 8

Check for stale or redundant repos—they can cause package confusion:

dnf repolist

Step 4: Post-Migration Testing

  • Check core service health (systemctl status nginx mysqld).
  • Scan for failed units:
    systemctl --failed
  • Review /var/log/messages and /var/log/dnf.log for errors like:
    file /usr/lib64/libXYZ.so from install of XYZ-1.2.3-4.el8 conflicts with file from package XYZ-1.2.2-1.el8
    
  • Smoke-test applications. For workloads with custom kernel modules, check dkms status.

If anomalies arise: Consult dnf history rollback <ID>; however, only recent transactions are reliable for rollbacks.


Managing Third-Party and EPEL Repositories

Common problem: EPEL and similar repos ship against RHEL point releases. After migration, some packages may lag or pull from older branches.

Disable EPEL prior to migration:

sudo dnf config-manager --set-disabled epel

Re-enable post-migration only after reviewing epel-release for Stream support:

sudo dnf config-manager --set-enabled epel
sudo dnf update --enablerepo=epel

Review /etc/yum.repos.d/ for custom or legacy repos. Remove or pin versions as needed.


Ongoing Maintenance Strategies

  • Rolling Updates: Although updates arrive continuously, establish an explicit patch review cadence (e.g., weekly; avoid “set-and-forget”).
  • Monitoring: Integrate with Prometheus/Alertmanager or your SIEM. Pay attention to kernel and glibc package moves.
  • Staging Pipeline: Always route updates through a QA node matching production. Uncaught regressions have occurred with Stream—especially systemd and dnf updates.
  • Backup schedule: Retain pre-update snapshots at least one full update cycle.

Key Questions and Edge Cases

ConcernPractical Consideration
Can I revert to CentOS 8?Not supported—requires full reinstall.
Is there a performance hit?None expected, but minor regressions have surfaced after large package jumps. Test latency-sensitive workloads.
Alternatives?Oracle Linux, AlmaLinux, Rocky Linux—all support RHEL8 compatibility, but each with differing patch cadence and vendor stance.

Pro Tip: Custom Kernel Modules

If you build out-of-tree kernel modules (e.g., proprietary drivers, DKMS), watch for minor kernel version bumps or ABI changes. “yum/dnf versionlock” can pin kernel packages, but this sacrifices Stream’s key value—up-to-date kernels.


Final Observation

CentOS Stream demands a more hands-on approach than static CentOS 8. Treat every update as potentially significant, especially for production or compliance workloads. For critical use cases, maintain golden images and internal mirrors to control update rollouts. This isn’t a “set and forget” OS anymore—but with proper process, the transition is not only manageable but can improve infrastructure agility.

For historical reference, save the old /etc/yum.repos.d/ and /etc/dnf/dnf.conf somewhere off-host. Fixing a misconfigured repo can save hours versus a full rebuild.