Azure / open-service-broker-azure

The Open Service Broker API Server for Azure Services
https://osba.sh
MIT License
248 stars 100 forks source link

can't load package: package github.com/Azure/open-service-broker-azure/cmd/broker: #705

Closed maxstreifeneder closed 5 years ago

maxstreifeneder commented 5 years ago

Hey folks,

I tried to deploy the OSB to SAP Cloud Platform Cloud Foundry and failed because of the following error:

Staging app and tracing logs...
   Cell 73cf501c-5018-464a-9f9c-e0436e097876 creating container for instance be0a7ab4-0877-4b65-a274-8289fa088a89
   Cell 73cf501c-5018-464a-9f9c-e0436e097876 successfully created container for instance be0a7ab4-0877-4b65-a274-8289fa088a89
   Downloading app package...
   Downloaded app package (10.2K)
   Downloaded buildpack `https://github.com/cloudfoundry/go-buildpack/releases/download/v1.8.33/go-buildpack-cflinuxfs3-v1.8.33.zip` (4.5M)
   -----> Go Buildpack version 1.8.33
   -----> Installing godep 80
          Download [https://buildpacks.cloudfoundry.org/dependencies/godep/godep-v80-linux-x64-cflinuxfs3-b60ac947.tgz]
   -----> Installing glide 0.13.2
          Download [https://buildpacks.cloudfoundry.org/dependencies/glide/glide-v0.13.2-linux-x64-cflinuxfs3-b50997e2.tgz]
   -----> Installing dep 0.5.0
          Download [https://buildpacks.cloudfoundry.org/dependencies/dep/dep-v0.5.0-linux-x64-cflinuxfs3-f9b0e8ec.tgz]
   -----> Installing go 1.10.8
          Download [https://buildpacks.cloudfoundry.org/dependencies/go/go1.10.8.linux-amd64-cflinuxfs3-c80a4f0d.tar.gz]
   -----> Running: go install -tags cloudfoundry -buildmode pie github.com/Azure/open-service-broker-azure/cmd/broker
   can't load package: package github.com/Azure/open-service-broker-azure/cmd/broker: cannot find package "github.com/Azure/open-service-broker-azure/cmd/broker" in any of:
        /tmp/contents345714580/deps/0/go1.10.8/go/src/github.com/Azure/open-service-broker-azure/cmd/broker (from $GOROOT)
        /tmp/gobuildpack.gopath277846511/.go/src/github.com/Azure/open-service-broker-azure/cmd/broker (from $GOPATH)
          **ERROR** Unable to compile application: exit status 1
   Failed to compile droplet: Failed to run finalize script: exit status 12
   Exit status 223
   Cell 73cf501c-5018-464a-9f9c-e0436e097876 stopping instance be0a7ab4-0877-4b65-a274-8289fa088a89
   Cell 73cf501c-5018-464a-9f9c-e0436e097876 destroying container for instance be0a7ab4-0877-4b65-a274-8289fa088a89
   Cell 73cf501c-5018-464a-9f9c-e0436e097876 successfully destroyed container for instance be0a7ab4-0877-4b65-a274-8289fa088a89
Error staging application: App staging failed in the buildpack compile phase
FAILED

My manifest.yml looks like:

---
applications:
- name: osbamax
  buildpacks:
    - https://github.com/cloudfoundry/go-buildpack/releases/download/v1.8.35/go-buildpack-cflinuxfs3-v1.8.35.zip
  command: broker
  env:
    AZURE_SUBSCRIPTION_ID: #####my subscription id######
    AZURE_TENANT_ID: #####my tenant id######
    AZURE_CLIENT_ID: #####my client id######
    AZURE_CLIENT_SECRET: #####my client secret ######
    LOG_LEVEL: DEBUG
    MIN_STABILITY: PREVIEW
    ENABLE_MIGRATION_SERVICES: false
    REDIS_PREFIX:
    STORAGE_REDIS_HOST: #####my redis host######
    STORAGE_REDIS_PASSWORD: #####my redis password######
    STORAGE_REDIS_PORT: 6380
    STORAGE_REDIS_DB: 0
    STORAGE_REDIS_ENABLE_TLS: true
    CRYPTO_ENCRYPTION_SCHEME: AES256
    CRYPTO_AES256_KEY: AES256Key-32Characters1234567890
    ASYNC_REDIS_HOST: #####my redis host######
    ASYNC_REDIS_PASSWORD: #####my redis password######
    ASYNC_REDIS_PORT: 6380
    ASYNC_REDIS_DB: 1
    ASYNC_REDIS_ENABLE_TLS: true
    BASIC_AUTH_USERNAME: username
    BASIC_AUTH_PASSWORD: password
    GOPACKAGENAME: github.com/Azure/open-service-broker-azure
    GO_INSTALL_PACKAGE_SPEC: github.com/Azure/open-service-broker-azure/cmd/broker

the only thing I had to change was the buildpack, because the target Cloud Foundry stack expects a cflinuxfs3 buildpack - most likely this is the problem. Do you have any solution?

If you need any more information...

Thanks a lot in advance! Max

zhongyi-zhang commented 5 years ago

Hi, could you have a try cf ssh into the container and check if the package is there?

maxstreifeneder commented 5 years ago

hey,

I cannot ssh into the container because the application cannot be started, as shown in the initial logs.

cf ssh osbamax
FAILED
Error opening SSH connection: Application "osbamax" is not in the STARTED state
zhongyi-zhang commented 5 years ago

I tried the buildpack you attached but didn't reproduce the issue... From the logs, it seems that this file somehow was just not uploaded by pushing. Is there a .cfignore file (what might filtered the file out) in where you ran cf push? Also, could you check if the file is in your OSBA directory?

maxstreifeneder commented 5 years ago

Pushed the application from the wrong directory...sort of "careless mistake". sorry!