Skip to content
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

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ write_files:
break
fi
set +e
output=`blkid -o device -t TYPE=iso9660`
output=`blkid -o device -t LABEL=CDROM`
set -e
if [ "$output" != "" ]; then
while read -r line; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ write_files:
break
fi
set +e
output=`blkid -o device -t TYPE=iso9660`
output=`blkid -o device -t LABEL=CDROM`
set -e
if [ "$output" != "" ]; then
while read -r line; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ write_files:
break
fi
set +e
output=`blkid -o device -t TYPE=iso9660`
output=`blkid -o device -t LABEL=CDROM`
set -e
if [ "$output" != "" ]; then
while read -r line; do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ while true; do
break
fi
set +e
output=`blkid -o device -t TYPE=iso9660`
output=`blkid -o device -t LABEL=CDROM`
set -e
if [ "$output" != "" ]; then
while read -r line; do
Expand Down
9 changes: 8 additions & 1 deletion systemvm/debian/opt/cloud/bin/setup/cksnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ setup_k8s_node() {

rm -f /etc/logrotate.d/cloud

log_it "Patching cloud-init and configuration"
if [ -f /usr/lib/cloud-init/ds-identify ];then
# see PR https://github.com/canonical/cloud-init/pull/4281
sed -i 's/dscheck_CloudStack() {/&\n if [ "$DI_VIRT" = "vmware" ] || [ "$DI_VIRT" = "xen" ]; then return $DS_MAYBE; fi/g' /usr/lib/cloud-init/ds-identify
fi
sed -i "s/datasource_list: .*/datasource_list: ['ConfigDrive', 'CloudStack']/g" /etc/cloud/cloud.cfg.d/cloudstack.cfg

log_it "Starting cloud-init services"
systemctl enable --now --no-block containerd
if [ -f /home/cloud/success ]; then
Expand All @@ -71,4 +78,4 @@ setup_k8s_node() {
fi
}

setup_k8s_node
setup_k8s_node
Loading