-
Notifications
You must be signed in to change notification settings - Fork 189
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
Bug seen during deployment getcwd: cannot access parent directories: No such file or directory #339
Comments
@Ruchira-R Can you provide some more information? appspec: Is it possible for you to paste your whole appspec.yml file? logs: Please provide the CodeDeploy agent logs or deployment logs which shows this error message. For information about how to retrieve this message please see this doc |
@t0shiii appspec : Has ApplicationStop, BeforeInstall, AfterInstall, ApplicationStart All hooks only run shell scripts.
Currently, the ApplicationStop part is not running during the very first Deployment. LogsLogfile created on 2022-11-02 05:07:46 +0000 by logger.rb/41954 Also, the very first time I run the deployment, I only see it starting from Before Install, why does/did it not run the ApplicationStop hook? It's very weird. DOES IT ASSUME THAT WE ARE INSTALLING THE APPLICATION THE FIRST TIME AND NOT UPDATING THE APPLICATION? (And so it doesn't run the ApplicationStop part?) |
ApplicationStop does not run the first time a deployment is triggered for a host. This is by design since there is no application to stop the first time a deployment is run. The Please provide your full |
@t0shiii It is working as expected now. I also had another doubt, how can I make sure the Deployment shows FAILURE, even if one of the instances that were undergoing deployment have FAILED? Currently, I'm using "CodeDeployDefault.AllAtOnce", according to the documentation, it succeeds even if one of the instances has successfully been upgraded. I know that using "CodeDeployDefault.OneAtATime" will help but it will still show SUCCESS if the deployment to the last instance fails, is there any way I can override this feature? I just want to STOP/make sure the deployment shows FAILURE, if any of the instances fail to upgrade during the deployment. I have a limited amount of instances running (Using EC2/On-Prem Deployment), therefore, this is expected result needed, is there any alternative? |
@Ruchira-R Thank you for the question. We will close this issue as the original question has been resolved. Please open a new issue re: your deployment config question. |
Version : Latest version of CodeDeploy Agent.
Machine VM : Centos 7 (Linux)
Deployment : In-place
Error message : shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
This happens when I create a new directory to copy my deployment files(Created in the BeforeInstall hook) and I remove this directory in ApplicationStart hook.
NOTE : The steps actually are successfully executed and the deployment is successful. But, the logs show this error for every step executed in the specified hooks above.
The text was updated successfully, but these errors were encountered: