XenAPI: can't inject admin passwd

Bug #1699700 reported by Jianghua Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

The admin passwd is not injected into metadata for Windows VMs, meaning cloud-init cannot set the password.

stack@DevStackOSDomU:~$ nova boot --image cirros-0.3.5-x86_64-disk --nic net-id=60f82bcc-dfed-4825-8832-4a9331e2df2c --flavor 1 --admin-pass admin testVM

# the pass is not set and the specified admin passwd is not included in metadata.
$ hostname
testvm
$ wget http://169.254.169.254/openstack/latest/meta_data.json
Connecting to 169.254.169.254 (169.254.169.254:80)
meta_data.json 100% |***************************************************************************************************| 914 0:00:00 ETA
$ grep admin meta_data.json

Tags: xenserver
Bob Ball (bob-ball)
summary: - XenAPI: can't reject admin passwd
+ XenAPI: can't inject admin passwd
description: updated
tags: added: xenserver
Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

the admin_pass exists in the config drive but doesn't exist in the metadata service:

$ cat /mnt/openstack/latest/meta_data.json
{"admin_pass": "admin", "random_seed": "USMoTY6EUzQSyeuZcghRLnCyRr4YOMAgqYwqe7WNaMa5tjCZxC1pWq4yxZWWib41wMf2Zqmu1Wd+7Ye9u21GIezZL/fVDaSyUvf1bzQcyrT4Ve9EDdLBWhM3Zwou43wnUOcTYjHwHkyqTnJF2EOKuXrdmUral6WNOUV6XXO193OiPdepjD6IKkg0MHW2sPnjU5c8OpNNmiRijJYl8831+yPHbScq93v99ULGuZv3V0Cj63qhqtZSzgnIiTf2mODpiTOOCPOrjIf23iLyD8Peex+dQ5n4a+DGYVVMuEJ+RxBl7KWx0VFGOPuX2og7BcAfLOf7K7p6Q38utml6V88AvOg4v428+WU5niNq9ewuAG+WBaSjl6urx+hxIpxRSBqbiuZ74AgFhVmvgUg5/7+dclNAYGxVDKH71InxRx8M87lwqIDbrtA6xLK6CgEPfnzt8FQ25JeHzy1T5mI7rG6UXvdTjfb81+AZpip6+a+C/iFQyVzuQ1CEKYXxEdF9s0JwXivpMl30kFt88SaBWh6CkNbwYxp3w07wktVbF5xkyxVU7uxc3jJBfqgYjBdalJsDbYvEKbx0z0I5VAj3GWlnVM3tV+crXbapFXSNSEsBxVdilXq6xCKtJ6w4OKlTnqNEada+MTc8UJhx+uS8bIx25FOaDuu48aJZFm2IJvIfzdQ=", "uuid": "8e30fcb1-43e3-4e21-8054-3355da368ab0", "availability_zone": "nova", "hostname": "testvm2.novalocal", "launch_index": 0, "devices": [], "project_id": "e696ceb842484906aea30583c810bc26", "name": "testVM2"}$

$ wget http://169.254.169.254/openstack/latest/meta_data.json
$ cat meta_data.json
{"random_seed": "KMD8KRomqtYR4BspIDAPNcA/pfUjj93J/YXFZf9XpKlBj8mi50uS5ySfw9V/LvMieDKoYjnmtlsZzWlosgl5TlKeGgPJNrSYJeBdSgLReATyxYk397XGe92U3U1SUG3Q1lHCXXTQCAfQpuF8ZH+dhUY6Dl5z/rW0bG2z2T3et+B+P8cGwS8qBb1b2iVfi/osPMbTlegoExpqQ/erAzv3u2T5erRpZqIDE2adTPfUHscMPrS7Ke9z7uF4W6KZCqmszZ/yt+JqbhyOLPfnNGFDz2coYkULthHG+rDikKR90FB/wJ/GiWi+8/q4q4+a4VX/At1iHrWXQ6O/1psjZmn8TSlF474dy/uP+g5EHw7AYD6NPOFyuYu0zqv+CzuLkiJVt8Nxjsa43jlqfRJ/3knrZkmICuFEpJqj6nqE2rM8mKpj6Ru7ILRdYfz8TFFt8snlpGsxzQ1iJum7F6JwZe515Yv8gfOhvOpNpZ6kB1CvIZ7D3pAkaPt5yVHqC84LvQkbG0D2T7axdeta0+SHCoBG2zjh1RnovwJpAc1bgVxhlsSIDeAS+uE/saRETL8E4gDU+oYueZHzq2+PNJ5Pav0OjPwYccWYHU9AKGGDijoysoe1Y7eXY+ielsJTMXaIJ0vNK/SS1Yfdmp9m3AqY/2OeDf1OjgWHREI6dCLZninc21s=", "uuid": "8e30fcb1-43e3-4e21-8054-3355da368ab0", "availability_zone": "nova", "hostname": "testvm2.novalocal", "launch_index": 0, "devices": [], "project_id": "e696ceb842484906aea30583c810bc26", "name": "testVM2"}$

Changed in nova:
assignee: nobody → Jianghua Wang (wjh-fresh)
Sean Dague (sdague)
Changed in nova:
assignee: Jianghua Wang (wjh-fresh) → nobody
Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

It seems the password specified by "--admin_pass" is treated as extra metadata and only saved in config drive. But if we explicitly put the admin_pass in the metadata via "--meta admin_pass=xxxx" or add metadata from the horizon page, this passwd will be saved both in config drive or meta service:
nova boot --availability-zone nova:node-12.domain.tld testVM-2012-3 --flavor 3 --nic net-id=3caca64b-22c4-42d4-9f04-1b693c98ce3b --meta admin_pass=testVM1pass --image win-server-2012

{"random_seed": "BkHRzkrFdmxcAzIIxAoBewynjlbu7WQl5J2kr6kFInx1q6hp3eV2G4WmrabFrLXqb8ZqUHdPWvJg61B8v+SfmCTwLx+Oqh1qWLih8+s3Y5RgqmV7t73BV2nmld/AwRBd9qD4u6T+i/uTDVu88CwbdTzIO2ziQCgHt0KKx50VFTyvn+jt1n9fqs9DL++5Ql+zUgsgyXs3V2FZmLnnsMiK1I0bT9KuPNOpmYlGHC/VKrb1hUJgUPn0K+Cu1H9MIpzzGZXAnp2xQv5WiUIsjC6gUx7AAhMSXcNkGt3MyGc8+IEaYMm/6A+nI4F3UIEiSLNnWO+9eMrJbtS4nX5EJ/4eRE26X/EL3K2zXgsyqdkeD8Suveo5pbV9GDIMkoJDnY1xZ4K+HRg50QZRPL3/aLMfVZM2b2/Tnq97uQpUcNzKMgUHizO5dajUAMHAhIh6sSGj7BbL/fbH5ka6fdUbQ5Y/JMyGB2adPevLDaSkcRNiZ6fnTlH3PBqiktVO2JS6ZFJtcw3oGhz823JwFVTp+f2Cgkgy7q8zjCXTY7JQt/Qufb+J3PR/WxhYLC2pC0VSTWbpH6FoeqSoDVYf61MkklYdVXTvONwwBcn7qV2CnVOmvh/aIvFL0ML+aooLT9CKrThEYI8Rjo8GoK6EfPAe6SAmvhBpWj32oQ1LjPFKrYJBNkU=", "uuid": "d93e8553-9b18-4e58-82bb-29a362bf73b8", "availability_zone": "nova", "hostname": "testvm-2012-3.novalocal", "launch_index": 0, "meta": {"admin_pass": "testVM1pass"}, "project_id": "dc533d1486f04421af54094f9020d0e2", "name": "testVM-2012-3"}

Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

Basing on the above test result, probably we should close this bug as just work as design.

Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.