aws / aws/aws-codedeploy-agent

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

Aperta
#348 6 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
337
Fork
195
Merge medio
10h 54m
PR unite (30g)
4

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando i log dettagliati di codedeploy-agent e la voce /opt/codedeploy-agent/.version per la versione dell’agente OFFICIAL_1.4.1-2244_deb su Ubuntu 18.04. Confronta la revisione di deployment corretta con l’ID di deployment errato utilizzato durante l’apertura di appspec.yml; il lavoro è completato quando l’agente seleziona la revisione corrente e trova i relativi script application-event.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, ubuntu
Ambito
cloud, devops
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.