<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"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></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>
> Hi Juan,<br>
><br>
> The following details i got from the vm after executing the reset password<br>
><br>
> [root@compute4 ~]# cp<br>
> /var/run/vdsm/payload/22f57477-5d43-4795-95ec-e39ce3ba5423.757249a787c151388f6f3fa3502cf299.img<br>
> /tmp/my.img<br>
> [root@compute4 ~]# mount -o loop,ro /tmp/my.img /mnt<br>
> [root@compute4 ~]# find /mnt<br>
> /mnt<br>
> /mnt/openstack<br>
> /mnt/openstack/latest<br>
> /mnt/openstack/latest/meta_data.json<br>
> /mnt/openstack/latest/user_data<br>
> [root@compute4 ~]# cat /mnt/openstack/latest/user_data<br>
> #cloud-config<br>
> ssh_pwauth: true<br>
> disable_root: 0<br>
> output:<br>
> all: '>> /var/log/cloud-init-output.log'<br>
> password: shanil<br>
> chpasswd:<br>
> expire: false<br>
> runcmd:<br>
> - 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo<br>
> ''datasource_list:<br>
> ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'<br>
> [root@compute4 ~]#<br>
><br>
> The xml which i used for the reset password is<br>
><br>
> <action><br>
> <vm><br>
> <os><br>
> <boot dev='cdrom'/><br>
> </os><br>
> <initialization><br>
> <cloud_init><br>
> <users><br>
> <user><br>
> <user_name>root</user_name><br>
> <password><![CDATA[shanil]]></password><br>
> </user><br>
> </users><br>
> </cloud_init><br>
> </initialization><br>
> </vm><br>
> </action><br>
><br>
> it seems the password is showing in the configuration ( you can see the<br>
> above log ) but i am unable to login with this new password. Could you<br>
> please have a look at ?<br>
><br>
><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'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: '>> /var/log/cloud-init-output.log'<br>
</span> user: root <-- 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 "user: root" line what happens is that cloud-init changes<br>
the password of its default user, as configured in<br>
"/etc/cloud/cloud.cfg". The default for Fedora is "fedora" and for<br>
CentOS and RHEL is "cloud-user". To workaround the issue you can edit<br>
the "/etc/cloud/cloud.cfg" file of the VM and change the default user name:<br>
<br>
system_info:<br>
distro: rhel<br>
default_user:<br>
name: root <-- Change this from "fedora" or "cloud-init" to root<br>
<span class="im HOEnZb"><br>
><br>
> On Wed, Oct 22, 2014 at 7:51 PM, Juan Hernandez <<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a><br>
</span><div class="HOEnZb"><div class="h5">> <mailto:<a href="mailto:jhernand@redhat.com">jhernand@redhat.com</a>>> wrote:<br>
><br>
> On 10/22/2014 07:31 AM, Shanil S wrote:<br>
> > Hi,<br>
> ><br>
> > Currently i have updated the ovirt version to 3.5 and after that the<br>
> > reset password using api is not working but there isn't any errors<br>
> > returned. The following xml is i used for the reset password and<br>
> it was<br>
> > working with the previous version<br>
> ><br>
> > <action><br>
> > <vm><br>
> > <os><br>
> > <boot dev='cdrom'/><br>
> > </os><br>
> > <initialization><br>
> > <cloud_init><br>
> > <users><br>
> > <user><br>
> > <user_name>root</user_name><br>
> > <password>$newpass</password><br>
> > </user><br>
> > </users><br>
> > </cloud_init><br>
> > </initialization><br>
> > </vm><br>
> > </action><br>
> ><br>
> > Could you please have a look at the above xml ? Is there anything<br>
> > modified in the new version ?<br>
> ><br>
> > The reset password is working fine from the ovirt admin panel and the<br>
> > issue is only when we use the ovirt api to reset the password.<br>
> ><br>
><br>
> That didn't change, your XML should work. I tested it in my environment<br>
> and it works as expected. The only thing that I can imagine failing is<br>
> the password containing values that break the XML syntax. Try to<br>
> surround the value with a CDATA section:<br>
><br>
> <password><![CDATA[yourpassword]]></password><br>
><br>
> This is good practice, even if it isn't the cause of your problem.<br>
><br>
> As usual the first step to debug this is to check if the cloud-init<br>
> floppy has been generated correctly. Start the VM, go the host where it<br>
> is running, locate the qemu process and the location of the floppy img:<br>
><br>
> # ps -ef | grep -- '-drive file=/var/run/vdsm/payload/.*\.img'<br>
><br>
> Make a copy of that file, mount and inspect it:<br>
><br>
> # cp /var/run/vdsm/payload/...img /tmp/f.img<br>
> # mount -o loop,ro /tmp/f.img /mnt<br>
> # find /mnt<br>
> # cat /mnt/openstack/latest/user_data<br>
> # umount /mnt<br>
><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>