murano-agent dead-lock on wrong execution-plan

Bug #1632556 reported by chenyujie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Confirmed
Medium
Unassigned

Bug Description

During loop on process execution plan, there is no try/catch to protect the code sequence. So if there is an exception raised from get_execution_plan(such as a wrong json format, and there is no try/catch either in get_execution_plan), the message would be processed for ever because next(msg_iterator) would never be executed, and the agent would dead-lock at the message.

    def _loop_func(self, msg_iterator):
        result, timestamp = self._queue.get_execution_plan_result()
        if result is not None:
            if self._send_result(result):
                self._queue.remove(timestamp)
            return

        plan = self._queue.get_execution_plan()
        if plan is not None:
            LOG.debug("Got an execution plan '{0}':".format(str(plan)))
            self._run(plan)
            return

        next(msg_iterator)

Revision history for this message
chenyujie (gzyjchen) wrote :
tags: added: agent
tags: added: low-hanging-fruit
Changed in murano:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → ocata-1
Jaewoo Park (aselius)
Changed in murano:
assignee: nobody → Jaewoo Park (aselius)
Revision history for this message
Stan Lagun (slagun) wrote :

Could you please provide more information on your use cases? In normal usage you cannot get json decoding exceptions for jsons that were produced by the very same application. And if the corrupted json was put there by someone else hanging until it fixed back by the user might be a reasonable behavior

Revision history for this message
chenyujie (gzyjchen) wrote :

The problem is rare. In our environment, we write wrong code in resource template, which produce not a valid yaml then the agent is dead after the wrong request.

Jaewoo Park (aselius)
Changed in murano:
assignee: Jaewoo Park (aselius) → nobody
Changed in murano:
milestone: 3.1.0 → pike-2
Changed in murano:
milestone: pike-2 → pike-rc1
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.