Azure / Azure/azure-linux-extensions
OSPatching creates the wrong crontab schedule
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
Extension creates the following record in the /etc/crontab file
**for "dayOfWeek" = "Everyday";**
We can see the error
**Incorrect day of week**
```
27 16 * * [1, 2, 3, 4, 5, 6, 7] root cd /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1 && python check.py 1 && python handler.py -download > /dev/null 2>&1
27 17 * * [1, 2, 3, 4, 5, 6, 7] root cd /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1 && python check.py 1 && python handler.py -patch >/dev/null 2>&1
28 17 * * [1, 2, 3, 4, 5, 6, 7] root rm -f /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1/StopOSPatching
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the OSPatching extension generates the /etc/crontab entries for dayOfWeek="Everyday"; the issue shows the generated commands invoking check.py and handler.py. Compare the resulting schedule with valid crontab syntax and verify that the Everyday case produces a valid day-of-week field.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, linux, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100