~ubuntu-branches/ubuntu/saucy/heat/saucy-updates

« back to all changes in this revision

Viewing changes to heat/engine/resources/instance.py

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-26 09:02:56 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20140226090256-vmo40qyvmqhxd5gl
Tags: 2013.2.2-0ubuntu1
* Resynchronize with stable/havana (9279833) (LP: #1284643):
  - [2beab02] Server create should never fail, even if resource name exceeds
    63 characters  LP: 1250291
  - [4ca7941] the aws loadbalancer use Fedora 17 and needs to be upgraded to
    f18 or f19 LP: 1234375
  - [e483b38] Fn::Select raises transient errors on mutable structures
    LP: 1243958
  - [6fa3c8f] DependsOn only supports specifying a single value LP: 1235496
  - [ec4ed57] Failure after the update of a suspended stack LP: 1234242
  - [50dc14a] Please use "python -m coverage" instead of /usr/bin/coverage
    LP: 1241330
  - [4d213f8] Stacks can get stuck DELETE_COMPLETE LP: 1247200
  - [ab5d961] Stacks can get stuck DELETE_COMPLETE LP: 1247200
  - [9279833] Stacks can get stuck DELETE_COMPLETE LP: 1247200
* d/control: Add new BD on python-testscenarios.

Show diffs side-by-side

added added

removed removed

Lines of Context:
180
180
    update_allowed_keys = ('Metadata', 'Properties')
181
181
    update_allowed_properties = ('InstanceType',)
182
182
 
 
183
    # Server host name limit to 53 characters by due to typical default
 
184
    # linux HOST_NAME_MAX of 64, minus the .novalocal appended to the name
 
185
    physical_resource_name_limit = 53
 
186
 
183
187
    def __init__(self, name, json_snippet, stack):
184
188
        super(Instance, self).__init__(name, json_snippet, stack)
185
189
        self.ipaddress = None
336
340
                                subnet_id=self.properties['SubnetId'])
337
341
        server = None
338
342
 
339
 
        # TODO(sdake/shardy) ensure physical_resource_name() never returns a
340
 
        # string longer than 63 characters, as this is pretty inconvenient
341
 
        # behavior for autoscaling groups and nested stacks where instance
342
 
        # names can easily become quite long even with terse names.
343
 
        physical_resource_name_len = len(self.physical_resource_name())
344
 
        if physical_resource_name_len > 63:
345
 
            raise exception.Error(_('Server %(server)s length %(length)d > 63'
346
 
                                  ' characters, please reduce the length of'
347
 
                                  ' stack or resource names') %
348
 
                                  dict(server=self.physical_resource_name(),
349
 
                                       length=physical_resource_name_len))
350
 
 
351
343
        try:
352
344
            server = self.nova().servers.create(
353
345
                name=self.physical_resource_name(),