cloudstax / firecamp

Serverless Platform for the stateful services
https://www.cloudstax.io
Apache License 2.0
209 stars 20 forks source link

init.sh script cannot be loaded from S3 #3

Closed rebyn closed 6 years ago

rebyn commented 6 years ago

Nodes in the ECSClusterStack-ServiceAutoScalingGroup don't seem being able to fech the init.sh file from S3. Here's the content of my cloud-init-output.log:

Loaded plugins: priorities, update-motd, upgrade-helper
Package aws-cfn-bootstrap-1.4-26.17.amzn1.noarch already installed and latest version
Nothing to do
+ version=0.9
+ aws s3 cp s3://cloudstax/firecamp/releases/0.9/scripts/init.sh /tmp/init.sh
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
Nov 21 03:36:52 cloud-init[2813]: util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
Nov 21 03:36:52 cloud-init[2813]: cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
Nov 21 03:36:52 cloud-init[2813]: util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_scripts_user.pyc'>) failed
Cloud-init v. 0.7.6 finished at Tue, 21 Nov 2017 03:36:52 +0000. Datasource DataSourceEc2.  Up 53.08 seconds

When I tried running the S3 command manually, I got the same exception:

[root@ip-10-0-35-248 tmp]# aws s3 cp s3://cloudstax/firecamp/releases/0.9/scripts/init.sh /tmp/init.sh
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
JuniusLuo commented 6 years ago

Thanks rebyn! It looks a regression issue. The code changed from wget to s3 cp from 0.8.1 to 0.9. Not sure why we didn't hit it in our test. Changed back to use wget. I tested one deploy and it worked. Could you please try it again? Thanks.

cloudstax commented 6 years ago

Close this issue. If you hit it again, please let us know. Thanks!