<div dir="ltr">Hi Juan,<br><br>Thanks for your reply. I hope it will be fixed in the next release and i will go for the custom script solution as of now.<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span>-- <br></span>Regards
<br>Shanil
</div></div>
<br><div class="gmail_quote">On Thu, Oct 23, 2014 at 11:05 PM, Juan Hernandez <span dir="ltr">&lt;<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 10/23/2014 06:12 AM, Shanil S wrote:<br>
&gt; Hi Juan,<br>
&gt;<br>
&gt; The following details i got from the vm after executing the reset password<br>
&gt;<br>
&gt; [root@compute4 ~]# cp<br>
&gt; /var/run/vdsm/payload/22f57477-5d43-4795-95ec-e39ce3ba5423.757249a787c151388f6f3fa3502cf299.img<br>
&gt; /tmp/my.img<br>
&gt; [root@compute4 ~]# mount -o loop,ro /tmp/my.img /mnt<br>
&gt; [root@compute4 ~]# find /mnt<br>
&gt; /mnt<br>
&gt; /mnt/openstack<br>
&gt; /mnt/openstack/latest<br>
&gt; /mnt/openstack/latest/meta_data.json<br>
&gt; /mnt/openstack/latest/user_data<br>
&gt; [root@compute4 ~]# cat /mnt/openstack/latest/user_data<br>
&gt; #cloud-config<br>
&gt; ssh_pwauth: true<br>
&gt; disable_root: 0<br>
&gt; output:<br>
&gt;   all: &#39;&gt;&gt; /var/log/cloud-init-output.log&#39;<br>
&gt; password: shanil<br>
&gt; chpasswd:<br>
&gt;   expire: false<br>
&gt; runcmd:<br>
&gt; - &#39;sed -i &#39;&#39;/^datasource_list: /d&#39;&#39; /etc/cloud/cloud.cfg; echo<br>
&gt; &#39;&#39;datasource_list:<br>
&gt;   [&quot;NoCloud&quot;, &quot;ConfigDrive&quot;]&#39;&#39; &gt;&gt; /etc/cloud/cloud.cfg&#39;<br>
&gt; [root@compute4 ~]#<br>
&gt;<br>
&gt; The xml which i used for the reset password is<br>
&gt;<br>
&gt; &lt;action&gt;<br>
&gt;             &lt;vm&gt;<br>
&gt;                 &lt;os&gt;<br>
&gt;                     &lt;boot dev=&#39;cdrom&#39;/&gt;<br>
&gt;                 &lt;/os&gt;<br>
&gt;                 &lt;initialization&gt;<br>
&gt;          &lt;cloud_init&gt;<br>
&gt;         &lt;users&gt;<br>
&gt;          &lt;user&gt;<br>
&gt;            &lt;user_name&gt;root&lt;/user_name&gt;<br>
&gt;            &lt;password&gt;&lt;![CDATA[shanil]]&gt;&lt;/password&gt;<br>
&gt;          &lt;/user&gt;<br>
&gt;            &lt;/users&gt;<br>
&gt;         &lt;/cloud_init&gt;<br>
&gt;        &lt;/initialization&gt;<br>
&gt;             &lt;/vm&gt;<br>
&gt;         &lt;/action&gt;<br>
&gt;<br>
&gt; it seems the password is showing in the configuration ( you can see the<br>
&gt; above log ) but i am unable to login with this new password. Could you<br>
&gt; please have a look at ?<br>
&gt;<br>
&gt;<br>
<br>
</div></div>Ok, there is a difference in what we generated in 3.4 and what we are<br>
generating in 3.5. Basically where aren&#39;t generating now the line that<br>
contains the user name. It should have been as follows:<br>
<span class=""><br>
  #cloud-config<br>
  ssh_pwauth: true<br>
  disable_root: 0<br>
  output:<br>
    all: &#39;&gt;&gt; /var/log/cloud-init-output.log&#39;<br>
</span>  user: root  &lt;-- This is the line that is missing<br>
  password: shanil<br>
  ...<br>
<br>
I think that this is a bug, and that we should restore the previous<br>
behavior, as described in this new bug:<br>
<br>
  <a href="https://bugzilla.redhat.com/1156155" target="_blank">https://bugzilla.redhat.com/1156155</a><br>
<br>
Without that &quot;user: root&quot; line what happens is that cloud-init changes<br>
the password of its default user, as configured in<br>
&quot;/etc/cloud/cloud.cfg&quot;. The default for Fedora is &quot;fedora&quot; and for<br>
CentOS and RHEL is &quot;cloud-user&quot;. To workaround the issue you can edit<br>
the &quot;/etc/cloud/cloud.cfg&quot; file of the VM and change the default user name:<br>
<br>
  system_info:<br>
  distro: rhel<br>
  default_user:<br>
    name: root  &lt;-- Change this from &quot;fedora&quot; or &quot;cloud-init&quot; to root<br>
<span class="im HOEnZb"><br>
&gt;<br>
&gt; On Wed, Oct 22, 2014 at 7:51 PM, Juan Hernandez &lt;<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a><br>
</span><div class="HOEnZb"><div class="h5">&gt; &lt;mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     On 10/22/2014 07:31 AM, Shanil S wrote:<br>
&gt;     &gt; Hi,<br>
&gt;     &gt;<br>
&gt;     &gt; Currently i have updated the ovirt version to 3.5 and after that the<br>
&gt;     &gt; reset password using api is not working but there isn&#39;t any errors<br>
&gt;     &gt; returned. The following xml is i used for the reset password and<br>
&gt;     it was<br>
&gt;     &gt; working with the previous version<br>
&gt;     &gt;<br>
&gt;     &gt; &lt;action&gt;<br>
&gt;     &gt;             &lt;vm&gt;<br>
&gt;     &gt;                 &lt;os&gt;<br>
&gt;     &gt;                     &lt;boot dev=&#39;cdrom&#39;/&gt;<br>
&gt;     &gt;                 &lt;/os&gt;<br>
&gt;     &gt;                 &lt;initialization&gt;<br>
&gt;     &gt;          &lt;cloud_init&gt;<br>
&gt;     &gt;         &lt;users&gt;<br>
&gt;     &gt;          &lt;user&gt;<br>
&gt;     &gt;            &lt;user_name&gt;root&lt;/user_name&gt;<br>
&gt;     &gt;            &lt;password&gt;$newpass&lt;/password&gt;<br>
&gt;     &gt;          &lt;/user&gt;<br>
&gt;     &gt;            &lt;/users&gt;<br>
&gt;     &gt;         &lt;/cloud_init&gt;<br>
&gt;     &gt;        &lt;/initialization&gt;<br>
&gt;     &gt;             &lt;/vm&gt;<br>
&gt;     &gt;         &lt;/action&gt;<br>
&gt;     &gt;<br>
&gt;     &gt; Could you please have a look at the above xml ? Is there anything<br>
&gt;     &gt; modified in the new version ?<br>
&gt;     &gt;<br>
&gt;     &gt; The reset password is working fine from the ovirt admin panel and the<br>
&gt;     &gt; issue is only when we use the ovirt api to reset the password.<br>
&gt;     &gt;<br>
&gt;<br>
&gt;     That didn&#39;t change, your XML should work. I tested it in my environment<br>
&gt;     and it works as expected. The only thing that I can imagine failing is<br>
&gt;     the password containing values that break the XML syntax. Try to<br>
&gt;     surround the value with a CDATA section:<br>
&gt;<br>
&gt;       &lt;password&gt;&lt;![CDATA[yourpassword]]&gt;&lt;/password&gt;<br>
&gt;<br>
&gt;     This is good practice, even if it isn&#39;t the cause of your problem.<br>
&gt;<br>
&gt;     As usual the first step to debug this is to check if the cloud-init<br>
&gt;     floppy has been generated correctly. Start the VM, go the host where it<br>
&gt;     is running, locate the qemu process and the location of the floppy img:<br>
&gt;<br>
&gt;       # ps -ef | grep -- &#39;-drive file=/var/run/vdsm/payload/.*\.img&#39;<br>
&gt;<br>
&gt;     Make a copy of that file, mount and inspect it:<br>
&gt;<br>
&gt;       # cp /var/run/vdsm/payload/...img /tmp/f.img<br>
&gt;       # mount -o loop,ro /tmp/f.img /mnt<br>
&gt;       # find /mnt<br>
&gt;       # cat /mnt/openstack/latest/user_data<br>
&gt;       # umount /mnt<br>
&gt;<br>
<br>
--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</div></div></blockquote></div><br></div>