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

make node buffer configurable #6410

Merged
merged 1 commit into from
Jul 29, 2016

Conversation

sallyom
Copy link
Contributor

@sallyom sallyom commented Jul 28, 2016

@Miciah please take a look, thanks

@@ -336,6 +337,8 @@ def self.node_utilization

# use max_{active_,}gears if set in resource limits, or fall back to old "apps" names
res['max_active_gears'] = (resource.get('max_active_gears') or resource.get('max_active_apps') or DEFAULT_MAX_ACTIVE_GEARS)
res['node_df_buffer'] = resource.get('node_df_buffer', DEFAULT_NODE_DF_BUFFER)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense to do a .to_f here so that the facts.yaml doesn't sometimes contain a string (if the value from the configuration file is used) and sometimes a float (if DEFAULT_NODE_DF_BUFFER is used), although it shouldn't really matter since we do a .to_f on the broker's side.

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch from 2ed3fa6 to 7ecb9a0 Compare July 28, 2016 17:04
@sallyom
Copy link
Contributor Author

sallyom commented Jul 28, 2016

openshift-bot, please [test][extended:node]!

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch from 7ecb9a0 to 14307f6 Compare July 28, 2016 17:54
@@ -25,6 +25,12 @@ node_profile=small
# For no over-commit, should be (Total System Memory - 1G) / memory_limit_in_bytes
max_active_gears=60

# Node disk buffer
#
# When moving a gear to a node, ensure that after a move this buffer of free disk space
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/buffer/percentage/ for clarity.

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch from 14307f6 to 931d684 Compare July 29, 2016 13:03
@sallyom
Copy link
Contributor Author

sallyom commented Jul 29, 2016

@Miciah, please review, thanks!

@@ -38,6 +38,7 @@
:domain_suffix => conf.get("CLOUD_DOMAIN", "example.com"),
:default_max_domains => (conf.get("DEFAULT_MAX_DOMAINS", "10")).to_i,
:default_max_gears => (conf.get("DEFAULT_MAX_GEARS", "100")).to_i,
:default_node_df_buffer => (conf.get("DEFAULT_NODE_DF_BUFFER", "0.05").to_f,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't need to make any changes under plugins/auth/.

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch 2 times, most recently from a61c2b6 to 3b5d35f Compare July 29, 2016 16:25
@Miciah
Copy link
Contributor

Miciah commented Jul 29, 2016

Lovely jubbly! openshift-bot, please [merge]!

@openshift-bot
Copy link

openshift-bot commented Jul 29, 2016

Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9372/) (Image: devenv_5814)

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch from 3b5d35f to 7e08d1d Compare July 29, 2016 20:12
@@ -2413,11 +2413,13 @@ def rsync_destination_container(gear, destination_container, destination_distric
log_debug "DEBUG: Gear platform is '#{platform}'"
destination_avail_space = destination_container.get_node_disk_free
destination_total_space = destination_container.get_node_total_size
node_df_buffer = Rails.application.config.openshift[:default_node_df_buffer].to_f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant to_f

@sallyom sallyom force-pushed the makeNodeBufferConfigurable branch from 7e08d1d to 9425b79 Compare July 29, 2016 20:55
@openshift-bot
Copy link

Evaluated for online test up to 9425b79

@openshift-bot
Copy link

@abhgupta
Copy link
Member

[merge]

@openshift-bot
Copy link

Evaluated for online merge up to 9425b79

@openshift-bot openshift-bot merged commit 4a6b4ef into openshift:master Jul 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants