[ovirt-users] Change password using ovrt api is not working

Shanil S xielesshanil at gmail.com
Thu Oct 23 00:12:32 EDT 2014


Hi Juan,

The following details i got from the vm after executing the reset password

[root at compute4 ~]# cp
/var/run/vdsm/payload/22f57477-5d43-4795-95ec-e39ce3ba5423.757249a787c151388f6f3fa3502cf299.img
/tmp/my.img
[root at compute4 ~]# mount -o loop,ro /tmp/my.img /mnt
[root at compute4 ~]# find /mnt
/mnt
/mnt/openstack
/mnt/openstack/latest
/mnt/openstack/latest/meta_data.json
/mnt/openstack/latest/user_data
[root at compute4 ~]# cat /mnt/openstack/latest/user_data
#cloud-config
ssh_pwauth: true
disable_root: 0
output:
  all: '>> /var/log/cloud-init-output.log'
password: shanil
chpasswd:
  expire: false
runcmd:
- 'sed -i ''/^datasource_list: /d'' /etc/cloud/cloud.cfg; echo
''datasource_list:
  ["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg'
[root at compute4 ~]#

The xml which i used for the reset password is

<action>
            <vm>
                <os>
                    <boot dev='cdrom'/>
                </os>
                <initialization>
         <cloud_init>
        <users>
         <user>
           <user_name>root</user_name>
           <password><![CDATA[shanil]]></password>
         </user>
           </users>
        </cloud_init>
       </initialization>
            </vm>
        </action>

it seems the password is showing in the configuration ( you can see the
above log ) but i am unable to login with this new password. Could you
please have a look at ?



-- 
Regards
Shanil

On Wed, Oct 22, 2014 at 7:51 PM, Juan Hernandez <jhernand at redhat.com> wrote:

> On 10/22/2014 07:31 AM, Shanil S wrote:
> > Hi,
> >
> > Currently i have updated the ovirt version to 3.5 and after that the
> > reset password using api is not working but there isn't any errors
> > returned. The following xml is i used for the reset password and it was
> > working with the previous version
> >
> > <action>
> >             <vm>
> >                 <os>
> >                     <boot dev='cdrom'/>
> >                 </os>
> >                 <initialization>
> >          <cloud_init>
> >         <users>
> >          <user>
> >            <user_name>root</user_name>
> >            <password>$newpass</password>
> >          </user>
> >            </users>
> >         </cloud_init>
> >        </initialization>
> >             </vm>
> >         </action>
> >
> > Could you please have a look at the above xml ? Is there anything
> > modified in the new version ?
> >
> > The reset password is working fine from the ovirt admin panel and the
> > issue is only when we use the ovirt api to reset the password.
> >
>
> That didn't change, your XML should work. I tested it in my environment
> and it works as expected. The only thing that I can imagine failing is
> the password containing values that break the XML syntax. Try to
> surround the value with a CDATA section:
>
>   <password><![CDATA[yourpassword]]></password>
>
> This is good practice, even if it isn't the cause of your problem.
>
> As usual the first step to debug this is to check if the cloud-init
> floppy has been generated correctly. Start the VM, go the host where it
> is running, locate the qemu process and the location of the floppy img:
>
>   # ps -ef | grep -- '-drive file=/var/run/vdsm/payload/.*\.img'
>
> Make a copy of that file, mount and inspect it:
>
>   # cp /var/run/vdsm/payload/...img /tmp/f.img
>   # mount -o loop,ro /tmp/f.img /mnt
>   # find /mnt
>   # cat /mnt/openstack/latest/user_data
>   # umount /mnt
>
> --
> Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
> 3ºD, 28016 Madrid, Spain
> Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20141023/3e86d87a/attachment-0001.html>


More information about the Users mailing list