Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1371805

Summary: [WALA]"Reset configuration only" in ARM mode results in log error
Product: Red Hat Enterprise Linux 7 Reporter: Bin Han <bihan>
Component: WALinuxAgentAssignee: Yuxin Sun <yuxisun>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: anderson, bihan, borisb, brendand, danis, hkrijger, jopoulso, leiwang, stephen.zarkos, wshi, yuxisun
Target Milestone: rcKeywords: Extras, Tracking
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-21 09:53:57 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:
Embargoed:

Description Bin Han 2016-08-31 07:22:32 UTC
Description of problem:
"Reset configuration only" in ARM mode results in log error

Version-Release number of selected component (if applicable):
WALinuxAgent-2.1.6

RHEL Version: RHEL-7.3-20160825.1
Python Version: 2.7.5

How reproducible:
100%

Steps to Reproduce:
1. Prepare a RHEL7.3 VM on Azure East US location(ARM mode) with WALA-2.1.6 installed.
2. Select the VM,go to "Reset password" and then "Reset configuration only", click "OK"

Actual results:
The file has been backuped and create a new file.But there is log error in log file

/var/log/azure/Microsoft.OSTCExtensions.VMAccessForLinux/1.4.1.0/extension.log
2016/08/30 17:59:31 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0] set most recent sequence number to 4
2016/08/30 17:59:31 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0] Succeeded in reset sshd_config.
2016/08/30 17:59:31 ERROR:[Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0] Failed to enable the extension with error: No password or ssh_key is specified., stack trace: Traceback (most recent call last):
2016/08/30 17:59:31 ERROR:  File "/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0/./vmaccess.py", line 90, in enable
2016/08/30 17:59:31 ERROR:    _set_user_account_pub_key(protect_settings, hutil)
2016/08/30 17:59:31 ERROR:  File "/var/lib/waagent/Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0/./vmaccess.py", line 145, in _set_user_account_pub_key
2016/08/30 17:59:31 ERROR:    raise Exception("No password or ssh_key is specified.")
2016/08/30 17:59:31 ERROR:Exception: No password or ssh_key is specified.
2016/08/30 17:59:31 ERROR:
2016/08/30 17:59:31 [Microsoft.OSTCExtensions.VMAccessForLinux-1.4.1.0] Enable,error,0,Enable failed.


Expected results:
Backup the old sshd_config and generates a new file without log error.

Additional info:

Comment 2 Hans Krijger 2016-08-31 16:53:18 UTC
This is an issue with VMAccess extension, see here: https://github.com/Azure/azure-linux-extensions/blob/master/VMAccess/vmaccess.py#L87-L94 

It looks like _set_user_account_pub_key is called after _reset_sshd_config succeeds, resulting in the error. I recommend opening an issue in that repo.

Comment 3 Yuxin Sun 2016-09-01 05:32:53 UTC
Thanks Hans!
Open an issue here:
https://github.com/Azure/azure-linux-extensions/issues/235

Comment 4 Bin Han 2016-09-21 08:43:51 UTC
Version:
WALinuxAgent-2.1.5

Steps:
1. Prepare a RHEL7.3 VM on Azure East US location(ARM mode) with WALA-2.1.6 installed.
2. Select the VM,go to "Reset password" and then "Reset configuration only", click "OK"

Result:
Backup the old sshd_config and generates a new file without log error.

Comment 5 Yuxin Sun 2016-09-21 09:53:57 UTC

*** This bug has been marked as a duplicate of bug 1360492 ***