Change in ovirt-engine[ovirt-engine-3.5]: restapi: Set cloud-init user name

tnisan at redhat.com tnisan at redhat.com
Tue Oct 28 10:00:23 UTC 2014


Tal Nisan has submitted this change and it was merged.

Change subject: restapi: Set cloud-init user name
......................................................................


restapi: Set cloud-init user name

Before version 3.5 we used to add a "user: root" line to the generated
cloud-init file if the caller provided a password for the "root" user.  For
example, if the caller sent something like this:

  <action>
    <vm>
      <initialization>
        <cloud_init>
          <users>
            <user>
              <user_name>root</user_name>
              <password>mypass</password>
            </user>
          </users>
        </cloud_init>
      </initialization>
    </vm>
  </action>

We used to generate this cloud-init file:

  #cloud-config
  ssh_pwauth: true
  disable_root: 0
  output:
    all: '>> /var/log/cloud-init-output.log'
  user: root
  password: mypass
  ...

But starting with 3.5 we no longer generate the "user:root" line. This means
that cloud-init will assume that it has to change the password for its default
user, as defined in "/etc/cloud/cloud.cfg". For Fedora it is "fedora" and for
CentOS and RHEL it is "cloud-user".

The net result is that where we used to change the "root" password we now
change the "fedora" or "cloud-init" password.

To avoid this issue this patch restores the old behaviour.

Change-Id: Id18d614612c7143a81c3d14894c9fce88de41601
Bug-Url: https://bugzilla.redhat.com/1156155
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
(cherry picked from commit 76da3d76cf65b4f3a98f90fa1e65661409b93f3d)
---
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
1 file changed, 8 insertions(+), 1 deletion(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/34539
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id18d614612c7143a81c3d14894c9fce88de41601
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list