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

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Oct 28 09:46:35 UTC 2014


Juan Hernandez 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>
---
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:
  Shahar Havivi: Looks good to me, approved
  Juan Hernandez: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id18d614612c7143a81c3d14894c9fce88de41601
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list