> -----Original Message----- > From: Francois Gaudreault [mailto:fgaudrea...@cloudops.com] > Sent: 03 July 2013 19:46 > To: dev@cloudstack.apache.org > Subject: Re: Auto-scaling won't scale down > > I did some more tests around this, and the NetScaler does trigger the scale > down, but it looks like CS never reacts. > > Netscaler did: > Autoscale: Evaluating autoscale policy > Cloud-AutoScale-Policy-xxxxx-80-12Autoscale: Triggering autoscale > action: SCALE_DOWN for policy: > Cloud-AutoScale-ScaleDownAction-xxxxx-80Autoscale: :::925###POST > /provision HTTP/1.1 > Host: NS > Content-Length: 866 > > { "autoscale" : { "ns" : { "sysid" : "98310000cb254307ee78" }, "vserver" > : { "name" : "Cloud-VirtualServer-xxxxx-80", "servicegroupname" : > "Cloudf84eaf4ed3fe43aebbc4d2ff9f7311bc" }, "cloudprofile" : { "type" : > "CLOUDSTACK", "url" : "http://172.30.100.15:8080/client/api", "apiKey" : > "x2134OIL1TKNyW6PahIq4NubxMn1tK3krpQFyDWks8fv_[...]", > "sharedsecret" : > "HtpqjvHENGMqZLBcn_o-_[...]" }, "action" : { "type" : "SCALE_DOWN", > "params" : > "command=destroyVirtualMachine&lbruleid=24aab38f-f466-45c5-9878- > 484841ba1b9d", > "quiettime" : "300", "destroyVMGracePeriod" : "30" }, "autoprovisiondns" > : { "nsdomainname" : > "autoscale-internal_server_Cloudf84eaf4ed3fe43aebbc4d2ff9f7311bc", > "nsservername" : > "autoscale-internal_server_Cloudf84eaf4ed3fe43aebbc4d2ff9f7311bc" } } }::: > current time is Tue Jul 2 21:09:09 2013 > Autoscale: Timer Event: Cloud-AutoScale-Timer-xxxxx-80 Returning avg_val: > 67 > > If I look in CloudStack, I do see the deployVirtualMachine calls coming from > the NetScaler during the scale up, but I don't see any destroyVirtualMachine > hitting the server for the scale down. > > I also added this issue regarding autoscaling: > https://issues.apache.org/jira/browse/CLOUDSTACK-3330 > > I am not sure if this is an expected behavior or not. Apparently, if the VR is > not setup, and you create the autoscale rules, nothing will happen until you > spin at least one vm in the network.
The guest network should be in implemented state for autoscale to work. Or you can define a Persistent network (https://cwiki.apache.org/confluence/display/CLOUDSTACK/FS+-+Persistent+Networks) and then configure autoscale without a need for a guest VM to be deployed manually. > > Thanks! > > On 2013-06-27 7:35 PM, Sowmya Krishnan wrote: > > Configurations look ok. > > > > Could you check to see if there are destroyVirtualMachine API calls in the > management server logs? If not then the condition for Scale down is > probably not getting hit. > > To find out if the condition is being hit in Netscaler, run "nsconmsg" in > > the > shell. When scale down is triggered, you should see logs something like: > > > > Evaluating autoscale policy.. : Triggering autoscale action SCALE_DOWN for > action ... > > > > > >> -----Original Message----- > >> From: Francois Gaudreault [mailto:fgaudrea...@cloudops.com] > >> Sent: Friday, June 28, 2013 1:44 AM > >> To: dev@cloudstack.apache.org > >> Subject: Auto-scaling won't scale down > >> > >> Hi, > >> > >> So I tried the AutoScaling on our setup today, and while it's working > >> fine to scale up, it won't scale down. We are on CS 4.1.0 nonoss > >> with NetScaler 10.1 build 112.15. > >> > >> I configured a Scale Up policy to trigger when servers are under 30% > >> CPU idle for a duration of 60sec, and Scale Down policy to trigger > >> when servers are over 40% CPU idle for a duration of 120secs. I > >> configured the AutoScaling to have a minimum of 1 machine, and a > maximum of 3. > >> > >> I do see the SNMP calls coming from the NetScaler, and the response. > >> > >> Did I configured it wrong? Let me know what you need for > troubleshooting. > >> > >> Thanks! > >> > >> -- > >> Francois Gaudreault > >> Architecte de Solution Cloud | Cloud Solutions Architect > >> fgaudrea...@cloudops.com > >> 514-629-6775 > >> - - - > >> CloudOps > >> 420 rue Guy > >> Montréal QC H3J 1S6 > >> www.cloudops.com > >> @CloudOps_ > > > > > > > -- > Francois Gaudreault > Architecte de Solution Cloud | Cloud Solutions Architect > fgaudrea...@cloudops.com > 514-629-6775 > - - - > CloudOps > 420 rue Guy > Montréal QC H3J 1S6 > www.cloudops.com > @CloudOps_