Bug 1536126
Summary: | Some tasks have no started time in Tasks table | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Pavol Kotvan <pakotvan> | ||||
Component: | Providers | Assignee: | Yuri Rudman <yrudman> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavol Kotvan <pakotvan> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 5.9.0 | CC: | agrare, cpelland, dclarizi, gblomqui, hkataria, jfrey, jhardy, jwong, lavenel, mpovolny, obarenbo, pakotvan, simaishi | ||||
Target Milestone: | GA | Keywords: | TestOnly | ||||
Target Release: | 5.9.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | ui:automate | ||||||
Fixed In Version: | 5.9.0.18 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-03-06 15:27:43 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | Bug | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | Ansible | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1543289 | ||||||
Attachments: |
|
Comment 3
James Wong
2018-01-19 22:12:40 UTC
Before G release: value for Started column on Tasks screen were populated from miq_task.created_on attribute. G release: - task screen has new column - 'Queued', which populated by the miq_task.created_on. So, we are not loosing data, it is just named correctly. - new attribute created on miq_tasks table: 'started_on' and value of this attribute shown now in 'Started' column on tasks screen. 'started_on' will have valid date if state of task updated by 'MiqTask#update_status(MiqTask.STATE_ACTIVE, status,...)' call. Above PR will set MiqTask#started_on if MiqTask#state updated directly ( update_attributes(:state => MiqTask::STATE_ACTIVE)) The PR changes the backend to ensure that the started on is set once the status of the MiqTask has been updated to "Active", however the code that's creating and using the MiqTask *must* set the status to Active, otherwise this PR will not have any effect. Setting the status to Active is the responsibility of the caller, so if there are any missing "Started On" values after the PR is merged, then the caller (in this example, the Embedded Ansible team) would also have to make a change (cc jwong). Created attachment 1384556 [details]
Other tasks missing started_on field
At least metric rollup tasks are also having this issue.
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/a56d3b7440b034e87e1189dc73974565f72c76d8 commit a56d3b7440b034e87e1189dc73974565f72c76d8 Author: Yuri Rudman <yrudman> AuthorDate: Mon Jan 22 07:44:50 2018 -0500 Commit: Yuri Rudman <yrudman> CommitDate: Mon Jan 22 08:30:43 2018 -0500 added before_save callback to update MiqTask#started attribute if task become active https://bugzilla.redhat.com/show_bug.cgi?id=1536126 app/models/miq_task.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) A WIP PR for backend https://github.com/ManageIQ/manageiq/pull/16872 Above PR (for gaprindashvili only) will replace empty "Started" column with the same date as in "Queued" column. I am still not sure if it is the right way to go ... New commit detected on ManageIQ/manageiq/gaprindashvili: https://github.com/ManageIQ/manageiq/commit/ab963eb0baa40c87d28da4c3303426f79f9b080c commit ab963eb0baa40c87d28da4c3303426f79f9b080c Author: Yuri Rudman <yrudman> AuthorDate: Wed Jan 24 14:42:14 2018 -0500 Commit: Yuri Rudman <yrudman> CommitDate: Wed Jan 24 16:33:33 2018 -0500 temporary hack to show data in started_on column (on task managemnt screen) even if task's status was not updated to 'Active' https://bugzilla.redhat.com/show_bug.cgi?id=1536126 app/models/miq_task.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) |