Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Aug 6, 2024
1 parent 20973ce commit 354f6de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ group :cisco_intersight, :manageiq_default do
end

group :embedded_terraform, :manageiq_default do
gem "manageiq-providers-embedded_terraform", :git => "https://github.com/agrare/manageiq-providers-embedded_terraform", :branch => "always_create_worker_record"
manageiq_plugin "manageiq-providers-embedded_terraform"
end

Expand Down
2 changes: 2 additions & 0 deletions app/models/miq_server/worker_management/kubernetes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ def sync_starting_workers
# If the current worker doesn't have a system_uid assigned then find the first
# pod available for our worker type and link them up.
if worker.system_uid.nil?
_log.info("AG: found a worker without a system_uid: Class [#{worker.class.name}] Id [#{worker.id}]")
system_uid = pods_without_workers.detect { |pod_name| pod_name.start_with?(worker.worker_deployment_name) }
next if system_uid.nil?

_log.info("AG: found a pod #{system_uid} assigning to worker: Class [#{worker.class.name}] Id [#{worker.id}]")
pods_without_workers.delete(system_uid)
worker.update!(:system_uid => system_uid)
end
Expand Down

0 comments on commit 354f6de

Please sign in to comment.