Fix check in rpc_get_fact{,s}_direct

Fix the parentheses in a check in rpc_get_fact_direct and
rpc_get_facts_direct.

In Ruby, 'defined? a && b' is grouped not as '(defined? a) && b' but
rather as 'defined? (a && b)', so the non-parenthesised form will always
return non-nil (specifically, the string "expression") without checking
the operand b.  (The foregoing describes the behaviour in Ruby 1.9; Ruby
1.8 returns "expression" as long as the operand a is defined.)
oo-accept-broker, oo-register-dns: unauth'd DNS

oo-accept-broker: Use the same logic as the openshift-origin-dns-nsupdate
plug-in to determine which authentication mechanism is used, and correctly
test DNS using unauthenticated updates if the plug-in is so configured.

oo-register-dns: Attempt an unauthenticated update if the user does not
indicate to use Kerberos or a keyfile and there is no keyfile at the
default location.
Bug 1014768 - the previous logic could not properly distinguish usernames that begin with numbers and called Etc.getpwnam too often.
Merge pull request #3771 from rmillner/BZ1014768

Merged by openshift-bot
Bug 1014768 - Audit additional uses of password calls.
Merge pull request #3774 from rmillner/BZ1014768

Merged by openshift-bot
Build & deployment improvements

Add support for OPENSHIFT_AUTO_DEPLOY to enable/disable automatic
deployments after building

Add support for OPENSHIFT_DEPLOYMENT_TYPE - disallow git push if set
to binary

Add support for deploying branches other than master

Add "gear deploy <mybranch>"

Add support for preserving previous deployments (to support rollback)

Switch to using date/time based deployment directories

Add initial support for 'gear prepare FILE'

Add support for distributing a deployment to child gears

Add creation of app-deployments and app-archives directories to app
setup

Add 'activate' deployment action

Add writing of deployment metadata w/deployment id and state

Add support for app-dependencies to be unique per deployment

Update cartridges to support app-root/runtime/dependencies

Add deployment rollback support

Add PathUtils#oo_lchown to change symlink ownership of repo and
dependencies symlinks

Add old deployment directory pruning

Reduce list of dirs to sync in sdk#sync_gear_repos

Add copying of dependencies between deployments (to save on build
time) unless force_clean_build is specified

Move app dependencies from the previous deployment to the new build and
delete the previous deployment prior to performing the new build if the
app isn't configured to allow rollbacks (thus avoiding having 2 copies
of the dependencies and repo for a brief period of time)

Move the haproxy cartridge's gear registry to the runtime
platform

Add oo-ssh to use for rsync/ssh as the gear user

Add "primary" endpoint option that indicates that the endpoint should
be load balanced if the app is scalable (along with
OPENSHIFT_LOAD_BALANCER_PORT env var)

Add initial functional tests for build & deployment improvements

Add basic scaling test that:
- creates an app
- validates the gear registry contents
- verifies the <title> retrieved from /
- scales up to 2
- verifies <title> from both gears
- modifies the <title> and pushes the change
- verifies <title> was updated on both gears
- scales to 3
- verifies <title> is still updated on all 3
- issues rollback
- verifies <title> matches rolled back version

Update all jenkins shell command files to create deployment dirs and
sync the repo and dependencies back to the upstream gear

Add "gear archive" command to create binary artifact from current
deployment on a gear

Add primary:true option to 8080 endpoint for scalable carts

Don't stop/start web proxy cart during pre-receive, activation

Use the current deployment dir instead of creating a new one if
hot_deploy is enabled

Don't stop the web proxy cart on rollback

Add 'gear deployments' command
Add support for enabling/disabling backend servers in haproxy configuration.

Add socat dependency.

Add support for enabling/disabling multiple servers using gear uuids.

Conflicts:
	cartridges/openshift-origin-cartridge-haproxy/bin/control
Broker Build and Deployment
Use OPENSHIFT_DEPENDENCIES_DIR in jenkins_shell_command for php

Fixes for nodejs
Fixes for python versions

Conflicts:
	cartridges/openshift-origin-cartridge-python/usr/versions/shared/bin/install

Create build dependencies dir
Jbossas changes for build dependencies
jenkins_shell_command template + delete cartridge scripts
Use build-dependencies dir for jboss carts
Build & deployment improvements

Move cluster/proxy management operations to the platform

Cartridges no longer need to publish NET_TCP:httpd-proxy-info or
NET_TCP:gear-endpoint-info as the platform now calls the web proxy
cartridge's new 'update-cluster' control method.
Generalize scaling functional test
Delete all applications in domain (including jenkins builders)
Add primary option to main jbossas endpoint
Build & deployment improvements

Add support for graceful restarts (disable gear in web proxy during
deploy, re-enable after deploy)

Redirect socat output to /dev/null to avoid printing a blank line to
the client
Build & deployment improvements

Modifications to rollback:
- Ability to go back to a specific deployment id (if specified),
or the previous deployment if not.
- Don't delete deployments any more
- Don't stop the gear any more (the internal call to activate will do
that)
Add --exclude-web-proxy option to gear stop command
Update jenkins_shell_command template to call gear stop --conditional --exclude-web-proxy
Update scaling functional test
poor-man's test parameterization
Add persistance support to enable/disable server.
WIP support for multiple web proxies

Create the gear registry when creating the cartridge directory on the
gear, otherwise we get permission denied trying to create the file in
update_cluster

Only rsync app-deployments and activate the current deployment on new
gears if we're the currently elected "master"
Fix unit tests