Azure / Azure/azure-linux-extensions
AADLoginForLinux: installation from terraform/cli is failing
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
Hi,
trying to install the extension using both terraform and cli - it only succeedes when installer is executed from command line on the vm itself.
```
$ az vm extension set -g resource-group --vm-name vmname--publisher Microsoft.Azure.ActiveDirectory.LinuxSSH -n AADLoginForLinux
```
Error:
```
Deployment failed. Correlation ID: a1a4e865-446c-4890-8bd0-06d515fd2b94. The handler for VM extension type 'Microsoft.Azure.ActiveDirectory.LinuxSSH.AADLoginForLinux' has reported terminal failure for VM extension 'AADLoginForLinux' with error message: '[ExtensionOperationError] Non-zero exit code: 100, /var/lib/waagent/Microsoft.Azure.ActiveDirectory.LinuxSSH.AADLoginForLinux-1.0.8370001/./installer.sh install
[stdout]
se [574 B]
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:4 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic InRelease
Hit:7 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:8 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
Hit:9 https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/amd64 InRelease
Hit:10 https://packages.microsoft.com/repos/azure-cli bionic InRelease
Hit:11 https://nvidia.github.io/nvidia-docker/ubuntu18.04/amd64 InRelease
Hit:12 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
Hit:13 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease
Hit:14 http://ppa.launchpad.net/x2go/stable/ubuntu bionic InRelease
Ign:15 https://dl.bintray.com/sbt/debian InRelease
Get:16 https://dl.bintray.com/sbt/debian Release [815 B]
Hit:18 http://security.ubuntu.com/ubuntu bionic-security InRelease
Fetched 815 B in 1s (616 B/s)
Reading package lists...
Installing curl
Configuring microsoft-prod repo
gpg: key 3B4FE6ACC0B21F32: 3 signatures not checked due to missing keys
gpg: key 3B4FE6ACC0B21F32: "Ubuntu Archive Automatic Signing Key (2012) " not changed
gpg: key D94AA3F0EFE21092: 3 signatures not checked due to missing keys
gpg: key D94AA3F0EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) " not changed
gpg: key 871920D1991BC93C: 1 signature not checked due to a missing key
gpg: key 871920D1991BC93C: "Ubuntu Archive Automatic Signing Key (2018) " not changed
gpg: Total number processed: 3
gpg: unchanged: 3
Installing apt-transport-https
Get:1 file:/var/nccl-repo-2.2.13-ga-cuda9.2 InRelease
Ign:1 file:/var/nccl-repo-2.2.13-ga-cuda9.2 InRelease
Get:2 file:/var/nccl-repo-2.2.13-ga-cuda9.2 Release [574 B]
Hit:3 http://packages.microsoft.com/repos/vscode stable InRelease
Get:2 file:/var/nccl-repo-2.2.13-ga-cuda9.2 Release [574 B]
Hit:4 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:7 https://packages.microsoft.com/repos/azure-cli bionic InRelease
Hit:8 https://packages.microsoft.com/ubuntu/18.04/prod bionic InRelease
Hit:9 http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic InRelease
Hit:10 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease
Hit:11 https://nvidia.github.io/libnvidia-container/stable/ubuntu18.04/amd64 InRelease
Hit:12 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:13 https://nvidia.github.io/nvidia-container-runtime/ubuntu18.04/amd64 InRelease
Hit:14 ht
[stderr]
Running scope as unit: Microsoft.Azure.ActiveDirectory.LinuxSSH.AADLoginForLinux_1.0.8370001_f7b33b0f-ace9-4896-959f-670206fb69e6.scope
Warning: apt-key output should not be parsed (stdout is not a terminal)
Warning: 'apt-key update' is deprecated and should not be used anymore!
E: Sub-process /usr/bin/dpkg returned an error code (1)
'.
'Install handler failed for the extension. More information on troubleshooting is available at https://aka.ms/vmextensionlinuxtroubleshoot'
```
Terraform part:
```
// vm image
source_image_reference {
publisher = "microsoft-dsvm"
offer = "ubuntu-1804"
sku = "1804"
version = "latest"
}
resource azurerm_virtual_machine_extension "aadauth" {
depends_on = [azurerm_linux_virtual_machine.vm-name]
name = "AADLoginForLinux"
virtual_machine_id = azurerm_linux_virtual_machine.vm-name.id
publisher = "Microsoft.Azure.ActiveDirectory.LinuxSSH"
type = "AADLoginForLinux"
type_handler_version = "1.0"
auto_upgrade_minor_version = true
}
```
Any hints will be appreciated.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the AADLoginForLinux installation with the shown Terraform resource and az vm extension set command on the Ubuntu 18.04 image. Inspect the installer output around apt, dpkg, and the microsoft-prod repository; done means the extension installs successfully through both Terraform and CLI without the dpkg error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, terraform, ubuntu
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100