Azure / Azure/azure-linux-extensions
VMEncryption failed with AAD client certificate-based authentication
- Dominant language
- Python
- Stars
- 333
- Forks
- 278
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
We are trying to encrypt Linux IaaS VM with AAD client certificate based authentication. But it failed on enabling VMEncryption extension. The root cause is that the extension cannot install pre-requisites due to could not get lock /var/lib/dpkg/lock. So CommandExecutor.Execute() need to add retries logic just like what doing in OmsAgent.
```
Failed to enable the extension with error:
adal library is not available on the VM, stack trace: Traceback (most recent call last):
File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/handle.py", line 671,
in enable_encryption DiskEncryptionKeyFileName=extension_parameter.DiskEncryptionKeyFileName)
File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 74,
in create_kek_secret access_token = self.get_access_token(kv_resource_name, authorize_uri, AADClientID, AADClientCertThumbprint, AADClientSecret)
File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 108,
in get_access_token raise Exception("adal library is not available on the VM")
Exception: adal library is not available on the VM
```
log in /var/log/waagent.log:
```
2017/07/21 19:19:42.369118 INFO Azure Linux Agent Version:2.2.12
2017/07/21 19:19:42.372870 INFO OS: ubuntu 16.04
2017/07/21 19:19:42.378476 INFO Python: 3.5.2
2017/07/21 19:19:42.382157 INFO Run daemon
2017/07/21 19:19:42.385601 INFO No RDMA handler exists for distro='Ubuntu' version='16.04'
2017/07/21 19:19:42.389981 INFO Clean protocol
2017/07/21 19:19:42.393794 INFO Running CloudInit provisioning handler
2017/07/21 19:19:42.399397 INFO Detect protocol endpoints
2017/07/21 19:19:42.402905 INFO Clean protocol
2017/07/21 19:19:42.406157 INFO WireServer endpoint is not found. Rerun dhcp handler
2017/07/21 19:19:42.410250 INFO Test for route to 168.63.129.16
2017/07/21 19:19:42.414029 INFO Route to 168.63.129.16 exists
2017/07/21 19:19:42.417602 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:42.432193 INFO Fabric preferred wire protocol version:2015-04-05
2017/07/21 19:19:42.436353 INFO Wire protocol version:2012-11-30
2017/07/21 19:19:42.440024 WARNING Server preferred version:2015-04-05
2017/07/21 19:19:46.690940 INFO ssh host key found at: /etc/ssh/ssh_host_rsa_key.pub
2017/07/21 19:19:46.697821 INFO Thumbprint obtained from : /etc/ssh/ssh_host_rsa_key.pub
2017/07/21 19:19:46.702462 INFO Finished provisioning
2017/07/21 19:19:51.878691 INFO Event: name=WALinuxAgent, op=Provision, message=Provision succeed
2017/07/21 19:19:51.879340 INFO RDMA capabilities are not enabled, skipping
2017/07/21 19:19:51.880460 INFO Installed Agent WALinuxAgent-2.2.12 is the most current agent
2017/07/21 19:19:51.988637 INFO Agent WALinuxAgent-2.2.12 is running as the goal state agent
2017/07/21 19:19:51.991424 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:51.997892 INFO Event: name=WALinuxAgent-2.2.12, op=HeartBeat, message=
2017/07/21 19:19:52.000261 INFO Start env monitor service.
2017/07/21 19:19:52.000761 INFO Configure routes
2017/07/21 19:19:52.001153 INFO Gateway:None
2017/07/21 19:19:52.001566 INFO Routes:None
2017/07/21 19:19:52.001970 WARNING Hostname record does not exist, creating [/var/lib/waagent/published_hostname] with hostname [CloudApiDev03]
2017/07/21 19:19:52.009937 INFO WALinuxAgent-2.2.12 running as process 2164
2017/07/21 19:19:52.010128 INFO Set block dev timeout: sda with timeout: 300
2017/07/21 19:19:52.011876 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:52.014684 INFO Set block dev timeout: sdb with timeout: 300
2017/07/21 19:19:52.081734 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.10 downloaded successfully
2017/07/21 19:19:52.119216 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.12 downloaded successfully
2017/07/21 19:19:52.152790 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.13 downloaded successfully
2017/07/21 19:19:52.186219 INFO Event: name=WALinuxAgent, op=Install, message=Agent WALinuxAgent-2.2.8 downloaded successfully
2017/07/21 19:19:52.187208 INFO Agent WALinuxAgent-2.2.12 discovered WALinuxAgent-2.2.13 as an update and will exit
2017/07/21 19:19:53.021743 INFO Agent WALinuxAgent-2.2.12 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' is successfully running
2017/07/21 19:19:53.022145 INFO Event: name=WALinuxAgent, op=Enable, message=Agent WALinuxAgent-2.2.12 launched with command 'python3 -u /usr/sbin/waagent -run-exthandlers' is successfully running
2017/07/21 19:19:53.025222 INFO Determined Agent WALinuxAgent-2.2.13 to be the latest agent
2017/07/21 19:19:54.052875 INFO Agent WALinuxAgent-2.2.13 is running as the goal state agent
2017/07/21 19:19:54.057674 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:54.061568 INFO Event: name=WALinuxAgent-2.2.13, op=HeartBeat, message=
2017/07/21 19:19:54.064625 INFO Start env monitor service.
2017/07/21 19:19:54.066904 INFO Configure routes
2017/07/21 19:19:54.069372 INFO Gateway:None
2017/07/21 19:19:54.070479 INFO Routes:None
2017/07/21 19:19:54.077224 INFO WALinuxAgent-2.2.13 running as process 2197
2017/07/21 19:19:54.079122 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:54.105478 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:19:54.143635 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/07/21 19:20:11.352382 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/07/21 19:20:29.780680 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Target handler state: enabled
2017/07/21 19:20:29.781444 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] [Enable] current handler state is: notinstalled
2017/07/21 19:20:29.904957 INFO Event: name=Microsoft.Azure.Security.AzureDiskEncryptionForLinux, op=Download, message=Download succeeded
2017/07/21 19:20:29.905782 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Initialize extension directory
2017/07/21 19:20:29.907012 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Update settings file: 0.settings
2017/07/21 19:20:29.908094 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Install extension [main/handle.py -install]
2017/07/21 19:20:31 AzureDiskEncryptionForLinux started to handle.
2017/07/21 19:20:31 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:20:31 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:20:32.920959 INFO Event: name=Microsoft.Azure.Security.AzureDiskEncryptionForLinux, op=Install, message=Launch command succeeded: main/handle.py -install
2017/07/21 19:20:32.921899 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Enable extension [main/handle.py -enable]
2017/07/21 19:20:32 AzureDiskEncryptionForLinux started to handle.
2017/07/21 19:20:32 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:20:32 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:20:35.931495 INFO Event: name=Microsoft.Azure.Security.AzureDiskEncryptionForLinux, op=Enable, message=Launch command succeeded: main/handle.py -enable
2017/07/21 19:20:35.961882 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/07/21 19:21:16.828589 INFO Agent WALinuxAgent-2.2.12 forwarding signal 15 to WALinuxAgent-2.2.13
2017/07/21 19:21:56.334325 INFO Azure Linux Agent Version:2.2.14
2017/07/21 19:21:56.334627 INFO OS: ubuntu 16.04
2017/07/21 19:21:56.335333 INFO Python: 3.5.2
2017/07/21 19:21:56.336070 INFO Run daemon
2017/07/21 19:21:56.336867 INFO No RDMA handler exists for distro='Ubuntu' version='16.04'
2017/07/21 19:21:56.337612 INFO Clean protocol
2017/07/21 19:21:56.338467 INFO Provisioning already completed, skipping.
2017/07/21 19:21:56.339048 INFO RDMA capabilities are not enabled, skipping
2017/07/21 19:21:56.342018 INFO Installed Agent WALinuxAgent-2.2.14 is the most current agent
2017/07/21 19:21:56.458457 INFO Agent WALinuxAgent-2.2.14 is running as the goal state agent
2017/07/21 19:21:56.459877 INFO Detect protocol endpoints
2017/07/21 19:21:56.460442 INFO Clean protocol
2017/07/21 19:21:56.461138 INFO WireServer endpoint is not found. Rerun dhcp handler
2017/07/21 19:21:56.461786 INFO Test for route to 168.63.129.16
2017/07/21 19:21:56.462560 INFO Route to 168.63.129.16 exists
2017/07/21 19:21:56.463123 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:21:56.468639 INFO Fabric preferred wire protocol version:2015-04-05
2017/07/21 19:21:56.469089 INFO Wire protocol version:2012-11-30
2017/07/21 19:21:56.469753 WARNING Server preferred version:2015-04-05
2017/07/21 19:22:00.751847 INFO Event: name=WALinuxAgent-2.2.14, op=HeartBeat, message=
2017/07/21 19:22:00.752671 INFO Start env monitor service.
2017/07/21 19:22:00.753034 INFO Configure routes
2017/07/21 19:22:00.754043 INFO Gateway:None
2017/07/21 19:22:00.754746 INFO Routes:None
2017/07/21 19:22:00.762955 INFO WALinuxAgent-2.2.14 running as process 11482
2017/07/21 19:22:00.763501 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:22:00.794907 INFO Wire server endpoint:168.63.129.16
2017/07/21 19:22:01.067909 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Target handler state: enabled
2017/07/21 19:22:01.068559 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] [Enable] current handler state is: enabled
2017/07/21 19:22:01.069140 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Update settings file: 0.settings
2017/07/21 19:22:01.069838 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Enable extension [main/handle.py -enable]
2017/07/21 19:22:01 AzureDiskEncryptionForLinux started to handle.
2017/07/21 19:22:01 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:22:01 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:22:04.074972 ERROR Event: name=Microsoft.Azure.Security.AzureDiskEncryptionForLinux, op=Enable, message=[000003] Non-zero exit code: 1, main/handle.py -enable
2017/07/21 19:22:04.107044 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
2017/07/21 19:27:43.781847 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Target handler state: enabled
2017/07/21 19:27:43.782690 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] [Enable] current handler state is: enabled
2017/07/21 19:27:43.783468 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Update settings file: 0.settings
2017/07/21 19:27:43.784358 INFO [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297] Enable extension [main/handle.py -enable]
2017/07/21 19:27:43 AzureDiskEncryptionForLinux started to handle.
2017/07/21 19:27:43 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:27:43 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:28:19.847069 ERROR Event: name=Microsoft.Azure.Security.AzureDiskEncryptionForLinux, op=Enable, message=[000003] Non-zero exit code: 1, main/handle.py -enable
2017/07/21 19:28:19.883098 INFO Event: name=WALinuxAgent, op=ProcessGoalState, message=
```
log in /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
```
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] op: Install
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] status: success
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] code: 0
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] msg: Installing pre-requisites
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] substatus: {"os": "NotEncrypted", "data": "NotMounted"}
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Installing pre-requisites
2017/07/21 19:20:31 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Executing: apt-get update
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Executing: apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Command apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip failed with return code 100
2017/07/21 19:20:32 stdout:
2017/07/21 19:20:32
2017/07/21 19:20:32 stderr:
2017/07/21 19:20:32 E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017/07/21 19:20:32 E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017/07/21 19:20:32
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Executing: pip install adal
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2689: [Info] Process creation failed: [Errno 2] No such file or directory
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] op: Install
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] status: success
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] code: 0
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] msg: Install Succeeded
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] substatus: {"os": "NotEncrypted", "data": "NotMounted"}
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:20:32 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Enabling extension
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Public settings:
2017/07/21 19:20:33 {
2017/07/21 19:20:33 "AADClientCertThumbprint": "75F9A2492972464149C0B6240F9E20570E8BA0D7",
2017/07/21 19:20:33 "AADClientID": "e5e54aeb-910c-4880-9cb5-2b8064efadd5",
2017/07/21 19:20:33 "EncryptionOperation": "EnableEncryption",
2017/07/21 19:20:33 "KeyEncryptionAlgorithm": "RSA-OAEP",
2017/07/21 19:20:33 "KeyVaultURL": "https://matrixvaultdev2.vault.azure.net/",
2017/07/21 19:20:33 "SequenceVersion": "1",
2017/07/21 19:20:33 "VolumeType": "All"
2017/07/21 19:20:33 }
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] handle.py found enable encryption operation
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Installing pre-requisites
2017/07/21 19:20:33 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Executing: apt-get update
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Executing: apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Command apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip failed with return code 100
2017/07/21 19:20:34 stdout:
2017/07/21 19:20:34
2017/07/21 19:20:34 stderr:
2017/07/21 19:20:34 E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017/07/21 19:20:34 E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017/07/21 19:20:34
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Executing: pip install adal
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Process creation failed: [Errno 2] No such file or directory
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Config did not change or first call, enabling encryption
2017/07/21 19:20:34 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:20:34 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Enabling encryption
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] make sure path exists, executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: set most recent sequence number to 0
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] start creating kek secret
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] getting the access token.
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] trying to get the authorize uri from: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", resource="https://vault.azure.net"
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Failed to create_kek_secret with error: adal library is not available on the VM, stack trace: Traceback (most recent call last):
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 74, in create_kek_secret
2017/07/21 19:20:34 access_token = self.get_access_token(kv_resource_name, authorize_uri, AADClientID, AADClientCertThumbprint, AADClientSecret)
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 108, in get_access_token
2017/07/21 19:20:34 raise Exception("adal library is not available on the VM")
2017/07/21 19:20:34 Exception: adal library is not available on the VM
2017/07/21 19:20:34
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Error] Failed to enable the extension with error: adal library is not available on the VM, stack trace: Traceback (most recent call last):
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/handle.py", line 671, in enable_encryption
2017/07/21 19:20:34 DiskEncryptionKeyFileName=extension_parameter.DiskEncryptionKeyFileName)
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 74, in create_kek_secret
2017/07/21 19:20:34 access_token = self.get_access_token(kv_resource_name, authorize_uri, AADClientID, AADClientCertThumbprint, AADClientSecret)
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 108, in get_access_token
2017/07/21 19:20:34 raise Exception("adal library is not available on the VM")
2017/07/21 19:20:34 Exception: adal library is not available on the VM
2017/07/21 19:20:34
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] op: EnableEncryption
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] status: error
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] code: 100
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] msg: Failed to enable the extension with error: adal library is not available on the VM, stack trace: Traceback (most recent call last):
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/handle.py", line 671, in enable_encryption
2017/07/21 19:20:34 DiskEncryptionKeyFileName=extension_parameter.DiskEncryptionKeyFileName)
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 74, in create_kek_secret
2017/07/21 19:20:34 access_token = self.get_access_token(kv_resource_name, authorize_uri, AADClientID, AADClientCertThumbprint, AADClientSecret)
2017/07/21 19:20:34 File "/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/main/KeyVaultUtil.py", line 108, in get_access_token
2017/07/21 19:20:34 raise Exception("adal library is not available on the VM")
2017/07/21 19:20:34 Exception: adal library is not available on the VM
2017/07/21 19:20:34
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 2980: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:20:34 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: [StatusReport (0)] substatus: {"os": "NotEncrypted", "data": "NotMounted"}
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Enabling extension
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Public settings:
2017/07/21 19:22:01 {
2017/07/21 19:22:01 "AADClientCertThumbprint": "75F9A2492972464149C0B6240F9E20570E8BA0D7",
2017/07/21 19:22:01 "AADClientID": "e5e54aeb-910c-4880-9cb5-2b8064efadd5",
2017/07/21 19:22:01 "EncryptionOperation": "EnableEncryption",
2017/07/21 19:22:01 "KeyEncryptionAlgorithm": "RSA-OAEP",
2017/07/21 19:22:01 "KeyVaultURL": "https://matrixvaultdev2.vault.azure.net/",
2017/07/21 19:22:01 "SequenceVersion": "1",
2017/07/21 19:22:01 "VolumeType": "All"
2017/07/21 19:22:01 }
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] handle.py found enable encryption operation
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Installing pre-requisites
2017/07/21 19:22:01 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: apt-get update
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Command apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip failed with return code 100
2017/07/21 19:22:03 stdout:
2017/07/21 19:22:03
2017/07/21 19:22:03 stderr:
2017/07/21 19:22:03 E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
2017/07/21 19:22:03 E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
2017/07/21 19:22:03
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: pip install adal
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Process creation failed: [Errno 2] No such file or directory
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Config did not change or first call, enabling encryption
2017/07/21 19:22:03 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:22:03 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Enabling encryption
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] make sure path exists, executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] value of prop_name:BekFileName not found.
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] found one ide with vmbus: 00000000-0001-8899-0000-000000000000 and the sdx path is: sdb
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] found one ide with vmbus: 00000000-0000-8899-0000-000000000000 and the sdx path is: sda
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] getting blk info for: /dev/sdb
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] getting blk info for: /dev/sda
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:22:03 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 15022: [Warning] EncryptionConfig is present, but could not get the BEK file.
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Enabling extension
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Public settings:
2017/07/21 19:27:43 {
2017/07/21 19:27:43 "AADClientCertThumbprint": "75F9A2492972464149C0B6240F9E20570E8BA0D7",
2017/07/21 19:27:43 "AADClientID": "e5e54aeb-910c-4880-9cb5-2b8064efadd5",
2017/07/21 19:27:43 "EncryptionOperation": "EnableEncryption",
2017/07/21 19:27:43 "KeyEncryptionAlgorithm": "RSA-OAEP",
2017/07/21 19:27:43 "KeyVaultURL": "https://matrixvaultdev2.vault.azure.net/",
2017/07/21 19:27:43 "SequenceVersion": "1",
2017/07/21 19:27:43 "VolumeType": "All"
2017/07/21 19:27:43 }
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] handle.py found enable encryption operation
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Installing pre-requisites
2017/07/21 19:27:43 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: apt-get update
2017/07/21 19:27:45 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: apt-get install -y at cryptsetup-bin lsscsi python-six python-parted procps psmisc gcc libssl-dev libffi-dev python-dev python-pip
2017/07/21 19:28:14 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: pip install adal
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Config did not change or first call, enabling encryption
2017/07/21 19:28:19 [AzureDiskEncryptionForLinux-0.0]: cwd is /var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297
2017/07/21 19:28:19 [AzureDiskEncryptionForLinux-0.0]: Parsing context, find_last_nonquery_operation=False
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Change log file to /var/log/azure/Microsoft.Azure.Security.AzureDiskEncryptionForLinux/0.1.0.999297/extension.log
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Parsing context for sequence number: 0
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: setting file path is/var/lib/waagent/Microsoft.Azure.Security.AzureDiskEncryptionForLinux-0.1.0.999297/config/0.settings
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Config decoded correctly.
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: Encryption operation: EnableEncryption
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Enabling encryption
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] make sure path exists, executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: /bin/mkdir -p /var/lib/azure_disk_encryption_config/
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] value of prop_name:BekFileName not found.
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] found one ide with vmbus: 00000000-0001-8899-0000-000000000000 and the sdx path is: sdb
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] found one ide with vmbus: 00000000-0000-8899-0000-000000000000 and the sdx path is: sda
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] getting blk info for: /dev/sdb
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] getting blk info for: /dev/sda
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Info] Executing: lvs --noheadings --nameprefixes --unquoted -o lv_name,vg_name,lv_kernel_major,lv_kernel_minor
2017/07/21 19:28:19 [Microsoft.Azure.Security.AzureDiskEncryptionForLinux-1.0]: 33422: [Warning] EncryptionConfig is present, but could not get the BEK file.
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.