Skip to content

Commit

Permalink
fixed bug with agents that disappeared
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwittig committed Oct 4, 2016
1 parent 594a85f commit 5f3f179
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jenkins/files/lifecycle-poller/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def isAgentIdle(agent)
$log.error "unexpected body: #{res.body}"
return false
end
elsif res.code == '404'
return true
else
$log.error "unexpected response code: #{res.code}"
return false
Expand Down
2 changes: 1 addition & 1 deletion jenkins/jenkins2-ha-agents.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
"PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin", "\n",
"MAILTO=root", "\n",
"HOME=/", "\n",
"* * * * * root aws --region ", {"Ref": "AWS::Region"}, " cloudwatch put-metric-data --namespace ", {"Ref": "AWS::StackName"}, " --metric-name BuildQueue --value $(curl curl -s -u 'admin:", {"Ref": "MasterAdminPassword"}, "' 'http://@localhost:8080/queue/api/xml' | grep -o '<item' | wc -l) --unit Count", "\n"
"* * * * * root aws --region ", {"Ref": "AWS::Region"}, " cloudwatch put-metric-data --namespace ", {"Ref": "AWS::StackName"}, " --metric-name BuildQueue --value $(curl -s -u 'admin:", {"Ref": "MasterAdminPassword"}, "' 'http://@localhost:8080/queue/api/xml' | grep -o '<item' | wc -l) --unit Count", "\n"
]]},
"mode": "000600",
"owner": "root",
Expand Down

0 comments on commit 5f3f179

Please sign in to comment.