Project

General

Profile

Actions

Bug #27185

closed

Reset changed? state after saving with DirtyAssociations

Added by Swetha Seelam Lakshmi Narayanan about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
-
Difficulty:
Triaged:
No
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

Actions #1

Updated by Marek Hulán about 5 years ago

  • Project changed from Katello to Foreman
  • Category changed from API to API
Actions #2

Updated by Jonathon Turel about 5 years 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

Actions #3

Updated by The Foreman Bot about 5 years ago

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

Updated by The Foreman Bot almost 5 years ago

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

Updated by The Foreman Bot almost 5 years ago

  • Fixed in Releases 1.24.0 added
Actions #6

Updated by Anonymous almost 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #7

Updated by Tomer Brisker almost 5 years ago

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

Updated by Kavita Gaikwad almost 5 years ago

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

Updated by Kavita Gaikwad almost 5 years ago

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

Also available in: Atom PDF