openshift / origin-server

OpenShift 2 (deprecated)
888 stars 516 forks source link

rsync_destination_container: Fix free space check #6408

Closed Miciah closed 8 years ago

Miciah commented 8 years ago

Use correct arithmetic when checking that the destination node has enough free space before copying a gear: the remaining space after the copying the gear should be greater than 5% (not less), and the arithmetic must be performed using floating point arithmetic (not integer).

This commit is related https://github.com/openshift/origin-server/pull/6382.

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

@sallyom, @a13m, we are all implicated in this PR by our involvement in https://github.com/openshift/origin-server/pull/6382.

openshift-bot commented 8 years ago

Evaluated for online test up to 6f67477ff004f850f4b6baebe8a4352ed1bd289c

Miciah commented 8 years ago

The concern in this PR and in https://github.com/openshift/origin-server/pull/6382 is that we do not want to move a gear to a node when doing so will increase the node's storage usage to 95% or more of available storage. @abhgupta raises two concerns: (1) We should make this 95% number configurable, and (2) we may want to apply a similar restriction when the system administrator uses oo-admin-move without specifying a node, or when the platform is placing a new gear. For (2), we would need to specify this as a criterion in the find_available method. The difficulty there would be that we would not know the size of the gear in find_available (in the case of a new gear, the size cannot be known), so we would need to determine some reasonable fixed amount of space (for example, filter out nodes with less than 500 MiB of space available).

openshift-bot commented 8 years ago

Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/9349/) (Extended Tests: node)

Miciah commented 8 years ago

openshift-bot, please [merge]!

openshift-bot commented 8 years ago

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

openshift-bot commented 8 years ago

Evaluated for online merge up to 6f67477ff004f850f4b6baebe8a4352ed1bd289c