Project

General

Profile

Actions

Refactor #4032

closed

TFTP orchestration uses direct object comparison

Added by Greg Sutcliffe about 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Orchestration
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

It shouldn't. This was the root cause of why the TFTP orchestration was working for the last year - the build? flag was never read correctly, but because old.os != os was always returning true (even when the OS wasn't changed) the TFTP orchestration was working.

We've fixed the problem in build? (PR 1159) but the object comparisons remain. You can prove that Rails does odd things with a smple snippet:

u = User.first
reload!
u1 = User.first
u == u1
=> false

As a start I've altered the TFTP orchestration to use object.id which is reliable (since it's loaded from the db). There are probably a lot more of these around the codebase though...


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #4031: TFTP record is not updated after host is builtClosedMarek Hulán01/16/2014Actions
Actions #2

Updated by Greg Sutcliffe about 10 years ago

  • Related to Bug #4031: TFTP record is not updated after host is built added
Actions #3

Updated by Dominic Cleal about 10 years ago

  • translation missing: en.field_release set to 2
Actions #4

Updated by Greg Sutcliffe about 10 years ago

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

Also available in: Atom PDF