Azure / Azure/azure-linux-extensions

OS Patching Extension for Centos 7.3 does not work

Open
#373 3 comments 0 reactions 0 assignees View on GitHub
Distro support extensions/OSPatching
Dominant language
Python
Stars
333
Forks
278
Avg merge
2d 9h
Merged PRs (30d)
4

Description

Problem with the extension Microsoft.OSTCExtensions.OSPatchingForLinux
The configuration is :
'publicSettings': {'category': 'ImportantAndRecommended', 'dayOfWeek': 'Tuesday', 'rebootAfterPatch': 'Auto', 'intervalOfWeeks': '3', 'stop': false, 'vmStatusTest': {'local': false, 'idleTestScript': '', 'healthyTestScript': ''}, 'disabled': false, 'installDuration': '01:00', 'oneoff': false, 'startTime': '03:00'},
It does not work, server does not get updated.

The template is being deployed using the template option in Azure portal.
##################################
#cat /etc/*rel*
CentOS Linux release 7.3.1611 (Core)
Derived from Red Hat Enterprise Linux 7.3 (Source)
NAME='CentOS Linux'
VERSION='7 (Core)'
ID='centos'
ID_LIKE='rhel fedora'
VERSION_ID='7'
PRETTY_NAME='CentOS Linux 7 (Core)'
ANSI_COLOR='0;31'
CPE_NAME='cpe:/o:centos:centos:7'
HOME_URL='https://www.centos.org/'
BUG_REPORT_URL='https://bu
[Uploading extension.txt…]()
[Uploading waagent.txt…]()

gs.centos.org/'
CENTOS_MANTISBT_PROJECT='CentOS-7'
CENTOS_MANTISBT_PROJECT_VERSION='7'
REDHAT_SUPPORT_PRODUCT='centos'
REDHAT_SUPPORT_PRODUCT_VERSION='7'
cat: /etc/prelink.conf.d: Is a directory
CentOS Linux release 7.3.1611 (Core)
CentOS Linux release 7.3.1611 (Core)
cpe:/o:centos:centos:7
~]# **uname -a
**Linux test1 3.10.0-514.2.2.el7.x86_64 #1 SMP Tue Dec 6 23:06:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux****
####################################
/var/log/azure/Microsoft.OSTCExtensions.OSPatchingForLinux/2.3.0.1/extension.log
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]sequence number is 0
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLin ux-2.3.0.1/config/0.settings
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]JSON config: {'runtimeSettings': [{'handlerSettings': {'protectedSettings': 'M IIB4AYJKoZIhvcNAQcDoIIB0TCCAc0CAQAxggFpMIIBZQIBADBNMDkxNzA1BgoJkiaJk/IsZAEZFidXaW5kb3dzIEF6dXJlIENSUCBDZXJ0aWZpY2F0ZSBHZW5lcmF0b3ICEHwpRo936maARatE UAJ+GuQwDQYJKoZIhvcNAQEBBQAEggEACpf/yLDV4aQanc3e3D29ZuYz2COSVeEsnsOU2Hvntx2VDTSMfUcM5JE1pbUU1hUol0nqnnt6NjaOFmTo7WI6qFFFDO1F+gCzoCzsuGBzRMx3cWA2vVk nWqYvNvhn6gesQtNmJCslIwMCfPzIM57jE9RQX5FRwH+cD5fj1vceEbecuMaFxvpVDk2zO0+CQXsLRe97kBDyP8VfELJt/hsSQgpYtAZQw7clwCS2+prFsKA7ZbcCfuifr2aNj3TsakFpYf3CRh CMcpMcfSbsaqEW36Wh9j0ghcizAF7BhrtONUlfnVD2xgdggTPqEjy5dW6pBsM9yNs0qP6vi+Q7Sy4c0jBbBgkqhkiG9w0BBwEwFAYIKoZIhvcNAwcECKLGwZibaxOdgDjrw7u2co+0koeYuCCGe o8BcYpAD1FrC3vC0pV6sP7Al+nOdZsfg1FLdniuD2CZu2WTupESAEIlxA==', 'publicSettings': {'category': 'ImportantAndRecommended', 'dayOfWeek': 'Everyday', 'r ebootAfterPatch': 'Auto', 'intervalOfWeeks': '1', 'stop': false, 'vmStatusTest': {'local': false, 'idleTestScript': '', 'healthyTestScript': ''}, ' disabled': false, 'installDuration': '01:00', 'oneoff': false, 'startTime': '14:00'}, 'protectedSettingsCertThumbprint': '1FB5AA9625693206C022700C2 70BE6DD3A829993'}}]}
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]Config decoded correctly.
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]The value of parameter 'distUpgradeAll' is empty or invalid. Set it false by d efault.
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]The extension will reserve 5 minutes for reboot.
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]The extension will run in scheduled task mode.
2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]Current Configuration: category=importantandrecommended,dayOfWeek=Everyday,dis tUpgradeAll=False,intervalOfWeeks=1,stop=False,disabled=False,installDuration=01:00,rebootAfterPatch=auto,oneoff=False,startTime=14:00
[extension.txt](https://github.com/Azure/azure-linux-extensions/files/947735/extension.txt)
[waagent.txt](https://github.com/Azure/azure-linux-extensions/files/947736/waagent.txt)

2017/03/30 18:03:35 [Microsoft.OSTCExtensions.OSPatchingForLinux-1.0]Current sequence number, 0, is not greater than the sequnce number of the most recent executed configuration. Exiting...
##################################
#cat /etc/crontab
**# * * * * * user-name command to be executed**
0 13 * * [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
0 14 * * [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
1 14 * * [1, 2, 3, 4, 5, 6, 7] root rm -f /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1/StopOSPatching
####################################
Size at 0 for file /scheduled/history
[Uploading extension.txt…]()

ls -l /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1/scheduled/history
-rwxr--r--. 1 root root 0 Mar 30 13:40 /var/lib/waagent/Microsoft.OSTCExtensions.OSPatchingForLinux-2.3.0.1/scheduled/history

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with /var/log/azure/Microsoft.OSTCExtensions.OSPatchingForLinux/2.3.0.1/extension.log and compare its configuration with /etc/crontab. Then inspect check.py, handler.py, and scheduled/history under the extension directory to trace the scheduled run. Done means the configured CentOS VM receives updates and the scheduled history shows a successful run.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, centos, linux, python
Domain
cloud, devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.