Project

General

Profile

Bug #2489

BMC password doesn't save

Added by Joseph Magen over 6 years ago. Updated over 6 years ago.

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

Related issues

Related to Foreman - Bug #2713: do not update nics table on every host update as a workaround to bug #2489Closed2013-06-26

Associated revisions

Revision eaa6aec0 (diff)
Added by Joseph Magen over 6 years ago

fixes #2489 - fixes BMC password caused by rails bug accepts_nested_attributes_for and serialized child field

Revision 7464248b (diff)
Added by Joseph Magen over 6 years ago

fixes #2489 - fixes BMC password caused by rails bug accepts_nested_attributes_for and serialized child field
(cherry picked from commit eaa6aec0023de21f0565b33e98f4c68990c0c2e2)

History

#1 Updated by Daniel Lobato Garcia over 6 years ago

Is this going to be fixed before 1.2?

#2 Updated by Joseph Magen over 6 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.2.0

#3 Updated by Joseph Magen over 6 years ago

I found the bug, but I don't have a workaround yet. It appears to be a Rails bug.
If there is accepts_nested_attributes_for and a serialized field on the child object (attrs in Nic::Base), then the child object(attrs) is not updated IF the only fields that are changed are the elements of the serialized hash attrs (:username, :password, :provider). If another field on the interfaces form changes (i.e. :mac) in addition to :password, then everything saves fine. If ONLY :password is changed for the interface, then it appears rails does NOT recognize that attrs is DIRTY when @host. update_attributes and therefore NOTHING for interface is updated.

#4 Updated by Joseph Magen over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF