Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

autocale.connect_to_region.get_all_groups() returns max_size=None attribute #922

Closed
auth0r opened this Issue · 3 comments

4 participants

@auth0r

when i try get any of my autoscaling groups attribute max_size it always = None .

import boto.ec2.autoscale as asg

for item in asg.connect_to_region('eu-west-1').get_all_groups():
print("min_size:%s; max_size:%s, capacity:%s" %( item.min_size, item.max_size, item.desired_capacity))

in all case i get max_size = None, but if i use as-describe-scaling-activities cmd tool i get real non None value
This issue began reproduced for couple days.

@rodawg

I see the same issue when I try using both 2.4.1 and 2.5.2.

The command line tool works for me, and when I print out debug logging I see the MaxSize tag is returned with a number:

  <member>
    <Tags>
      <member>
        <ResourceId>201208161118</ResourceId>
        <PropagateAtLaunch>true</PropagateAtLaunch>
        <Value>demo</Value>
        <Key>env</Key>
        <ResourceType>auto-scaling-group</ResourceType>
      </member>
      <member>
        <ResourceId>201208161118</ResourceId>
        <PropagateAtLaunch>true</PropagateAtLaunch>
        <Value>server</Value>
        <Key>nodeType</Key>
        <ResourceType>auto-scaling-group</ResourceType>
      </member>
      <member>
        <ResourceId>201208161118</ResourceId>
        <PropagateAtLaunch>true</PropagateAtLaunch>
        <Value>201208161118</Value>
        <Key>server</Key>
        <ResourceType>auto-scaling-group</ResourceType>
      </member>
    </Tags>
    <SuspendedProcesses/>
    <AutoScalingGroupName>201208161118</AutoScalingGroupName>
    <HealthCheckType>EC2</HealthCheckType>
    <CreatedTime>2012-08-16T15:18:38.049Z</CreatedTime>
    <EnabledMetrics/>
    <LaunchConfigurationName>201208161118</LaunchConfigurationName>
    <Instances>
      <member>
        <HealthStatus>Healthy</HealthStatus>
        <AvailabilityZone>us-east-1d</AvailabilityZone>
        <InstanceId>i-xxxxxxxx</InstanceId>
        <LaunchConfigurationName>201208161118</LaunchConfigurationName>
        <LifecycleState>InService</LifecycleState>
      </member>
      <member>
        <HealthStatus>Healthy</HealthStatus>
        <AvailabilityZone>us-east-1a</AvailabilityZone>
        <InstanceId>i-xxxxxxxx</InstanceId>
        <LaunchConfigurationName>201208161118</LaunchConfigurationName>
        <LifecycleState>InService</LifecycleState>
      </member>
    </Instances>
    <DesiredCapacity>2</DesiredCapacity>
    <AvailabilityZones>
      <member>us-east-1c</member>
      <member>us-east-1a</member>
      <member>us-east-1d</member>
    </AvailabilityZones>
    <LoadBalancerNames/>
    <MinSize>2</MinSize>
    <VPCZoneIdentifier/>
    <HealthCheckGracePeriod>0</HealthCheckGracePeriod>
    <DefaultCooldown>300</DefaultCooldown>
    <AutoScalingGroupARN>arn:aws:autoscaling:us-east-1:XXXXXXXXXXXX:autoScalingGroup:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:autoScalingGroupName/201208161118</AutoScalingGroupARN>
    <TerminationPolicies>
      <member>Default</member>
    </TerminationPolicies>
    <MaxSize>2</MaxSize>
  </member>

Anyone have any ideas as to what may be going on? Could AWS be returning a slightly different response that isn't being interpreted correctly by the library?

@garnaat garnaat closed this in a36e69a
@jimfulton

Note that this also effects a group's update method, as update will error if max_size isn't set. So getting a group via get_all_groups and then immediately calling update will fail.

@garnaat
Owner

Right. It has been fixed in github/develop and will be included in the soon-to-be-released 2.6.0 version of boto. Thanks!

@msabramo msabramo referenced this issue from a commit in msabramo/boto
@garnaat garnaat Add handler for TerminationPolicies element in DescribeAutoScalingGro…
…ups response. Fixes #922.
fcd608f
@msabramo msabramo referenced this issue from a commit in msabramo/boto
@garnaat garnaat Removing debug print statements. Related to #922. 8d9d9d1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.