cloudfoundry-attic / bosh-init

bosh-init is a tool used to create and update the Director VM
Apache License 2.0
31 stars 33 forks source link

upsized disk accidentally created in alternate AZ #20

Closed drnic closed 9 years ago

drnic commented 9 years ago

"The volume 'vol-968f7dd8' is not in the same availability zone as instance 'i-f95ed604'

Deployment manifest: '/Users/drnic/Projects/bosh-deployments/experiments/bosh-init-redis/redis.yml'
Deployment state: 'deployment.json'

Started validating
  Validating stemcell... Finished (00:00:00)
  Validating releases... Finished (00:00:00)
  Validating deployment manifest... Finished (00:00:00)
  Validating cpi release... Finished (00:00:00)
Finished validating (00:00:00)

Started installing CPI
  Compiling package 'ruby_aws_cpi/052a28b8976e6d9ad14d3eaec6d3dd237973d800'... Finished (00:00:00)
  Compiling package 'bosh_aws_cpi/deabbf731a4fedc9285324d85af6456cfa74c10c'... Finished (00:00:00)
  Rendering job templates... Finished (00:00:00)
  Installing packages... Finished (00:00:03)
  Installing job 'cpi'... Finished (00:00:00)
Finished installing CPI (00:00:03)

Starting registry... Finished (00:00:00)
Uploading stemcell 'bosh-aws-xen-ubuntu-trusty-go_agent/2830'... Skipped [Stemcell already uploaded] (00:00:00)

Started deploying
  Waiting for the agent on VM 'i-da250ef5'... Finished (00:00:01)
  Stopping jobs on instance 'unknown/0'... Finished (00:00:00)
  Unmounting disk 'vol-968f7dd8'... Finished (00:00:00)
  Deleting VM 'i-da250ef5'... Finished (00:00:48)
  Creating VM for instance 'redis/0' from stemcell 'ami-94c187fc light'... Finished (00:01:03)
  Waiting for the agent on VM 'i-f95ed604' to be ready... Finished (00:01:56)
  Attaching disk 'vol-968f7dd8' to VM 'i-f95ed604'... Failed (00:00:09)
Failed deploying (00:04:11)

Command 'deploy' failed:
  Deploying:
    Creating instance 'redis/0':
      Updating instance disks:
        Updating disks:
          Deploying disk:
            Attaching disk in the cloud:
              Calling CPI 'attach_disk' method:
                External CPI command for method 'attach_disk' returned an error: CmdError{"type":"Unknown","message":"The volume 'vol-968f7dd8' is not in the same availability zone as instance 'i-f95ed604'","ok_to_retry":false}
drnic commented 9 years ago

As an aside, I looked up where the VM was and tried to document this in the manifest but same error:

resource_pools:
- name: default
  network: default
  cloud_properties:
    instance_type: m3.large
    availability_zone: us-east-1c
drnic commented 9 years ago

Actually I guess the problem is in reverse - the new VM was created in a different AZ from the original volume.

cppforlife commented 9 years ago

Yeah you have to specify availability_zone for VM, otherwise it can pop up in any AZ which will not match the persistent disk AZ. Same thing happens with the Director configuration.

drnic commented 9 years ago

Is this an unsolvable problem to pick an AZ internally and store it in deployments.json?

On Sun, Apr 19, 2015 at 5:44 PM, Dmitriy Kalinin notifications@github.com wrote:

Yeah you have to specify availability_zone for VM, otherwise it can pop up in any AZ which will not match the persistent disk AZ. Same thing happens with the Director configuration.

Reply to this email directly or view it on GitHub: https://github.com/cloudfoundry/bosh-init/issues/20#issuecomment-94329425

cppforlife commented 9 years ago

For now since availability zone is not a first class concept (proposal: https://github.com/cloudfoundry/bosh-notes/blob/master/availability-zones.md) we do not want to make IaaS specific knowledge in the IaaS agnostic part of the bosh-init.

cppforlife commented 9 years ago

Closing for now until AZs are a first class feature.