Bug 1323905

Summary: [WALA][rhel6.7] Fails to reset password on a vm based on a captured image on which the reset password manipulation is done before.
Product: Red Hat Enterprise Linux 6 Reporter: Hu Zhang <huzhan>
Component: WALinuxAgentAssignee: Yue Zhang <yuezha>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.7CC: huishao, leiwang, lizzha, tmlcoch, wshi, yuxisun
Target Milestone: rcKeywords: Extras, Tracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-27 07:30:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1359574    

Description Hu Zhang 2016-04-05 02:56:11 UTC
Description of problem:
Fails to reset password on a vm created base on a captured image.
This image is captured from a vm on which the reset password manipulation is done.

Version-Release number of selected component (if applicable):
WALinuxAgent-2.0.16-1.el6

How reproducible:
Always

Steps to Reproduce:
1. Prepare a VM and do reset password on it through portal.
2. Capture this VM as a image. And create a new VM base on this image.
3. Do reset password on this new VM.
4. Try to use the new password to login the new VM

Actual results:
3. Fails to reset password on this new VM even it returns success on portal.
4. Fails to login the new VM.
The following is the log from /var/log/azure/Microsoft.OSTCExtensions.VMAccessForLinux/1.4.0.0/extension.log.
"""
1.0]Config decoded correctly.
2016/02/02 01:54:58 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]set most recent sequence number to 1
2016/02/02 01:54:58 CreateAccount: azureuser already exists. Will update password.
2016/02/02 01:54:58 Created user account: azureuser
2016/02/02 01:54:58 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]Succeeded in create the account or set the password.
2016/02/02 01:54:58 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]Succeeded in resetting ssh_key.
2016/02/02 01:54:58 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]Enable,success,0,Enable succeeded.
2016/02/15 02:39:40 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]sequence number is 1
2016/02/15 02:39:40 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]setting file path is/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.0.0/config/1.settings
2016/02/15 02:39:40 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]JSON config: {"runtimeSettings":[{"handlerSettings":{"protectedSettingsCertThumbprint":"E23EEEA55A175169EB0D2719A7A6BAE3C909C7A3","protectedSettings":"MIIEdAYJKoZIhvcNAQcDoIIEZTCCBGECAQAxggFxMIIBbQIBADBVMEExPzA9BgoJkiaJk/IsZAEZFi9XaW5kb3dzIEF6dXJlIFNlcnZpY2UgTWFuYWdlbWVudCBmb3IgRXh0ZW5zaW9ucwIQFlelR5UKeZdHABJHzbZSJjANBgkqhkiG9w0BAQEFAASCAQB5t/wmo5QbAAwc1I/mVWftDpLTpYF8UGxvFyRsT628feefbOstcPaTEZq5mHF0IPxDERWDWBIGdkRBXJ3yuY2AIbhNGx7sSO1bCJrERJ6rZTUnK52aPMtMPyEL5nTQtaxjQW3ajknthxYPWFzW9jMIWpy/eH9/t1FsgP8DjwMqMrM8sv0FlIw7sWX7W46L8HvyY26i3RgPmBo/0T989uI7KCLgdAZVAp2j0PIa9Cc8y2PKh7pG7TqomHG/xpjKxD6Vh/43C9QmH/74gr4oTKtohf4FMeV13TyJDw45MeuIdpqv9qUILJIUFUGKZ8vSxTQGd9xBhipLTgHjXWrl50tyMIIC5QYJKoZIhvcNAQcBMBQGCCqGSIb3DQMHBAiai04ZOUZ98YCCAsBPzS1MzKIrinBk60+BTdE7p02lCiEKJczsxr3QcwDaFuf4vCp1IUd9+CVfIWfWH5butER/tITgIHrjheO9VzHr9qwHWhDgOI07iwTCQYVe2L9o8XVnMRE60+yZS8jcqnKj9Xbc6yUHMPrR5xO/tJueebdq2KVgMXtqCgBso4yaKNoeOrhS7/gx4F6aZ/bqrQFIR9wnVTLIpCMdZl+UsnsLp9+kdwXpYNt3fUg9pE66CHjumby1437irx1Q7yaPSnIOVsvGeuf!
ViK93rJLPY
t+LGPNrImL8nKXL9inpg6lIw0fu1WIfSjePP7v21TCC/HMzChn3TygYkAIGB04wsNEw9tdVWvCcpgbnJVP0CVyabw7VCT2R36U6h7oJvcxHpQu86kidGj8xg8iVV4OdBW0TTrIMZOrlqgtnAZd1WuK7vn7UPUfQPmCxEqEVoWC4jG8404JzyuBKJ45ih7oh05g5eSQIJPNmNHIXDEMcEXP9+E7Nv0IJCG4WCM+1By/tVM240gx6N7q3Mwul904jJxvO3Oy4/vAf0jZrGcDKgeij7Wt4xojL2uL4PHzxFztMvEWYSJsstwSUTuZ0JbPODn/zHsGr3eBKLVRIZDFzDvi1shfUXRpg/rP/VX/JwDNUfVD5V9JTy72ujT7zt4pbJy7R16nHv76vxKgAbdFSojtADljVLj/m+8DoKF8pyewKbczQE8GH2kreIoLkiHQUi1CAC76evCUd0CvEuPHs/TseRb+VtYOBmfeEoiHau0PyCooTMIXo1MGlVmKakKLNWz9fjP3XmojJmoQlhLW63sHBRnN66//ShQwEZ6AtpTNfxc9BogPzmo3JlyICFiKmhul39rAbwo+7AaDDFL17LupXnO5IwAXrcR/CAynsN40sHmzJzflw/nsWi5p9qgYOO8VvTPKvE5sZK+Uedx0JBVCKQg=="}}]}
2016/02/15 02:39:40 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]Config decoded correctly.
2016/02/15 02:39:40 [Microsoft.OSTCExtensions.VMAccessForLinux-1.0]Current sequence number, 1, is not greater than the sequnce number of the most recent executed configuration. Exiting...
"""

Expected results:
Success to reset password on these kind of VM.

Additional info:
The root cause is the most recent sequence number on the new VM is get from the file "/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.0.0/mrseq"
And it's always greater than or equal to the Current sequence number which will be reset when do the reset password on a new provisioned VM.

Comment 4 Yuxin Sun 2016-08-09 09:08:19 UTC
Still exists in WALinuxAgent-2.1.5

Comment 5 Dave Anderson 2016-08-18 16:00:14 UTC
Setting Devel Conditional NAK: Patch for rhel-6.9

Comment 9 RHEL Program Management 2022-04-27 07:30:53 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.