aws / aws/aws-codedeploy-agent

codedeploy-agent gets stuck on the wrong deployment ID, incorrectly reports missing scripts

Abierto
#348 6 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
337
Forks
195
Merge medio
10 h 54 min
PR fusionados (30 d)
4

Descripción

CodeDeploy agent keeps trying to access an invalid application revision and fails to find scripts to run in application events. The original configuration where this occurred is a CodePipeline instance, but now when I create a deployment just for this application and deployment group, it keeps selecting the same bad deployment revision.

It's happening on Ubuntu 18.04. Not sure how to obtain `codedeploy-agent` version, as it doesn't implement `--version`. The closest I can see is in the logs:

Version file found in /opt/codedeploy-agent/.version with agent version OFFICIAL_1.4.1-2244_deb

The error I'm getting is this:

![aws-codedeploy-bad-script-ref](https://user-images.githubusercontent.com/7843659/222767599-904adfb2-3c2b-41e0-b953-3f65b811ac79.png)

Notice that the deployment ID following the deployment group ID is different from the actual deployment shown in details. This is the problem - that other deployment ID isn't even for this application, but another application that was deployed to the same VM at a different time.

Checking this deployment, it is properly picking up correct build artifacts, which do contain the script that it reports to be missing:

![aws-codedeploy-bad-script-ref-2](https://user-images.githubusercontent.com/7843659/222768457-d947fd99-ec6f-457b-a1e0-8879f98bbde2.png)

The revision location shown in details does contain the script that is reported as missing, so `codedeploy-agent` is definitely trying to refer to a bogus deployment ID when it is trying to locate the application revision.

Looking at the `codedeploy-agent` logs, it just reports this error that is visible in UI and no other useful information. In verbose mode, it references the correct application revision and, on the next log line after this, is trying to open `appspec.yml` for the bogus deployment ID reported in the error.

I also noticed that deployment ID referenced in revision details in the screenshot above is different for manually-created deployments in that it may be different from the current deployment ID in the same screenshot and seems to be referring to the deployment ID that was active at the time CodePipeline was running, when it got a notification from the CodeBuild stage. Mentioning this because it sounds plausible that this is where the original deployment ID mix-up happened.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza revisando los registros detallados de codedeploy-agent y la entrada /opt/codedeploy-agent/.version para la versión del agente OFFICIAL_1.4.1-2244_deb en Ubuntu 18.04. Compara la revisión de deployment correcta con el ID de deployment incorrecto utilizado al abrir appspec.yml; se considera terminado cuando el agente selecciona la revisión actual y encuentra sus scripts de application-event.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
aws, ubuntu
Área
cloud, devops
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.