Comment 0 for bug 1632381

Revision history for this message
zhoumingang (zhoumingang) wrote :

when i use rally to create the senlin cluster ,error occured in the log of senlin-engine.
I would like to add that i Manually create a cluster is ok.
in fact,the profile has been created by rally why i would get the " The profile could not be found" error?

[rally log]
2016-10-11 16:59:36.749 5613 INFO rally.plugins.openstack.context.senlin.profiles [-] Task 8d83c8f9-7304-4186-aa87-a6b1994aace6 | Completed: Enter context: `Senlin profiles`
2016-10-11 16:59:36.766 5742 INFO rally.task.runner [-] Task 8d83c8f9-7304-4186-aa87-a6b1994aace6 | ITER: 1 START
ea32ff2a-58b4-42d1-9a67-4cc4584576b7
2016-10-11 16:59:47.311 5742 INFO rally.task.runner [-] Task 8d83c8f9-7304-4186-aa87-a6b1994aace6 | ITER: 1 END: Error GetResourceErrorStatus: Resource openstack.cluster.v1.cluster.Cluster(status=ERROR, project=9bdf543e2cca4b0982ca85ff57c9552d, domain=None, name=s_rally_8d83c8f9_UVmZSIFa, desired_capacity=1, status_reason=CLUSTER_CREATE [2871e02b] failed, created_at=None, profile_id=ea32ff2a-58b4-42d1-9a67-4cc4584576b7, updated_at=None, min_size=1, init_at=2016-10-11T16:59:41, profile_name=s_rally_8d83c8f9_LvLLB9zg, user=c6e7fcc360a24f7e9cbe430a89dcd728, timeout=3600, nodes=[u'82e73403-4f08-4d0a-8f85-62ef848cb550'], data={}, id=298aac87-c0f1-42a1-b41e-c220131cfa0c, max_size=5, metadata={}) has ERROR status.
Fault: Status in failure list set(['ERROR'])

[senlin log]
[root@zmg ~(keystone_admin)]# tail -f /var/log/senlin/senlin-engine.log |grep -i ERR
2016-10-11 16:59:43.694 1 ERROR senlin.engine.actions.base [req-41b17d57-045c-486f-b629-399e0a6da0f7 c6e7fcc360a24f7e9cbe430a89dcd728 9bdf543e2cca4b0982ca85ff57c9552d - - -] Unexpected exception occurred during action NODE_CREATE (0c33a032-fc1b-423d-ae67-c310dd50fbff) execution: The profile (ea32ff2a-58b4-42d1-9a67-4cc4584576b7) could not be found.
2016-10-11 16:59:43.906 1 ERROR senlin.engine.event [req-41b17d57-045c-486f-b629-399e0a6da0f7 c6e7fcc360a24f7e9cbe430a89dcd728 9bdf543e2cca4b0982ca85ff57c9552d - - -] node_create_82e73403 [0c33a032] NODE_CREATE - FAILED: The profile (ea32ff2a-58b4-42d1-9a67-4cc4584576b7) could not be found.
2016-10-11 16:59:47.853 1 ERROR senlin.engine.service [req-6ca3f2d0-3e13-492f-80c1-d3e1a0b843fe 82f07bdf612446559236c59b70f20af3 6ed444e4f51f4834ade159baeedc678e - default default] Profile 'ea32ff2a-58b4-42d1-9a67-4cc4584576b7' cannot be deleted.
2016-10-11 16:59:48.766 1 ERROR senlin.engine.event [req-41b17d57-045c-486f-b629-399e0a6da0f7 c6e7fcc360a24f7e9cbe430a89dcd728 9bdf543e2cca4b0982ca85ff57c9552d - - -] cluster_create_298aac87 [2871e02b] CLUSTER_CREATE - FAILED: CLUSTER_CREATE [2871e02b] failed

I guess may be it is the permissions problem.
rally/plugins/openstack/scenarios/senlin/utils.py

-----------------------------------------------
    def _create_cluster(self, profile_id, desired_capacity=0, min_size=0,
                        max_size=-1, timeout=60, metadata=None):
        """Create a new cluster from attributes.

        :param profile_id: ID of profile used to create cluster
        :param desired_capacity: The capacity or initial number of nodes
                                 owned by the cluster
        :param min_size: The minimum number of nodes owned by the cluster
        :param max_size: The maximum number of nodes owned by the cluster.
                         -1 means no limit
        :param timeout: The timeout value in minutes for cluster creation
        :param metadata: A set of key value pairs to associate with the cluster

        :returns: object of cluster created.
        """
        attrs = {
            "profile_id": profile_id,
            "name": self.generate_random_name(),
            "desired_capacity": desired_capacity,
            "min_size": min_size,
            "max_size": max_size,
            "metadata": metadata,
            "timeout": timeout
        }
        cluster = self.admin_clients("senlin").create_cluster(**attrs) //source code use admin_client
        cluster = self.clients("senlin").create_cluster(**attrs) //when i change the code ,the problem resolved.
        cluster = utils.wait_for_status(
            cluster,
            ready_statuses=["ACTIVE"],
            failure_statuses=["ERROR"],
            update_resource=self._get_cluster,
            timeout=CONF.benchmark.senlin_action_timeout)

After i changed the code "admin_clients" to "clients" ,the problem was not happened.

+--------------------------------------------------------------------------------------------------------------------------+
| Response Times (sec) |
+-----------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| Action | Min (sec) | Median (sec) | 90%ile (sec) | 95%ile (sec) | Max (sec) | Avg (sec) | Success | Count |
+-----------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+
| senlin.delete_cluster | 1.266 | 1.266 | 1.266 | 1.266 | 1.266 | 1.266 | 100.0% | 1 |
| senlin.create_cluster | 64.895 | 64.895 | 64.895 | 64.895 | 64.895 | 64.895 | 100.0% | 1 |
| total | 71.165 | 71.165 | 71.165 | 71.165 | 71.165 | 71.165 | 100.0% | 1 |
+-----------------------+-----------+--------------+--------------+--------------+-----------+-----------+---------+-------+