Bug 1729441 - Validation failed: MiqSchedule: Name has already been taken
Summary: Validation failed: MiqSchedule: Name has already been taken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.10.5
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: GA
: 5.11.0
Assignee: Yuri Rudman
QA Contact: Parthvi Vala
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1740229
TreeView+ depends on / blocked
 
Reported: 2019-07-12 09:49 UTC by Niladri Roy
Modified: 2019-12-13 14:54 UTC (History)
8 users (show)

Fixed In Version: 5.11.0.19
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1740229 (view as bug list)
Environment:
Last Closed: 2019-12-13 14:54:26 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 4368391 None None None 2019-08-23 10:59:47 UTC

Description Niladri Roy 2019-07-12 09:49:27 UTC
Description of problem:
Below error is observed when appliance is booting up
[----] E, [2019-07-09T09:27:03.343594 #7022:130ef48] ERROR -- : [ActiveRecord::RecordInvalid]: Validation failed: MiqSchedule: Name has already been taken  Method:[block (2 levels) in <class:LogProxy>]

Version-Release number of selected component (if applicable):
5.10.5.1

How reproducible:
everytime at Cu environment

Steps to Reproduce:
1. restart one appliance
2. observe evm.log
3.

Actual results:
appliance fails at seeding a widget
[----] I, [2019-07-09T09:27:03.326197 #7022:130ef48]  INFO -- : Widget: [Pods per Ready Status Chart] file has been updated on disk, synchronizing with model
[----] E, [2019-07-09T09:27:03.343594 #7022:130ef48] ERROR -- : [ActiveRecord::RecordInvalid]: Validation failed: MiqSchedule: Name has already been taken  Method:[block (2 levels) in <class:LogProxy>]

Expected results:
seeding should succeed and evmapplication should start running successfully

Additional info:

Comment 13 CFME Bot 2019-08-08 13:50:51 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/484c88134c1cf39edf8b18508a7b47e0a1b8d573
commit 484c88134c1cf39edf8b18508a7b47e0a1b8d573
Author:     Yuri Rudman <yrudman@redhat.com>
AuthorDate: Tue Jul 23 12:56:40 2019 -0400
Commit:     Yuri Rudman <yrudman@redhat.com>
CommitDate: Tue Jul 23 12:56:40 2019 -0400

    fix: check if shedule for widget with the same name already exists and reuse it instead of raising error. It would resolve issue with failing seeding in case when chedule exists but not libked to corresponding widget.
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1729441

 app/models/miq_widget.rb | 26 +-
 spec/models/miq_widget_spec.rb | 27 +
 2 files changed, 51 insertions(+), 2 deletions(-)

Comment 14 CFME Bot 2019-08-08 22:01:00 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/9a91d360a914c8c34baa321406691b3929a986b7
commit 9a91d360a914c8c34baa321406691b3929a986b7
Author:     Brandon Dunne <bdunne@redhat.com>
AuthorDate: Thu Aug  8 09:43:12 2019 -0400
Commit:     Brandon Dunne <bdunne@redhat.com>
CommitDate: Thu Aug  8 09:43:12 2019 -0400

    Merge pull request #19037 from yrudman/che-for-existted-sheduler-when-seeding

    Fix: do not raise error if schedule for widget exists but not linked
    (cherry picked from commit a248ba302ef069a25d4967eee97f363d41d35745)

    https://bugzilla.redhat.com/show_bug.cgi?id=1729441

 app/models/miq_widget.rb | 22 +-
 spec/models/miq_widget_spec.rb | 34 +
 2 files changed, 54 insertions(+), 2 deletions(-)

Comment 16 Parthvi Vala 2019-08-21 11:42:28 UTC
FIXED. Verified on 5.11.0.19.20190813184334_ed72c9f.

The server did not start successfully after dumping the database, but that was probably because the database dump was from a 5.10 appliance and I was dumping it on a 5.11 appliance. But the seeding completed successfully, hence marking the BZ as VERIFIED.


Note You need to log in before you can comment on or make changes to this bug.