Azure / Azure/LinuxPatchExtension
regex warnings in MsftLinuxPatchCore.py?
- Lenguaje dominante
- Python
- Estrellas
- 12
- Forks
- 20
- Merge medio
- 6 d 4 h
- PR fusionados (30 d)
- 1
Descripción
**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.
Guía de contribución
Línea de trabajo
Comienza en MsftLinuxPatchCore.py en las líneas 7451, 7468 y 7476, y luego reproduce el problema en una VM de Azure con Ubuntu 24.04 mientras observas los registros de la extensión. Verifica que el manejo de la expresión regular afectada ya no emita advertencias de secuencias de escape no válidas durante el inicio de LinuxPatchExtension.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- cloud, operating-systems
- Tipo de issue
- Error
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 55/100