regex warnings in MsftLinuxPatchCore.py?

Đang mở
#329 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
cloud, operating-systems

Hướng nghiên cứu

Bắt đầu trong MsftLinuxPatchCore.py tại các dòng 7451, 7468 và 7476, sau đó tái hiện sự cố trên một Azure VM chạy Ubuntu 24.04 trong khi theo dõi nhật ký của extension. Xác minh rằng việc xử lý regex bị ảnh hưởng không còn phát cảnh báo về chuỗi escape không hợp lệ trong quá trình khởi động LinuxPatchExtension.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
12
Fork
20
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
2

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/LinuxPatchExtension

Tất cả issue của Azure/LinuxPatchExtension

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.