CKS: add ConfigDrive to cloud-init datasource_list in systemvm template (#7650)

* CKS: add ConfigDrive to cloud-init datasource_list in systemvm template

* systemvm template: update debian 11.7.0 iso url

* CKS: get K8S iso by LABEL=CDROM if config drive ISO is attached

* Revert "CKS: add ConfigDrive to cloud-init datasource_list in systemvm template"

This reverts commit b6863a5ce1b9757d7c5bbf3ba9720e2b61410c7d.

* CKS: patch cloud-init in opt/cloud/bin/setup/cksnode.sh

* PR7650: move ConfigDrive before CloudStack in datasource list

* Revert "CKS: patch cloud-init in opt/cloud/bin/setup/cksnode.sh"

This reverts commit 75be03c6aaf58e3939f59c657d84c6495538d3c2.

* CKS: fix ConfigDrive
This commit is contained in:
Wei Zhou 2024-09-27 14:09:27 +02:00 committed by GitHub
parent bf2cedea79
commit 04c428cb2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 4 deletions

View File

@ -66,7 +66,7 @@ write_files:
break break
fi fi
set +e set +e
output=`blkid -o device -t TYPE=iso9660` output=`blkid -o device -t LABEL=CDROM`
set -e set -e
if [ "$output" != "" ]; then if [ "$output" != "" ]; then
while read -r line; do while read -r line; do

View File

@ -86,7 +86,7 @@ write_files:
break break
fi fi
set +e set +e
output=`blkid -o device -t TYPE=iso9660` output=`blkid -o device -t LABEL=CDROM`
set -e set -e
if [ "$output" != "" ]; then if [ "$output" != "" ]; then
while read -r line; do while read -r line; do

View File

@ -66,7 +66,7 @@ write_files:
break break
fi fi
set +e set +e
output=`blkid -o device -t TYPE=iso9660` output=`blkid -o device -t LABEL=CDROM`
set -e set -e
if [ "$output" != "" ]; then if [ "$output" != "" ]; then
while read -r line; do while read -r line; do

View File

@ -54,7 +54,7 @@ while true; do
break break
fi fi
set +e set +e
output=`blkid -o device -t TYPE=iso9660` output=`blkid -o device -t LABEL=CDROM`
set -e set -e
if [ "$output" != "" ]; then if [ "$output" != "" ]; then
while read -r line; do while read -r line; do

View File

@ -59,6 +59,12 @@ setup_k8s_node() {
rm -f /etc/logrotate.d/cloud rm -f /etc/logrotate.d/cloud
# Enable cloud-init without any aid from ds-identify
echo "policy: enabled" > /etc/cloud/ds-identify.cfg
# Add ConfigDrive to datasource_list
sed -i "s/datasource_list: .*/datasource_list: ['ConfigDrive', 'CloudStack']/g" /etc/cloud/cloud.cfg.d/cloudstack.cfg
log_it "Starting cloud-init services" log_it "Starting cloud-init services"
systemctl enable --now --no-block containerd systemctl enable --now --no-block containerd
if [ -f /home/cloud/success ]; then if [ -f /home/cloud/success ]; then