You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/05/06 23:15:53 UTC

[jira] [Commented] (LIBCLOUD-547) linode labels - 1 to 48 chars

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

ASF subversion and git services commented on LIBCLOUD-547:
----------------------------------------------------------

Commit 940e10da215ff40d253013bcbf10b7382dc15466 in libcloud's branch refs/heads/trunk from [~earthgecko]
[ https://git-wip-us.apache.org/repos/asf?p=libcloud.git;h=940e10d ]

[LIBCLOUD-547] linode.py labels too long with name use linode id instead

Closes #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)