Re: [virt-manager PATCH v3] Introduction of cloud-init configuration in virt-install

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

 



On 7/2/19 5:10 AM, Daniel P. Berrangé wrote:
> On Fri, Jun 28, 2019 at 07:05:18PM +0300, Athina Plaskasoviti wrote:
>> Usage:
>> --cloud-init
>>
>> Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@xxxxxxxxx>
>> ---
>>  virt-install                        |  5 +++
>>  virtinst/cli.py                     | 25 +++++++++++++
>>  virtinst/install/cloudinit.py       | 57 +++++++++++++++++++++++++++++
>>  virtinst/install/installer.py       | 17 +++++++++
>>  virtinst/install/installerinject.py | 20 +++++-----
>>  5 files changed, 115 insertions(+), 9 deletions(-)
>>  create mode 100644 virtinst/install/cloudinit.py
> 
> 
>> +def create_userdata(scratchdir, cloudinit_data, username=None, password=None):
>> +    if not password:
>> +        password = ""
>> +        for dummy in range(16):
>> +            password += random.choice(string.ascii_letters + string.digits)
>> +    content = "#cloud-config\n"
>> +    if username:
>> +        content += "name: %s\n" % username
>> +    if cloudinit_data.root_password == "generate":
>> +        pass
>> +    else:
>> +        content += "password: %s\n" % password
>> +        log.debug("Generated password for first boot: \n%s", password)
>> +        time.sleep(20)
> 
> Sleeping to let the user see it is nice, but we should allow the user
> to press enter to continue the operation instead of forcing them to
> wait the full 20 seconds.
> 

Yes this piece is not acceptable as is, nor unit testtable. The
reporting and sleeping needs to be handled in 'virt-install' since it's
really a UI issue. Moving it there will take a bit of work which I was
planning on discussing with Athina after some of the simpler issues were
solved.

> Also, never put passwds into log messages - log files are frequently
> uploaded to public bug trackers, so having passwds in there will
> violate users' privacy / security.

Thanks for pointing this out, it is important to fix

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux