VNF ERROR state in audit list of events

Bug #1613445 reported by Santosh
This bug affects 1 person
Affects Status Importance Assigned to Milestone
In Progress

Bug Description

The error state shown from 'tacker vnf-event-list' should have more details of reason of ERROR for vnf.
Currently the output has limited details (Check the attachment)

Tags: rfe
Revision history for this message
Santosh (ksantosh-cs) wrote :
Sripriya (sseetha)
Changed in tacker:
assignee: nobody → Abinaya (abinaya-visvanathan)
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Abinaya (abinaya-visvanathan) wrote :

Please review and check if the error has been updated on the event details list.

Revision history for this message
Abinaya (abinaya-visvanathan) wrote :

 The error reason that is being displayed now is passed in the variable: evt_details
 The function create_event displays the status of the VNF alog with its ID and other parameters.
 This part is mentioned in the function create vnf post, where the vnf status- be it ACTIVE or ERROR- the same event_status message is displayed.
 1- Since a common message is displayed for all errors messages - we have to fisr identify the errors that are possible and accordingly display the error message

 evt_details = ("Infra Instance ID created: %s and "
                       "Mgmt URL set: %s") % (instance_id, mgmt_url)

            context, res_id=vnf_dict['id'],
            tstamp=timeutils.utcnow(), details=evt_details)

2 - Scenario for error- this is one of the possible reasons error can occur in the code:

                driver_name, 'create_wait', plugin=self, context=context,
                vnf_dict=vnf_dict, vnf_id=instance_id,
        except vnfm.VNFCreateWaitFailed as e:
            LOG.error(_LE("VNF Create failed for vnf_id %s"), vnf_id)
            create_failed = True
            vnf_dict['status'] = constants.ERROR
            self.set_vnf_error_status_reason(context, vnf_id,

 As we can see, in the set_vnf_error_status_reason, six.text_type(e) parmeter is passed
 this is a unicode or a string which passes the exception message or the error message,

3- def set_vnf_error_status_reason(self, context, vnf_id, new_reason):
        with context.session.begin(subtransactions=True):
            (self._model_query(context, VNF).
                filter( == vnf_id).
                update({'error_reason': new_reason}))

 As we can see above, according to the errors- the key value error_reason is updated.

 So, in order to display the errors reasons accordingly, the error_reason(in 3) has to be linked to the event details(in 1)

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

Fix proposed to branch: master

Changed in tacker:
status: Confirmed → In Progress
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.