Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplicationStop or BeforeInstall #39

Open
fabioce opened this issue Mar 11, 2016 · 4 comments
Open

ApplicationStop or BeforeInstall #39

fabioce opened this issue Mar 11, 2016 · 4 comments
Labels

Comments

@fabioce
Copy link

fabioce commented Mar 11, 2016

Hello,
I tryed to use the state ApplicationStop to deregister the insance from the ELB,
but it don't works.
Whilst if I use the state BeforeInstall all works fine.
Do you are agree with me?

@Jmcfar
Copy link
Contributor

Jmcfar commented Mar 11, 2016

Hi,

Is this the first time you are deploying to the host?

ApplicationStop runs the version of the script currently installed on the box, so during the first deployment no scripts will run since nothing is installed from CodeDeploy. After the initial deployment, future CodeDeploy deployments to the host should deregister it from the ELB before proceeding.

@fabioce
Copy link
Author

fabioce commented Mar 11, 2016

For me also the second deployments don't worked.
Whilst in the BeforeInstall it's ok

@yubangxi
Copy link
Contributor

Hi,

The second deployment will try to use the scripts in ApplicaitonStop lifecycle event from the first deployment. Do you know did the deregister script get executed during the second deployment at all?

@kirankumar15
Copy link

The script stop_server for ApplicationStop lifecycle hook fails for Amazon Linux.

It should be changed as below

======
#!/bin/bash -e
isExistApp=$(pgrep httpd)
if [[ -n $isExistApp ]]; then
service httpd stop
fi======

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants