``pe_patch::patch_server`` silently stops working when lock file artifact isn't deleted.
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
Beginne mit /opt/puppetlabs/pe_patch/pe_patch_fact_generation.sh und reproduziere die im Issue beschriebene Bedingung, dass /var/run/pe_patch_fact_generation.lock veraltet ist. Prüfe den Exit-Status und die Ausgabe des Skripts, wenn die Sperre bestehen bleibt, und verifiziere anschließend, dass die normale Update-Berichterstattung wieder aufgenommen wird, nachdem die Bedingung behoben wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Affected Puppet, Ruby, OS and module versions/distributions
It was observed that pe_patch::patch_server was incorrectly not reporting any updates on a server; manually running yum on the server, however, showed a long list of updates. The problem was that several months ago a lock file /var/run/pe_patch_fact_generation.lock had been left behind. Even though the cron job continued to run opt/puppetlabs/pe_patch/pe_patch_fact_generation.sh on a regular basis, the script exited with 0 and no warning.
How to reproduce (e.g Puppet code you use)
Manually create a lock file /var/run/pe_patch_fact_generation.lock owned by root in such a way that Cron cannot remove the file
What are you seeing
Manually running the script above with trace shows the following:
[root@LUAPP708 ~]# /opt/puppetlabs/pe_patch/pe_patch_fact_generation.sh
Locked, exiting
[root@LUAPP708 ~]# bash -x /opt/puppetlabs/pe_patch/pe_patch_fact_generation.sh
+ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/bin:/usr/local/bin:/usr/local/sbin:/opt/puppetlabs/puppet/bin:/opt/puppetlabs/bin
+ LOCKFILE=/var/run/pe_patch_fact_generation.lock
+ trap '{ rm -f /var/run/pe_patch_fact_generation.lock ; exit 255; }' 2 3 15
+ '[' -f /var/run/pe_patch_fact_generation.lock ']'
+ echo 'Locked, exiting'
Locked, exiting
+ exit 0
After removing the lock file, everything worked as expected.
What behaviour did you expect instead
Output log
Any additional information you'd like to impart
- Vorherrschende Sprache
- Ruby
- Sterne
- 4
- Forks
- 1
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus puppetlabs/pe_patch
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
puppetlabs/pe_patch#108 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 50/100
puppetlabs/pe_patch#98 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
puppetlabs/pe_patch#97 ·
Alle Issues in puppetlabs/pe_patch
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
ecosyste-ms/repos#1215 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
WikiEducationFoundation/WikiEduDashboard#7157 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
r-uby-dev/llm#292 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag