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

ASF GitHub Bot commented on LIBCLOUD-547:
-----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/libcloud/pull/287


> linode labels - 1 to 48 chars
> -----------------------------
>
>                 Key: LIBCLOUD-547
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-547
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.14.0-beta3
>            Reporter: Gary Wilson
>              Labels: linode
>
> The labels generated in libcloud/compute/drivers/linode.py are limited in 
> length, however seeing as the name is using the node name which is a hostname 
> and can be up to 63 characters as per RFC 1034, the generated labels can 
> result in a string longer than the allowed 48 characters.
> In this instance the name was zpf-watcher-dev-2-96g-luk1
> [zpf-watcher-dev-2-96g-luk1] Configuration Profile = 51 chars
> Perhaps the linode["id"] could be used instead of name as the name could be 
> longer than 48 chars
> libcloud/compute/drivers/linode.py
> {code}
>         # Labels
>         label = {
>             "lconfig": "[%s] Configuration Profile" % name,
>             "lroot": "[%s] %s Disk Image" % (name, image.name),
>             "lswap": "[%s] Swap Space" % name
>         }
>         for what in ["lconfig", "lroot", "lswap"]:
>             if what in kwargs:
>                 label[what] = kwargs[what]
> {/code}
> {code}
>   File "/usr/lib/python2.6/site-packages/libcloud/compute/drivers/linode.py", 
> line 361, in create_node
>     data = self.connection.request(API_ROOT, params=params).objects[0]
>   File "/usr/lib/python2.6/site-packages/libcloud/common/base.py", line 675, 
> in request
>     response = responseCls(**kwargs)
>   File "/usr/lib/python2.6/site-packages/libcloud/common/linode.py", line 
> 105, in __init__
>     raise self.errors[0]
> libcloud.common.linode.LinodeException: (8) Invalid Label length - must be 
> between 1 and 48 characters
> {/code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to