[
https://issues.apache.org/jira/browse/LIBCLOUD-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14198285#comment-14198285
]
Gary Wilson commented on LIBCLOUD-547:
--------------------------------------
Hi Thomas
I am not certain whether to reopen this issue or open a new issue. However
there is another dimension to this issue as well somewhat related.
The linode label must end in an alphanumeric char as well. We hit another edge
case where our label was being truncated on a '-' and the linode api throws:
libcloud.common.linode.LinodeException: (8) A Linode label may only contain
ASCII letters or numbers, dashes, and underscores, must begin and end with
letters or numbers, and be at least three characters in length.
We are still using 0.14.1 but I would imagine the same is true in 0.15.x as
this is a linode issue - linode not relating the linode label or name to
hostname (which in most user terms that is what it is) - we have poked linode
to try and get them to address this issue and make labels RFC 1034/1035/2181
compliant - but that got nowhere. I see that saltstack users have also run
into similar issues. I have commented on the saltstack github issue as well.
Perhaps if libcloud and saltstack spoke to linode, maybe linode would move on
this issue.
> 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
> Assignee: Tomaz Muraus
> 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.3.4#6332)