File tree 24 files changed +624
-0
lines changed
24 files changed +624
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function containerd_install() {
103
103
}
104
104
105
105
function containerd_host_init() {
106
+ require_centos8_containerd
106
107
containerd_install_libzstd_if_missing
107
108
}
108
109
@@ -371,3 +372,28 @@ function containerd_kubernetes_pause_image() {
371
372
echo " "
372
373
fi
373
374
}
375
+
376
+ function require_centos8_containerd() {
377
+ if [ " $LSB_DIST " == " centos" ] && [ " $DIST_VERSION_MAJOR " == " 8" ]; then
378
+ # if this is not centos 8 Stream, require preinstallation of containerd on 1.6.31+
379
+
380
+ if cat /etc/centos-release | grep -q " CentOS Stream" ; then
381
+ # this is centos 8 stream, no need to check for containerd being installed
382
+ return
383
+ fi
384
+
385
+ containerd_version_minor=
386
+ containerd_version_minor=$( echo " $CONTAINERD_VERSION " | cut -d. -f2)
387
+ containerd_version_patch=
388
+ containerd_version_patch=$( echo " $CONTAINERD_VERSION " | cut -d. -f3)
389
+
390
+ if [ " $containerd_version_minor " -eq " 6" ] && [ " $containerd_version_patch " -ge " 31" ]; then
391
+ # if containerd is not installed, require preinstallation on 1.6.31+
392
+ if yum_is_host_package_installed containerd.io ; then
393
+ return
394
+ fi
395
+
396
+ bail " Containerd $CONTAINERD_VERSION is required to be preinstalled on CentOS 8.4 and earlier"
397
+ fi
398
+ fi
399
+ }
You can’t perform that action at this time.
0 commit comments