osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cloudstack reset VM password files


Hello, FYI.
Our engineer managed to solve the problem for the password reset with bare
cloud-init and Ubuntu 16.04.
Confirm, it works, however it seems it uses hacks Yordan is talking about:
https://pastebin.com/Pattjr5a

пт, 9 нояб. 2018 г. в 17:48, Yordan Kostov <Yordan.Kostov@xxxxxxxxxxxxxxxxx
>:

> Hey Rene and Ivan,
>
>         During tests my setup was utilizing Rene scripts:
> - 99_CloudStack.cfg script successfully makes cloud-init to use Cloudstack
> data.
> - 80_root.cfg script was preventing  cloud_init to start during boot
> (missing parameters error message) so I removed it and used the default
> config.cfg instead.
>
>         Regarding the password change I figured it out - the password
> script is made to be run once per instance. The data about the password
> setup is kept by /var/lib/cloud/instances/<instance
> uuild>/sem/config_set_passwords file.  If you delete this file the next
> boot will fetch the ACD password but it will apply it for the user that has
> been set in cloud-init config file.
>
> Possible workarounds:
> - ugly - make sure the file is deleted after boot with the custom script
> cloud-init option.
> - clean - change the password script execution frequency per boot instead
> of per instance. Unfortunately I could not find the file that defines the
> frequency for the datasource file
> (/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceCloudStack.py).
>
>
> Best regards,
> Jordan
>
>
>
> -----Original Message-----
> From: Ivan Kudryavtsev [mailto:kudryavtsev_ia@xxxxxxxxx]
> Sent: Friday, November 9, 2018 9:48 PM
> To: mail@xxxxxxxxxxxxx
> Cc: users <users@xxxxxxxxxxxxxxxxxxxxx>
> Subject: Re: cloudstack reset VM password files
>
> Rene, thank you for your confirmation that it works. I'll check it again,
> but my configuration looks like yours (haven't checked line by line) and
> password reset doesn't work with cloud-init from ubuntu apt repository. Our
> engineer rebuilds template delivery CI/CD pipeline now and we will have a
> chance to test again.
>
> пт, 9 нояб. 2018 г. в 14:41, Rene Moser <mail@xxxxxxxxxxxxx>:
>
> > Hi again
> >
> > Seems no one seems to read my stuff.
> >
> > cloud-init is able to reset the password (similar the scripts), see
> >
> > https://github.com/cloud-init/cloud-init/blob/master/cloudinit/sources
> > /DataSourceCloudStack.py#L45
> >
> >
> > WE USE IT! IT REALLY WORKS.
> >
> > Note that it uses the default user, e.g. for CentOS it is centos. That
> > is why we configure the default user.
> >
> > Look at the conifgs I wrote in the first mail.
> >
> > Regards
> > René
> >
>
>
> --
> With best regards, Ivan Kudryavtsev
> Bitworks LLC
> Cell RU: +7-923-414-1515
> Cell USA: +1-201-257-1512
> WWW: http://bitworks.software/ <http://bw-sw.com/>
>


-- 
With best regards, Ivan Kudryavtsev
Bitworks LLC
Cell RU: +7-923-414-1515
Cell USA: +1-201-257-1512
WWW: http://bitworks.software/ <http://bw-sw.com/>