Add iops fact and add it to astute
Astute needs to know how many nodes can be provisioned at a time, based on IOPS. Change-Id: If2cf35ac8195baf37cda50564b70ba3db836ccea Partial-Bug: #1355347
This commit is contained in:
parent
b0951014f4
commit
26b55bc341
15
deployment/puppet/nailgun/lib/facter/iops.rb
Normal file
15
deployment/puppet/nailgun/lib/facter/iops.rb
Normal file
@ -0,0 +1,15 @@
|
||||
require 'facter'
|
||||
|
||||
# Requires sysstat package on Ubuntu and CentOS
|
||||
# Fact iops totals tps values from iostat
|
||||
|
||||
Facter.add('iops') do
|
||||
confine :kernel => :linux
|
||||
str = Facter::Util::Resolution.exec("iostat | grep -v 'dm-'" \
|
||||
" | awk '{print $2}'")
|
||||
iops = 0
|
||||
str.split("\n").each do |iops_val|
|
||||
iops = iops + iops_val.to_f
|
||||
end
|
||||
setcode { iops }
|
||||
end
|
@ -5,5 +5,6 @@ broker_password: '<%= @rabbitmq_astute_password %>'
|
||||
broker_queue: 'naily'
|
||||
broker_publisher_queue: 'nailgun'
|
||||
broker_exchange: 'nailgun'
|
||||
iops: <%= @iops %>
|
||||
#reboot_timeout: 120 # Wait for reboot request
|
||||
#provisioning_timeout: 5400 # Timeout for target nodes to install OS
|
||||
|
Loading…
Reference in New Issue
Block a user