Fix cluster config update

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

Bug Description

cluster config property can not be updated using API 'PATCH /v1/clusters/{cluster_id}'.

Reproduce step:
1. call 'POST /v1/clusters' to create a cluster with body:
{
    "cluster": {
     "config": {"key1": "value1"},
        "desired_capacity": 0,
        "max_size": -1,
        "metadata": {},
        "min_size": 0,
        "name": "mycluster",
        "profile_id": "stack_profile",
        "timeout": null
    }
}
2. show the cluster with API '', output:
{
  "cluster": {
    "config": {
      "key1": "value1"
    },
    "created_at": "2017-07-13T01:03:52Z",
    "data": {},
    "dependents": {},
    "desired_capacity": 0,
    "domain": null,
    "id": "faad15af-8b0e-402e-a89b-1d4dfda6de9e",
    "init_at": "2017-07-13T01:03:52Z",
    "max_size": -1,
    "metadata": {},
    "min_size": 0,
    "name": "mycluster",
    "nodes": [],
    "policies": [],
    "profile_id": "853e46d8-37b9-4ea6-868c-47f73b72f859",
    "profile_name": "stack_profile",
    "project": "f1fe61dcda2f4618a14c10dc7abc214d",
    "status": "ACTIVE",
    "status_reason": "CLUSTER_CREATE: number of active nodes is equal or above desired_capacity (0).",
    "timeout": 3600,
    "updated_at": "2017-07-13T01:03:52Z",
    "user": "8bcd2cdca7684c02afc9e4f2fc0f0c79"
  }
}

The config property is correct!

3. update cluster with config '{"key1": "value-modify"}':
{
    "cluster": {
     "config": {"key1": "value-modify"}
    }
}

4. show cluster detail:
{
  "cluster": {
    "config": {
      "key1": "value1"
    },
    "created_at": "2017-07-13T01:03:52Z",
    "data": {},
    "dependents": {},
    "desired_capacity": 0,
    "domain": null,
    "id": "faad15af-8b0e-402e-a89b-1d4dfda6de9e",
    "init_at": "2017-07-13T01:03:52Z",
    "max_size": -1,
    "metadata": {},
    "min_size": 0,
    "name": "mycluster",
    "nodes": [],
    "policies": [],
    "profile_id": "853e46d8-37b9-4ea6-868c-47f73b72f859",
    "profile_name": "stack_profile",
    "project": "f1fe61dcda2f4618a14c10dc7abc214d",
    "status": "ACTIVE",
    "status_reason": "CLUSTER_UPDATE: number of active nodes is equal or above desired_capacity (0).",
    "timeout": 3600,
    "updated_at": "2017-07-13T01:06:46Z",
    "user": "8bcd2cdca7684c02afc9e4f2fc0f0c79"
  }
}

The config property didn't be updated.

liyi (whyliyi)
Changed in senlin:
assignee: nobody → liyi (whyliyi)
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/483146

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

Reviewed: https://review.openstack.org/483146
Committed: https://git.openstack.org/cgit/openstack/senlin/commit/?id=8a23231a453c0a1e015590de3edc53212e3fcb1e
Submitter: Jenkins
Branch: master

commit 8a23231a453c0a1e015590de3edc53212e3fcb1e
Author: liyi <email address hidden>
Date: Thu Jul 13 09:08:33 2017 +0800

    Fix cluster config updating operation

    Cluster config property can not be updated correctly.

    Change-Id: I28ac448b488bf14c0734b917642095a8ae51ae11
    Closes-Bug: #1704025

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

This issue was fixed in the openstack/senlin 4.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.