Bug 1463597
Summary: | [downstream clone - 4.1.3] Issues with automating the configuration of VMs (cloud-init) | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | rhev-integ |
Component: | ovirt-engine | Assignee: | jniederm |
Status: | CLOSED ERRATA | QA Contact: | Israel Pinto <ipinto> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 4.0.6 | CC: | lsurette, melewis, mgoldboi, michal.skrivanek, mtessun, obockows, rbalakri, Rhev-m-bugs, srevivo, tjelinek, ykaul |
Target Milestone: | ovirt-4.1.3 | Keywords: | ZStream |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
With this update, an issue where the 'Use already configured password' option was unavailable when creating a new virtual machine from a template that had the cloudinit root password stored has been fixed. This issue meant that the creation of the new virtual machine succeeded but the password was not copied.
|
Story Points: | --- |
Clone Of: | 1448831 | Environment: | |
Last Closed: | 2017-07-06 07:30:42 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1448831 | ||
Bug Blocks: |
Description
rhev-integ
2017-06-21 09:47:01 UTC
Do you have cloud-init logs when it failed? The payload? (Originally by Yaniv Kaul) Just to report on the progress of this issue: - I have succeeded to simulate this issue on 4.1 while creating a VM from template on a template tab (happened only once and only in this flow, in no others) - it is not related to cloud init directly, it is an engine issue because while creating a VM from template, vm init configuration was not properly copied from the template to the VM (in the database) - the payload was correctly created and attached to the VM according to the configuration which was in the DB. Given the configuration for some reason did not contain the password, it was not in the payload. I don't yet know why and if it is a frontend or backend issue - keep investigating. (Originally by Tomas Jelinek) The issue is that when adding a VM from template with cloud-init configured, the cloud-init password needs to be updated by calling: vmHandler.updateVmInitFromDB(template, false); - nota bene the second param which tells that the password has to be loaded too. For pools I have not found a case where it is not loaded properly but for VMs made from template it happens. But, if the VM is based on the latest template, and the template is updated, the VM will get also the password from the latest template. So, we need to make sure the vmHandler.updateVmInitFromDB(template, false); is properly called always when creating a VM from template with password stored. (Originally by Tomas Jelinek) Steps to reproduce: 1. Create a linux template with 'Initial Run' > 'Password' set 2. Create a VM based on the template 3. Run the VM 4. Run on host: strings </var/run/vdsm/payload/path-to-cloudinit-disk> | grep password: Check value of printed password. I didn't met any problems with pools. As mentioned in comment 8 VM pools might not work with cloudinit root password if they were based on broken template. (Originally by Jakub Niedermertl) Verify with Red Hat Virtualization Manager Version: 4.1.3.5-0.1.el7 Steps: 1. Create a linux template with 'Initial Run' > 'Password' set 2. Create a VM based on the template 3. Run the VM 4. Run on host: strings </var/run/vdsm/payload/path-to-cloudinit-disk> | grep 'password:' output: 1. [root@puma42 latest]# grep -ir password user_data:password: '1' 2. [root@puma42 latest]# strings * "availability_zone" : "nova", "hostname" : "new_image_cloud_init", "launch_index" : "0", "meta" : { "role" : "server", "dsmode" : "local", "essential" : "false" }, "name" : "new_image_cloud_init", "uuid" : "7781756f-47a1-4101-9ae6-bc510a8112d2" #cloud-config output: all: '>> /var/log/cloud-init-output.log' password: '1' disable_root: 0 runcmd: - 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo ''datasource_list: ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg' ssh_pwauth: true chpasswd: expire: false Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1692 |