Turn off strict_id mode for Ec2 datasource
Recent changes in the default configuration of cloud-init in Ubuntu cause warnings when the Ec2 datasource is used on non-Amazon clouds, see https://bugs.launchpad.net/cloud-init/+bug/1660385 We explicitly select the previous behavior when an Ec2 datasource is desired. Change-Id: Iebad8f6c0017fe08013dd5fe667c6132158b71cd Closes-bug: 1683038
This commit is contained in:
parent
7a962e9d1c
commit
0ff40cf63c
@ -24,6 +24,19 @@ EOF
|
|||||||
else
|
else
|
||||||
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
cat > /etc/cloud/cloud.cfg.d/91-dib-cloud-init-datasources.cfg <<EOF
|
||||||
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES, None ]
|
datasource_list: [ $DIB_CLOUD_INIT_DATASOURCES, None ]
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
# Newer cloud-init versions complain by default when they should
|
||||||
|
# use the Ec2 datasource on a non-AWS cloud. If the Ec2
|
||||||
|
# datasource is desired, we need to tell cloud-init that we really
|
||||||
|
# want this. Otherwise there will be ugly warnings or worse.
|
||||||
|
#
|
||||||
|
if [[ $DIB_CLOUD_INIT_DATASOURCES =~ Ec2 ]]; then
|
||||||
|
cat > /etc/cloud/cloud.cfg.d/92-ec2-datasource.cfg <<EOF
|
||||||
|
#cloud-config
|
||||||
|
datasource:
|
||||||
|
Ec2:
|
||||||
|
strict_id: false
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user