[ 
https://issues.apache.org/jira/browse/LIBCLOUD-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181188#comment-13181188
 ] 

Miguel Jacq commented on LIBCLOUD-139:
--------------------------------------

Sorry - your initial fix is still wrong for me:

Traceback (most recent call last):
  File "/usr/local/bin/madelon", line 215, in <module>
    main()
  File "/usr/local/bin/madelon", line 143, in main
    node = conn.create_node(name=host, image=preferred_image[0], 
size=preferred_size[0], auth=pubkey, location=preferred_location[0])
  File 
"/usr/local/lib/python2.6/dist-packages/libcloud/compute/drivers/linode.py", 
line 315, in create_node
    data = self.connection.request(API_ROOT, params=params).objects[0]
  File "/usr/local/lib/python2.6/dist-packages/libcloud/common/base.py", line 
513, in request
    connection=self)
  File "/usr/local/lib/python2.6/dist-packages/libcloud/common/linode.py", line 
95, in __init__
    raise self.errors[0]
libcloud.common.linode.LinodeException: (2) Password is too simple. It must 
contain at least two of these four character classes: lower case letters - 
upper case letters - numbers - punctuation


This seems to be because you put:

root = u(binascii.hexlify(os.urandom(8).encode('hex')))

whereas my patch has:

root = u(binascii.hexlify(os.urandom(8)))


This is the only way it works for me.
                
> Typo in Linode driver (hexlify)
> -------------------------------
>
>                 Key: LIBCLOUD-139
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-139
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.7.1
>            Reporter: Miguel Jacq
>            Priority: Critical
>              Labels: Linode
>             Fix For: 0.8.0
>
>
> Traceback (most recent call last):
>  File "/usr/local/bin/madelon", line 215, in <module>
>    main()
>  File "/usr/local/bin/madelon", line 143, in main
>    node = conn.create_node(name=host, image=preferred_image[0], 
> size=preferred_size[0], auth=pubkey, location=preferred_location[0])
>  File 
> "/usr/local/lib/python2.6/dist-packages/libcloud/compute/drivers/linode.py", 
> line 303, in create_node
>    root = u(binascii.hexlifyos.urandom(8).encode('hex'))
> AttributeError: 'module' object has no attribute 'hexlifyos'
> Build step 'Execute shell' marked build as failure
> I think this:
> root = u(binascii.hexlifyos.urandom(8).encode('hex'))
> should be something like this:
> root = u(binascii.hexlify(os.urandom(8)))
> You'll also need to 'import os' too.
> Patch: 
> https://raw.github.com/gist/1564685/2993088d4e50b003ebcf6b4bd631a2ca6839f3e6/gistfile1.txt

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to