shieldproject / shield-boshrelease

BOSH Release for shield
MIT License
11 stars 17 forks source link

Can't find link with type 'sql' for job 'shield' in deployment #92

Closed karampok closed 7 years ago

karampok commented 7 years ago

Greetings, we are trying to deploy the new version of SHIELD (7.0.1), and our deployment manifest seems broken. The error we are getting is the following

 Started preparing deployment > Preparing deployment. Failed: Unable to process links for deployment. Errors are:
  - Can't find link with type 'sql' for job 'shield' in deployment 'shield-yyy' (00:00:00)

The difference in our manifest is that we are adding the database url directly instead of using links and that there no deployment offering such a link. The manifest looks like that

  - name: shield-daemon
    properties:
      shield:
        daemon:
          auth:
            api_keys:
              autoprovision: XXXXX
            basic_password: YYYYY
            basic_user: admin
          database:
            db: shielddb
            host: 10.x.y.z
            password: zzzzzzzz
            port: 3306
            type: mysql
            username: shieldadmin
          ssh_private_key: |
            -----BEGIN RSA PRIVATE KEY-----

What do you think of having the sql link optional in the spec file? Also shield-daemon is starting even if the database access is not established (monit summary give running), is that on purpose?

Thanks!

karampok commented 7 years ago

The only way to work around is to create a dummy job in another collocated release that offers an empty link of type sql to the shield-daemon job.

drnic commented 7 years ago

In the manifests/shield.yml manifest the first job template is {name: postgres, release: shield} [1] which provides a type: sql link [2] That's currently where the sql link is coming from. It is then consumed by shield-daemon [3] - and at a glance the problem is that the link is not optional.

So, try patching shield-daemon to make the link optional, and then the database.* [4] properties should supercede the link [5]

karampok commented 7 years ago

Thx for the reply.

Patching shield-daemon to make the link optional will require that we do not use the bosh-release from the upstream and that we have to set up pipelines to produce a custom-based release. This is something that we would like to avoid.

Is there any reason from your side not to have this link optional?

drnic commented 7 years ago

Sorry I meant your patch would be temporary. I am hoping you can test out this idea/fix in a branch, and submit it as a PR which I'll merge and push out as 7.0.X release asap.


From: Konstantinos notifications@github.com Sent: Monday, September 4, 2017 11:35:22 PM To: starkandwayne/shield-boshrelease Cc: Dr Nic Williams; Comment Subject: Re: [starkandwayne/shield-boshrelease] Can't find link with type 'sql' for job 'shield' in deployment (#92)

Thx for the reply.

Patching shield-daemon to make the link optional will require that we do not use the bosh-release from the upstream and that we have to set up pipelines to produce a custom-based release. This is something that we would like to avoid.

Is there any reason from your side not to have this link optional?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/starkandwayne/shield-boshrelease/issues/92#issuecomment-326964981, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAAAbJXYxAGIzBF4GUPMyONtp0g0A06bks5se_yagaJpZM4PIxIs.

karampok commented 7 years ago

Hi, thx for the tips. I have tried locally making the link optional and providing in the deployment manifest a database url which takes priority. It seems good.

karampok commented 7 years ago

This issue can close