Bug 1371805 - [WALA]"Reset configuration only" in ARM mode results in log error
Summary: [WALA]"Reset configuration only" in ARM mode results in log error
Keywords:
Status: CLOSED DUPLICATE of bug 1360492
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: WALinuxAgent
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Yuxin Sun
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-31 07:22 UTC by Bin Han
Modified: 2019-02-26 20:57 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-21 09:53:57 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Azure azure-linux-extensions issues 235 0 None None None 2016-09-01 05:32:53 UTC

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 ***


Note You need to log in before you can comment on or make changes to this bug.