You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by "Shaheedur Haque (shahhaqu)" <sh...@cisco.com> on 2014/10/01 12:50:00 UTC

RE: Character limit for cartridge alias

OK, thanks. I'm somewhat astonished that given the significance of this string on the behaviour of the system, the truncation is not more noisy but at least we know what the behaviour is :).

From: Martin Eppel (meppel)
Sent: 30 September 2014 17:57
To: Shaheedur Haque (shahhaqu)
Cc: Jeffrey Nguyen (jeffrngu); dev@stratos.apache.org
Subject: RE: Character limit for cartridge alias

Hi Shaheed,

I found this piece of code (in CartridgeMgtBehaviour.java) which seems to define it, to summarize, the clusterId is a composed of:

subscription alias + "." + cartridgeType + ".domain".

It also truncates the clusterId to 30 characters (as observed)

protected String generateClusterId (String alias, String cartridgeType) {

        String clusterId = alias + "." + cartridgeType + ".domain";
        // limit the cartridge alias to 30 characters in length
        if (clusterId.length() > 30) {
            clusterId = CartridgeSubscriptionUtils.limitLengthOfString(clusterId, 30);
        }

        return clusterId;
    }


Thanks

Martin

From: Shaheedur Haque (shahhaqu)
Sent: Monday, September 29, 2014 11:23 PM
To: dev@stratos.apache.org<ma...@stratos.apache.org>
Cc: Jeffrey Nguyen (jeffrngu)
Subject: Re: Character limit for cartridge alias




Can somebody simply state the relationship between the subscription alias and the cluster id, i.e. how does the latter *exactly* get generated from the former? For example is it:

trunc(alias + "." + alias + some domain thingy, 30)



What is the correct formula?







On Saturday 27 Sep 2014 00:19:09 Jeffrey Nguyen wrote:

Thanks Isuru for confirming.



-Jeffrey



From: Isuru Haththotuwa <is...@apache.org>>
Reply-To: "dev@stratos.apache.org<ma...@stratos.apache.org>" <de...@stratos.apache.org>>
Date: Friday, September 26, 2014 11:51 AM
To: dev <de...@stratos.apache.org>>
Subject: Re: Character limit for cartridge alias



Hi Jeffrey,



On Fri, Sep 26, 2014 at 11:59 PM, Jeffrey Nguyen (jeffrngu) <je...@cisco.com>> wrote:



Thank you Reka for getting back to me on this.   For the cluster ID limitation of 30 characters max, is it configurable?  Where in the code do we define this limit?    I have same question for the node name.

Currently the length for cluster id is not configurable. This is hard coded to 30 characters. This is intentionally done since too long cluster ids can be problematic (when creating DB tables, etc.).



-Jeffrey



From: Reka Thirunavukkarasu <re...@wso2.com>>
Reply-To: "dev@stratos.apache.org<ma...@stratos.apache.org>" <de...@stratos.apache.org>>
Date: Friday, September 26, 2014 10:48 AM
To: dev <de...@stratos.apache.org>>
Subject: Re: Character limit for cartridge alias



Hi Jeffrey,



I'm not sure whether stratos enforces any character limit for the cartridge alias. If it is not explicitly handled, then we can use the character limit as the DB support. The clusterId which is generated by stratos, is taken 30 as the maximum length and the node name in jclouds, is taken 3-15 characters as i could find it from the code segment in stratos.



Thanks,

Reka



On Thu, Sep 25, 2014 at 10:57 PM, Jeffrey Nguyen (jeffrngu) <je...@cisco.com>> wrote:

Hi,



It seems Stratos currently enforces a limit on how long the alias for a cartridge can be.  Can someone confirm if there is a limit and if so what is the max length?   Where is this configured in the Stratos code?   We've seen the case where two cartridges use the same large prefix for alias.  They both got subscribed successfully but the instances failed to launch.



Thanks,

-Jeffrey





--

Reka Thirunavukkarasu
Senior Software Engineer,
WSO2, Inc.:http://wso2.com,

Mobile: +94776442007

--
<tel:%2B94776442007>

Thanks and Regards,

Isuru H.
<tel:%2B94776442007>

+94 716 358 048<tel:%2B94776442007>