shieldproject / shield-boshrelease

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

bugs under the import errand job #99

Closed szaouam closed 6 years ago

szaouam commented 6 years ago

Hello,

I found some bugs under the import errand .

  1. monit file:

The current monit file content is wrong , it will try to run the wrong job (store) :

check process store with pidfile /var/vcap/sys/run/shield/store.pid start program "/var/vcap/jobs/store/bin/nginx start" stop program "/var/vcap/jobs/store/bin/nginx stop" group vcap

==>The monit file should be empty for errand jobs, otherwise bosh will try to restart the job after executing the run.sh script.

  1. run.sh script:

The current run.sh script contain an error + need more things to able to establish connection with the shield core

a) Line 11 : the script is using a wrong name to call the shield cli /var/vcap/packages/shield/bin/buckler we have to use /var/vcap/packages/shield/bin/shield

b) Environment Variables: the run.sh script use the shield cli to import backups to the shield core , we need to provide some environment variables:

SHIELD_CORE_TOKEN SHIELD_CORE SHIELD_API

C)Login to the shield core

After setting the environment variables, we need to login to the shield core .

We may need to use : /var/vcap/packages/shield/bin/shield api $SHIELD_API shield -k /var/vcap/packages/shield/bin/shield login

Best regards,

jhunt commented 6 years ago

The CLI's insistence on a SHIELD_CORE for the import job is a bug in the SHIELD CLI. import specifically uses the core / token present in the import file, and never looks at the config.

I have filed starkandwayne/shield#384 to address this upstream

jhunt commented 6 years ago

These should be fixed as of 8.0.3; but you will have to redeploy it from scratch (you can't upgrade from 8.0.2 -- beta software...)