Scale-in with deletion-policy and the criteria is OLDEST_FIRST failed

Bug #1614450 reported by RUIJIE YUAN
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
senlin
Fix Released
High
RUIJIE YUAN

Bug Description

What I have done is:

1. Create a cluster and the desired capacity is 0
2. Bind a deletion-policy to the cluster -- the criteria is OLDEST_FIRST
3. Do CLUSTER_RESIZE action to scale-out to 5 nodes -- one failed
4. Do CLUSTER_RECOVER to recover the cluster

Then I got an exception which is None type cannot compare to datetime.datetime in ScaleUtil.py

How to produce the situation again:

Create a node and then turn the senlin-engine off, the status of the action will be FAILED, and the create_at will
be None

RUIJIE YUAN (cnjie0616)
Changed in senlin:
assignee: nobody → RUIJIE YUAN (cnjie0616)
Revision history for this message
Yanyan Hu (yanyanhu) wrote :

Hi, Ruijie, thanks a lot for reporting the bug. We met similar issue before and the following is the corresponding bug report:

https://bugs.launchpad.net/senlin/+bug/1594352

But we haven't found a good way to fix this issue...

Yanyan Hu (yanyanhu)
Changed in senlin:
status: New → Confirmed
Revision history for this message
RUIJIE YUAN (cnjie0616) wrote :

I checked the source code,
in /senlin/engine/node.py:

the set_status() method will check the stauts of the node:

if status == self.ACTIVE and self.status == self.CREATING:
     self.created_at = values['created_at'] = now
elif status == self.ACTIVE and self.status == self.UPDATING:
     self.updated_at = values['updated_at'] = now

In my understanding, this means only if the node is creating and
is created completely the created_at will be bound to date.now().

Which means the created_at will be None if the node-creation action failed.

I think the created_at should not be None even if it is created unsuccessfully.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to senlin (master)

Fix proposed to branch: master
Review: https://review.openstack.org/364024

Qiming Teng (tengqim)
Changed in senlin:
importance: Undecided → High
status: Confirmed → Triaged
milestone: none → newton-rc1
Changed in senlin:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to senlin (master)

Reviewed: https://review.openstack.org/364024
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=7db00d14b367571d0b4b051c416d021cd82902e7
Submitter: Jenkins
Branch: master

commit 7db00d14b367571d0b4b051c416d021cd82902e7
Author: RUIJIE YUAN <email address hidden>
Date: Thu Sep 1 09:49:10 2016 +0800

    Enable node filtering to filter nodes not created.

    In some condition, the created_at of a node will be None,
    filter_bad_nodes() does not filter these kind of nodes.

    Closes-Bug: #1614450

    Change-Id: Iee3d97659c0d9fd235b016addf820de32b7e1c75

Changed in senlin:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/senlin 2.0.0.0b3

This issue was fixed in the openstack/senlin 2.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.