cloudfoundry / bosh-google-cpi-release

BOSH Google CPI
Apache License 2.0
63 stars 96 forks source link

Create stemcell images with MULTI_IP_SUBNET guest os feature #314

Closed jfmyers9 closed 5 years ago

jfmyers9 commented 5 years ago

This change updates create_stemcell to use the MULTI_IP_SUBNET guest os feature when creating the google cloud image. This allows the instance to use a different netmask then the /32 that is enforced by google cloud. See https://cloud.google.com/vpc/docs/create-use-multiple-interfaces for more details.

This improves the resilience of network diffing for the BOSH director and prevents unnecessary recreates. Specifically, there are times in which the BOSH director will save the network settings as reported by the agent in the database. Due to the fact that the agent on google cloud reports a /32 netmask, the BOSH director will detect a network change on the next deploy when it computes the expected netmask from the manual network's CIDR. This will cause a recreation of the VM. With this change, this should no longer happen.

#166359647

@evandbrown I've tested this change and it seems to work fine for our example deployments, but I'm somewhat unsure of the complete side effects of using MULTI_IP_SUBNET are. Do you think this change seems reasonable for the Google CPI moving forward?

If this change is acceptible, this also means that we may have to refine the light stemcell building process to do the same.

Let me know what you think,

@jfmyers9

cfdreddbot commented 5 years ago

:white_check_mark: Hey jfmyers9! The commit authors and yourself have already signed the CLA.

evandbrown commented 5 years ago

@jfmyers9 I don't think this will cause any problems. Let's merge and confirm that BATS work OK before including in the next release. Thanks!