Project

General

Profile

Bug #27185

Reset changed? state after saving with DirtyAssociations

Added by Swetha Seelam Lakshmi Narayanan about 1 year ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Getting an error while registering a host using activation key with system purpose attributes. Even though there is an error, the host gets registered with the activation key successfully.

Steps to reproduce the bug:

1. Create an activation key with system purpose attributes.
2. Register a host using this activation key with the following command.
subscription-manager register --org "Default_Organization" --activationkey "keyname"
3. Getting the following error -

HTTP error (500 - Internal Server Error): Required lock is already taken by other running tasks.
Please inspect their state, fix their errors and resume them.

Required lock: update
Conflicts with tasks:
- http://centos7-katello-devel.swetha.example.com/foreman_tasks/tasks/0f9577a7-4e2d-469b-955f-60891182262b

Associated revisions

Revision 02a24ab9 (diff)
Added by Swetha Seelam Lakshmi Narayanan 11 months ago

Fixes #27185 - dirty association after save (#6881)

History

#1 Updated by Marek Hulán about 1 year ago

  • Category changed from API to API
  • Project changed from Katello to Foreman

#2 Updated by Jonathon Turel about 1 year ago

  • Subject changed from Can't register a system using activation key with system purpose. to Reset changed? state after saving with DirtyAssociations

This bug was originally written in the context of Activation Keys in Katello but we found that the underlying issue was the fact that <relation>_changed? continued to return true even after saving the model object. This caused a lot of extra saves for us in Katello. By making DirtyAssociations behave more like ActiveModel::Dirty we can avoid the problem and have the expected behavior

#3 Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6881 added

#4 Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman/pull/6947 added

#5 Updated by The Foreman Bot 11 months ago

  • Fixed in Releases 1.24.0 added

#6 Updated by Anonymous 11 months ago

  • Status changed from Ready For Testing to Closed

#7 Updated by Tomer Brisker 10 months ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/6947)

#8 Updated by Kavita Gaikwad 10 months ago

  • Related to Bug #25602: audit failures with Rails 5.2.2 added

#9 Updated by Kavita Gaikwad 10 months ago

  • Related to deleted (Bug #25602: audit failures with Rails 5.2.2)

Also available in: Atom PDF