cloudfoundry / bosh-softlayer-cpi-release

An external BOSH CPI for the SoftLayer cloud written in Golang
Apache License 2.0
14 stars 20 forks source link

CPI error 'Can not find VirtualGuestBlockDeviceTemplateGroup with id ...' #259

Closed 7CHANHO closed 7 years ago

7CHANHO commented 7 years ago

ISSUE

When I tried to upload the stemcell, a CPI error occurred.

# bosh upload stemcell light-bosh-stemcell-3431.13.3-softlayer-xen-ubuntu-trusty-go_agent.tgz 
Acting as user 'admin' on 'bosh'
...
  Started update stemcell > Uploading stemcell bosh-softlayer-xen-ubuntu-trusty-go_agent/3431.13.3 to the cloud. Failed: CPI error 'Bosh::Clouds::CloudError' with message 'Finding stemcell with ID '1710621': Can not find VirtualGuestBlockDeviceTemplateGroup with id `1710621`' in 'create_stemcell' CPI method (00:00:30)

Error 100: CPI error 'Bosh::Clouds::CloudError' with message 'Finding stemcell with ID '1710621': Can not find VirtualGuestBlockDeviceTemplateGroup with id `1710621`' in 'create_stemcell' CPI method

CONTEXT

I used the following version of the release.

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/150733970

The labels on this github issue will be updated when the story is started.

edwardstudy commented 7 years ago

@7CHANHO Hi~ The error was meaning that system image id 1710621 can not found in Softlayer image templates. You could just try the latest version like 3445.2.1.

Hope this helps!

7CHANHO commented 7 years ago

@EdwardStudy Hello. I have found my problem. Since bosh is not connected to the public network, it is determined that a timeout has occurred during the API call.

bosh/0:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         PRIVATE_GW      0.0.0.0         UG    0      0        0 eth0
10.0.0.0        PRIVATE_GW      255.0.0.0       UG    0      0        0 eth0
PRIVATE_IP      0.0.0.0         255.255.255.192 U     0      0        0 eth0
PUBLIC_IP       PRIVATE_GW      255.255.0.0     UG    0      0        0 eth0
PUBLIC_IP       0.0.0.0         255.255.255.240 U     0      0        0 eth1
bosh/0:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
(no response)

When I added the public network gateway, then the connection became possible.

# route add default gw PUBLIC_GW eth1

Also, uploading the stemcell is now possible.

How do I configure the manifest to distribute bosh to connect to the public network? So far, I've done the following:

$ git clone https://github.com/cloudfoundry/bosh-deployment.git
$ cd bosh-deployment
$ vi softlayer/cpi.yml
$ bosh create-env bosh.yml \
    --state=state.json \
    --vars-store=creds.yml \
    -o softlayer/cpi.yml \
    -v director_name=bosh \
    -v internal_cidr=PRIVATE_CIDR \
    -v internal_gw=PRIVATE_GW \
    -v internal_ip=PRIVATE_IP \
    -v sl_datacenter=seo01 \
    -v sl_vm_domain=DOMAIN \
    -v sl_vm_name_prefix=bosh \
    -v sl_vlan_public=PUBLIC_VLAN_ID \
    -v sl_vlan_private=PRIVATE_VLAN_ID \
    -v sl_username=USERNAME \
    -v sl_api_key=API_KEY
edwardstudy commented 7 years ago

Yes, I saw that you used cloudfoundry/bosh-deployment. We fixed the gateway error in our own repo. But the PR merge is in progress.

You can use the repo temporarily if you need.

Thank you.

7CHANHO commented 7 years ago

@EdwardStudy Thank You :)