Bug 604 - vAPV 10.7.x on Azure marketplace

Review Request #441 — Created Sept. 4, 2024 and submitted

marychou
APV10
rel_apv_10_7
604
kevin.poh, timlai, weikai

For the first issue, ATCP crash issue, it has already been fixed in bug882.
Secondly, the condition is that the key would be lost after rebooting APV. Thanks to Simon's help, I modify the source code in azurelinuxagent/common/osutil/default.py.
The solution is that we have to save key in /ca/etc/ssh_pubkey.
Lastly, This is about the problem where the deployment of VM (vAPV) using username and password fails. The root cause of the problem is that we previously use the wrong Array CLI command to change the password, which causes the waagent to crash. Also, the return message cannot be parsed by the encoding of utf-8. I try-catch this exception, and change encoding to latin-1 to fix this. In fact, in the source code of waagent, azurelinuxagent/common/osutil/default.py, Array CLI "passwd use" should be used instead of Array CLI "useradd" in function chpasswd. In another file, azurelinuxagent/common/utils/shellutil.py, "ustr(output, encoding='latin-1', errors="backslashreplace")" is called when exception UnicodeDecodeError happens.
I Packaged the modified code of waagent into http://192.168.100.11/arrayepel.72/WALinuxAgent-2.2.49.2-4.noarch.rpm, and updated the file tools/update/ustacksystem.ks in rel_apv_10_7 repository to allow release four to be used in build procedure.
It's noted that after fixxing this bug I found that the we cannot use root to login in serial port any more. The way to use root account is using test account to log in at first, and then switch to root(hint of pd: CA~) account. I might be the protected machinism of Azure. However, it needs more research to be done.

Manually create vhd and image in azure. Those issues didn't happen again.

marychou
timlai
  1. Ship It!
  2. 
      
marychou
Review request changed

Status: Closed (submitted)

weikai
  1. Ship It!
  2. 
      
Loading...