Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Block device allocation configuration (bsc#937800)
Browse files Browse the repository at this point in the history
Make block_device_allocate_retries and
block_device_allocate_retries_interval configurable from
the crowbar web ui in the raw view. See also
https://bugzilla.suse.com/show_bug.cgi?id=937800
  • Loading branch information
nkrinner committed Oct 1, 2015
1 parent bc4e087 commit d6cc0d6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 1 deletion.
6 changes: 6 additions & 0 deletions chef/cookbooks/nova/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,9 @@
default[:nova][:ha][:ports][:objectstore] = 5553
default[:nova][:ha][:ports][:novncproxy] = 5554
default[:nova][:ha][:ports][:xvpvncproxy] = 5555

#
# Block device settings
#
default[:nova][:block_device][:allocate_retries] = 60
default[:nova][:block_device][:allocate_retries_interval] = 3
2 changes: 2 additions & 0 deletions chef/cookbooks/nova/templates/default/nova.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,7 @@ instance_usage_audit=True
# Number of times to retry block device allocation on failures
# (integer value)
#block_device_allocate_retries=60
block_device_allocate_retries=<%= node[:nova][:block_device][:allocate_retries] %>

# The number of times to attempt to reap an instance's files.
# (integer value)
Expand Down Expand Up @@ -950,6 +951,7 @@ instance_usage_audit=True
# Waiting time interval (seconds) between block device
# allocation retries on failures (integer value)
#block_device_allocate_retries_interval=3
block_device_allocate_retries_interval=<%= node[:nova][:block_device][:allocate_retries_interval] %>

# Action to take if a running deleted instance is
# detected.Valid options are 'noop', 'log', 'shutdown', or
Expand Down
6 changes: 5 additions & 1 deletion chef/data_bags/crowbar/bc-template-nova.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,18 @@
"certfile": "",
"keyfile": ""
}
},
"block_device": {
"allocate_retries": 60,
"allocate_retries_interval": 3
}
}
},
"deployment": {
"nova": {
"crowbar-revision": 0,
"crowbar-applied": false,
"schema-revision": 24,
"schema-revision": 25,
"element_states": {
"nova-multi-controller": [ "readying", "ready", "applying" ],
"nova-multi-compute-docker": [ "readying", "ready", "applying" ],
Expand Down
6 changes: 6 additions & 0 deletions chef/data_bags/crowbar/bc-template-nova.schema
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
}
}
}
},
"block_device": {
"type": "map", "required": true, "mapping": {
"allocate_retries": { "type": "number", "required" : true },
"allocate_retries_interval": { "type": "number", "required" : true }
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def upgrade(ta, td, a, d)
unless a.has_key? "block_device"
a["block_device"] = ta["block_device"]
end
return a, d
end

def downgrade(ta, td, a, d)
unless ta.has_key? "block_device"
a.delete("block_device")
end
return a, d
end

0 comments on commit d6cc0d6

Please sign in to comment.