aws / aws/aws-codedeploy-agent
Codedeploy failing randomly at Install not finding appspec.yml
- Dominant language
- Rust
- Stars
- 337
- Forks
- 195
- Avg merge
- 10h 54m
- Merged PRs (30d)
- 4
Description
Hi,
I have a Lightsail instance configured to work with CodeDeploy. When I try to deploy I am sometimes getting an error at the **Install** event saying that the appspec.yml didn't exist. However, **sometimes the appspec.yml is not there and some others it is**.
Error in CodeDeploy console logs
No such file or directory @ rb_sysopen - /opt/codedeploy-agent/deployment-root/7e9847e4-846e-4609-b85b-c22a3fa0a50d/d-KHM59H4R1/deployment-archive/appspec.yml
The codedeploy-agent logs show the following
2023-10-02T14:06:25 ERROR [codedeploy-agent(3375)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Error during perform: Errno::ENOENT - No such file or directory @ rb_sysopen - /opt/codedeploy-agent/deployment-root/7e9847e4-846e-4609-b85b-c22a3fa0a50d/d-KNLJWL3R1/deployment-archive/appspec.yml - /opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:291:in `read'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:291:in `validate_app_spec_hooks'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:286:in `default_app_spec'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:183:in `block in '
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_executor.rb:115:in `execute_command'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:137:in `process_command'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:119:in `acknowledge_and_process_command'
/opt/codedeploy-agent/lib/instance_agent/plugins/codedeploy/command_poller.rb:99:in `block in perform'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:363:in `run_task'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:352:in `block (3 levels) in create_worker'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `loop'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:335:in `block (2 levels) in create_worker'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `catch'
/opt/codedeploy-agent/vendor/gems/concurrent-ruby-1.1.9/lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb:334:in `block in create_worker'
/opt/codedeploy-agent/vendor/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-10-02T14:06:25 WARN [codedeploy-agent(3375)]: InstanceAgent::Plugins::CodeDeployPlugin::CommandPoller: Calling PutHostCommandComplete: "Code Error"
The versions are as follows:
codedeploy-agent: 1.6.0-49
OS: Debian GNU/Linux 11 (bullseye)
Ruby: ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23)
Contributor guide
Assessment
This issue has not been assessed yet.