This patch makes dbomatic use the proper instance.condor_job_id to look up the instance in the database instead of the name, which isn't guaranteed to be unique.
Signed-off-by: Ian Main <[email protected]> --- src/dbomatic/dbomatic | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic index 7f822e3..20a28f2 100755 --- a/src/dbomatic/dbomatic +++ b/src/dbomatic/dbomatic @@ -214,8 +214,7 @@ class CondorEventLog < Nokogiri::XML::SAX::Document begin if element == "c" and @event_type == "JobAdInformationEvent" and !...@trigger_type.nil? - inst_name = @event_cmd[4,@event_cmd.size-4].gsub(/_[0-9]*$/, '') - inst = Instance.find(:first, :conditions => ['name = ?', inst_name]) + inst = Instance.find(:first, :conditions => ['condor_job_id = ?', @event_cmd]) if inst.nil? @logger.info "Unexpected nil instance, skipping..." else -- 1.7.2.3 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
