bosh icon indicating copy to clipboard operation
bosh copied to clipboard

Job release upgrade will trigger recreate vm after bosh upgrade

Open gu-bin opened this issue 10 years ago • 4 comments

After upgrading the bosh from version 1.3153.0 to 1.3262.3.0, we try to upgrade cf release version for the deployment. This triggers recreate (delete and create) vm which is not expected.

In the bosh task debug log, it detected networks changed so recreate vm was triggered.

D, [2016-07-20 03:53:48 #26642] [canary_update(ipsec-orchestrator/0 (38b37b1d-a028-4aad-9e54-fc09e9837a92))] DEBUG -- DirectorJobRunner: networks_changed? network settings changed FROM: {"default"=>{"type"=>"dynamic", "cloud_properties"=>{"security_groups"=>["default", "cf"]}, "dns"=>["159.8.180.206", "10.0.80.11", "10.0.80.12"], "default"=>["dns", "gateway"], "dns_record_name"=>"0.ipsec-orchestrator.default.gubin-preyf.microbosh", "ip"=>"169.50.71.93", "netmask"=>"255.255.255.224", "gateway"=>"169.50.71.65"}} TO: {"default"=>{"type"=>"dynamic", "cloud_properties"=>{"security_groups"=>["default", "cf"]}, "dns"=>["159.8.180.206", "10.0.80.11", "10.0.80.12"], "default"=>["dns", "gateway"], "ip"=>"169.50.71.93", "netmask"=>"255.255.255.224", "gateway"=>"169.50.71.65"}} on instance ipsec-orchestrator/0 (38b37b1d-a028-4aad-9e54-fc09e9837a92)
D, [2016-07-20 03:53:48 #26642] [task:207] DEBUG -- DirectorJobRunner: Waiting for tasks to complete
D, [2016-07-20 03:53:48 #26642] [canary_update(ipsec-orchestrator/0 (38b37b1d-a028-4aad-9e54-fc09e9837a92))] DEBUG -- DirectorJobRunner: Networks have changed. Recreating VM

So "dns_record_name"=>"0.ipsec-orchestrator.default.gubin-preyf.microbosh" is removed in the new bosh.

Is there any way to avoid recreate vm in this case? Thanks.

gu-bin avatar Jul 20 '16 07:07 gu-bin

/cc @maximilien @jianqiu @mattcui

gu-bin avatar Jul 20 '16 07:07 gu-bin

@gu-bin yeah we removed 'dns_record_name' since it's not supposed to be sent to the agent. not sure how to avoid it. i think we would be open to the pr to ignore that key in networks_changed? method.

cppforlife avatar Jul 21 '16 02:07 cppforlife

@gu-bin if you and @mattcui work on a PR, please pass it by me and I can review. Update me tonight when we talk. Thx.

maximilien avatar Jul 21 '16 17:07 maximilien

Looks like the PR for this issue was merged - I'm going to close the corresponding issue

mfine30 avatar Aug 15 '18 19:08 mfine30