Project

General

Profile

Actions

Refactor #4032

closed

TFTP orchestration uses direct object comparison

Added by Greg Sutcliffe over 10 years ago. Updated almost 6 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

Also available in: Atom PDF