Azure / Azure/azure-linux-extensions
OSPatching - Doesn't work on RHEL
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
The OSPatching extension is failing when its sent public or protected settings from Azure CLI 2.0 (Python). Below are the repro steps for RHEL 7.3.
`$ cat scheduled_patch.json`
{
"disabled": false,
"stop": false,
"rebootAfterPatch": "RebootIfNeed",
"intervalOfWeeks": "1",
"dayOfWeek": "Sunday|Wednesday",
"startTime": "03:00",
"category": "ImportantAndRecommended",
"installDuration": "00:30"
}
**Azure CLI 2.0 (Python):**
`$ az vm extension set -g wjack-linux --vm-name my-vm -n OSPatchingForLinux --publisher Microsoft.OSTCExtensions --protected-settings scheduled_patch.json --version 2.3`
2017/04/04 04:35:29 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]Config decoded correctly.
2017/04/04 04:35:29 ERROR:[Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]Failed to enable the extension with error: 'unicode' object has no attribute 'copy', stack trace: Traceback (most recent call last):
2017/04/04 04:35:29 ERROR: File "/var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1/./handler.py", line 63, in enable
2017/04/04 04:35:29 ERROR: settings = protected_settings.copy()
2017/04/04 04:35:29 ERROR:AttributeError: 'unicode' object has no attribute 'copy'
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with handler.py at line 63 and reproduce the failure using the provided az vm extension set command and scheduled_patch.json on RHEL 7.3. Done means the OSPatching extension accepts the protected or public settings and enables without the reported AttributeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, linux, python
- Domain
- cloud, operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100