Skip to content

Commit 80356c6

Browse files
committed
improves the create_stemcell to avoid opening ipv6 setting when building bionic stemcell
1 parent 2d0c238 commit 80356c6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

ci/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
fly -t bionic sp -p bosh-alicloud-cpi \
1+
fly -t xenial sp -p bosh-alicloud-cpi \
22
-c pipeline.yml \
33
--load-vars-from=vars-pipeline.yaml

src/bosh-alicloud-cpi/action/create_stemcell.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ func (a CreateStemcellMethod) importImage(props StemcellProps) (string, error) {
165165
args.Architecture = getValueOrDefault("Architecture", &props, alicloud.AlicloudDefaultImageArchitecture)
166166
// OS type valid values: linux and windows
167167
args.OSType = strings.ToLower(getValueOrDefault("OsType", &props, alicloud.AlicloudDefaultImageOSType))
168-
args.Platform = formatImagePlatform(strings.ToLower(props.OsDistro))
168+
// The bionic stemcell should using Other Linux to avoid opening ipv6 setting
169+
if strings.Contains(props.Name, "-bionic-") {
170+
args.Platform = "Others Linux"
171+
}else {
172+
args.Platform = formatImagePlatform(strings.ToLower(props.OsDistro))
173+
}
169174
args.Description = props.Description
170175

171176
devices := []ecs.ImportImageDiskDeviceMapping{

0 commit comments

Comments
 (0)