Commit Graph

15 Commits (cb80df4f4ab0e8de16d53c7fddff7c44dedd3f94)

Author SHA1 Message Date
liyi 8f10215ffd Remove log translations
Log messages are no longer being translated. This removes all use of
the _LE, _LI, and _LW translation markers to simplify logging and to
avoid confusion with new contributions.


Change-Id: Ieec8028305099422e1b0f8fc84bc90c9ca6c694f
2017-03-25 17:11:50 +08:00
huangtianhua 197febdb01 Improve resource.NoActionRequired
Log the proper reasons (scaling activity or cooldown)
when scaling is not allowed.

Change-Id: I3a9ed8fe7bff8696551470a9fac0b1a2831eb95c
2017-01-25 00:17:00 +00:00
huangtianhua 5b04acb4e2 To reset metadata for resources when mark unhealthy
Some resources do not work if their metadata is in
a wrong state, .e.g the metadata 'scaling_in_progress'
of scaling group/policy might be always True if engine
restarts while scaling.
This patch adds an interface 'handle_metadata_reset' for
resource, then the plugins can override it if needed.
We reset the metadata while marking resource healthy.

Change-Id: Ibd6c18acf6f3f24cf9bf16a524127850968062bc
Closes-Bug: #1651084
2017-01-04 11:18:00 +00:00
Nguyen Hung Phuong e8f6c36440 Clean imports in code
In some part in the code we import objects.
In the Openstack style guidelines they recommend to import only
We need to fix that.

Change-Id: I9c7481462ac7350bddae78c0a05af1e835a282e2
2016-08-16 12:44:36 +07:00
Jaime Guerrero c789a9837e Ignore NotFound exception in metadata_set
To avoid a race condition when updating a deleted stack, this catches the
NotFound exception specifically and ignores it.  All other exceptions are
allowed to be raised.

Closes bug: 1582236

Change-Id: I23ddb71c806c0db1ed7ed4ee4ef831ca51605d65
2016-05-26 18:28:10 +00:00
Kanagaraj Manickam 080ace0054 Fixes cooldown logic throws ValueError
Change-Id: I2835e8b2b570a82625761aa55ec34e0df4d6ecd5
Closes-bug: #1569273
2016-05-15 19:05:44 +00:00
Rabi Mishra 480271d896 Don't try scaling when no change in size
Don't resize and send notifications when there is no
change in size i.e. max/min has been reached.

This also refactors some exception handling logic.

Change-Id: I1bb226b3067178dbdab2947609c53f3434aff9fe
Related-Bug: #1555748
2016-04-01 18:24:16 +05:30
Omar Soriano 6c25e8302d Avoid cooldown when group size does not change
Cooldown behavior changed in commit:

Restore the cooldown behavior so that when a group does not encounter
scaling activity, a cooldown period is not activated.

Closes-Bug: #1555748
Change-Id: Icf5df6a48afb9f56aa1c3f1622d33b9998aca39c
2016-03-19 19:22:04 +05:30
Peter Razumovsky a2ec480f3c Fix [H405] pep rule in heat/scaling
Implements bp docstring-improvements

Change-Id: If1b98962ce20f28cefd01ccf7d6f88f7e908d0db
2015-09-21 14:51:45 +03:00
yanyanhu b76881b8bc ASG scaling account for cooldown timestamp & in-progress
There are cases where it takes a long time to create a new resource as
requested by the scaling operation on an ASG resource, for instance, a
nova server creation followed by a complex SoftwareDeployment. During
this process, additional alarms may come in but failed to be blocked
by the current cooldown checking mechanism because the very first
timestamp has yet to be generated. This is leading to unexpected size
adjustment to the ASG.

This patch augments the existing cooldown checking mechanism with a
scaling-in-progress test so that additional alarms arriving during
the very first scaling operation will be ignored.

Change-Id: Ib8aa83eed366df7097c9cbb9247eca866ae4b620
Closes-Bug: #1375156
2015-07-05 23:19:06 -04:00
Julien Danjou 03a24cabb1 Stop using deprecated oslo_utils.timeutils.strtime()
This function has been deprecated in oslo.utils. Let's replace it with a
proper ISO8601 version.

Change-Id: I1f4c44fc86b1ee45f7e2e3cb6b4347d3c2f91a1a
2015-06-02 16:29:15 +02:00
Tetiana Lashchova 4ace95ad47 Use six.iterkeys(x) instead of x.keys()
Implements: partial blueprint heat-python34-support
Change-Id: I6f1c3091ca65dbef0f36bd6ba7f7fcbf77ff2e40
2015-04-23 17:18:40 +03:00
Jens Rosenboom a99fe6a760 Make import of oslo libraries namespaceless

Closes-Bug: 1423174
Change-Id: I48680ce6e7ce91005c147ab4388203946171d433
2015-02-18 22:54:10 +01:00
Julien Danjou 6519cf36fd Switch to oslo.utils
Change-Id: I74979d8f75b099858314a30c98bb252c379e0304
2014-09-30 14:27:59 +02:00
tengqm 6e22014cad Move CooldownMixin into separate file
CooldownMixin is a class that can be shared between OS and AWS
auto-scaling implementations.  This patch moves it to a shared

Implements: partial-blueprint reorg-asg-code
Change-Id: I40e470460e84944d317f5b1772fc562abf62896d
2014-08-14 17:20:24 +08:00