Azure / Azure/LinuxPatchExtension

regex warnings in MsftLinuxPatchCore.py?

Offen
#329 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
12
Forks
20
Ø Merge
6 T. 4 Std.
Gemergte PRs (30 T.)
1

Beschreibung

**Describe the bug**
I see the following in my journalctl logs:

```
Aug 22 00:36:41 sr-monitor systemd[1]: Starting MsftLinuxPatchAutoAssess.service - Microsoft Azure Linux Patch Extension - Auto Assessment...
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7451: SyntaxWarning: invalid escape sequence '\_'
Aug 22 00:36:41 sr-monitor bash[143561]: """ Fetches pid from the error message by searching for the text 'pid' and returns the process tree with all details.
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7468: SyntaxWarning: invalid escape sequence '\d'
Aug 22 00:36:41 sr-monitor bash[143561]: regex = re.compile(' pid \d+')
Aug 22 00:36:41 sr-monitor bash[143561]: /var/lib/waagent/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.62/MsftLinuxPatchCore.py:7476: SyntaxWarning: invalid escape sequence '\d'
Aug 22 00:36:41 sr-monitor bash[143561]: regex = re.compile('\d+')
```

Is this a bug?

**To Reproduce**
Steps to reproduce the behavior:
1. Create Azure Ubuntu VM
2. Enable LinuxPatchExtension
3. Watch the logs

**Expected behavior**
No regex warnings

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: ubuntu
- Browser N/A
- Version 24_04-lts

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie in MsftLinuxPatchCore.py bei den Zeilen 7451, 7468 und 7476. Reproduzieren Sie anschließend das Problem auf einer Ubuntu 24.04 Azure-VM, während Sie die Erweiterungsprotokolle beobachten. Verifizieren Sie, dass die betroffene Regex-Verarbeitung beim Start von LinuxPatchExtension keine Warnungen zu ungültigen Escape-Sequenzen mehr ausgibt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cloud, operating-systems
Issue-Typ
Bug
Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
55/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.