Hi,
this is another shoutout to make you aware of problems after an OS-upgrade.
It seems CentOS 8 replaces the centos-release file when upgrading to 8.4.
Package Architecture Version Repository Size
========================================================================================================================================================================
Installing:
centos-stream-release noarch 8.4-1.el8 Stream-BaseOS 21 k
replacing centos-release.x86_64 8.2-2.2004.0.1.el8
replacing centos-release-stream.x86_64 8.3-3.2006.0.1.el8
replacing centos-repos.x86_64 8.2-2.2004.0.1.el8
Installing dependencies:
centos-stream-repos noarch 8-1.el8 Stream-BaseOS 19 k
The problem is that /etc/redhat-release changes from the format 8.x to "CentOS Stream release 8",
In /usr/share/perl5/PVE/LXC/Setup/CentOS.pm the release-check is for 8.x and without a dot in the versionnumber it bugs out and don't want to start the container.
my $version;
if ($release =~ m/release\s+(\d+\.\d+)(\.\d+)?/) {
if ($1 >= 5 && $1 <= 9) {
$version = $1;
}
}
die "unsupported centos release '$release'\n" if !$version;
Now, either we stop using the /etc/redhat-release file for versioning and use /etc/os-release, which should be common to all major distros now, or we will continue having the same problems more or less with them all.
BTW, the quick fix is to add ".4" after the 8 in /etc/redhat-release.
Just my 2 cents!
Rickard Osser
this is another shoutout to make you aware of problems after an OS-upgrade.
It seems CentOS 8 replaces the centos-release file when upgrading to 8.4.
Package Architecture Version Repository Size
========================================================================================================================================================================
Installing:
centos-stream-release noarch 8.4-1.el8 Stream-BaseOS 21 k
replacing centos-release.x86_64 8.2-2.2004.0.1.el8
replacing centos-release-stream.x86_64 8.3-3.2006.0.1.el8
replacing centos-repos.x86_64 8.2-2.2004.0.1.el8
Installing dependencies:
centos-stream-repos noarch 8-1.el8 Stream-BaseOS 19 k
The problem is that /etc/redhat-release changes from the format 8.x to "CentOS Stream release 8",
In /usr/share/perl5/PVE/LXC/Setup/CentOS.pm the release-check is for 8.x and without a dot in the versionnumber it bugs out and don't want to start the container.
my $version;
if ($release =~ m/release\s+(\d+\.\d+)(\.\d+)?/) {
if ($1 >= 5 && $1 <= 9) {
$version = $1;
}
}
die "unsupported centos release '$release'\n" if !$version;
Now, either we stop using the /etc/redhat-release file for versioning and use /etc/os-release, which should be common to all major distros now, or we will continue having the same problems more or less with them all.
BTW, the quick fix is to add ".4" after the 8 in /etc/redhat-release.
Just my 2 cents!
Rickard Osser
Last edited: