Skip to content

Instantly share code, notes, and snippets.

View ncdc's full-sized avatar

Andy Goldstein ncdc

View GitHub Profile
The initial build for the application failed: Shell command '/sbin/runuser -s /bin/sh 527128038fa2f61ad400008f -c "exec /usr/bin/runcon
'unconfined_u:system_r:openshift_t:s0:c0,c1002' /bin/sh -c \"gear prereceive --first-time >> /tmp/initial-build.log 2>&1\""' returned an error.
rc=255
.Last 10 kB of build output:
fatal: Not a valid object name .openshift/markers/force_clean_build
undefined method `values' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/user_interaction.rb:237:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.8/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb:1473:in
`update_proxy_status'
Failed to execute: 'control update-cluster' for /var/lib/openshift/5270b29b6cec0e97d200030b/haproxy
/opt/rh/ruby193/root/usr/share/gems/gems/safe_yaml-0.9.1/lib/safe_yaml.rb:181:in `initialize': Permission denied - /var/lib/openshift/5270b29b6cec0e97d200030b/ruby/metadata/manifest.yml (Errno::EACCES)
from /opt/rh/ruby193/root/usr/share/gems/gems/safe_yaml-0.9.1/lib/safe_yaml.rb:181:in `open'
from /opt/rh/ruby193/root/usr/share/gems/gems/safe_yaml-0.9.1/lib/safe_yaml.rb:181:in `safe_load_file'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-common-1.16.2/lib/openshift-origin-common/models/manifest.rb:217:in `initialize'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.8/lib/openshift-origin-node/model/v2_cart_model.rb:168:in `new'
from /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.16.8/lib/openshift-origin-node/model/v2_cart_model.rb:168:in `get_cartridge_from_directory'
from /opt/rh/ruby193/root/usr/shar
@ncdc
ncdc / gist:7242377
Last active December 27, 2015 01:08
diff --git a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb b/node/lib/openshift-origin-node/model/application_
index bd272cf..5d054fe 100644
--- a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
+++ b/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
@@ -1307,7 +1307,15 @@ module OpenShift
end
args = generate_update_cluster_control_args(updated_entries)
- @cartridge_model.do_control('update-cluster', proxy_cart, args: args)
+ begin
October 30 20:37:08 INFO 5271a59635ff0bef89000005 update-cluster against 'haproxy'
October 30 20:37:09 INFO Shell command '/sbin/runuser -s /bin/sh 5271a59635ff0bef89000005 -c "exec /usr/bin/runcon 'unconfined_u:system_r:openshift_
t:s0:c0,c1000' /bin/sh -c \"set -e; /var/lib/openshift/5271a59635ff0bef89000005/haproxy/bin/control update-cluster ps-agoldste.dev.rhcloud.com\|ec2-
184-73-89-100.compute-1.amazonaws.com:38031\ 83f3648e41c411e3abd512313d0405dc-agoldste.dev.rhcloud.com\|ec2-184-73-89-100.compute-1.amazonaws.com:38
036\""' ran. rc=1 out=
October 30 20:37:09 INFO BZ1025043: Gear 5271a59635ff0bef89000005 - got exception running update-cluster for the proxy: Failed to execute: 'control
update-cluster' for /var/lib/openshift/5271a59635ff0bef89000005/haproxy
October 30 20:37:09 INFO BZ1025043: Gear 5271a59635ff0bef89000005 - directory listing of primary cartridge directory:
October 30 20:37:09 INFO Shell command 'ls -laZ /var/lib/openshift/5271a59635ff0bef89000005/php//metadata' ran. rc=0 out=drwxr-xr-x.
$ git diff
diff --git a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb b/node/lib/openshift-origin-node/model/application_
index 5d054fe..3e04fee 100644
--- a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
+++ b/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
@@ -704,31 +704,24 @@ module OpenShift
# if it's a new gear via scale-up, force hot_deploy to false
options[:hot_deploy] = false if options[:post_install]
- parallel_results = with_gear_rotation(options) do |target_gear, local_gear_env, options|
diff --git a/cartridges/openshift-origin-cartridge-haproxy/bin/control b/cartridges/openshift-origin-cartridge-haproxy/bin/control
index 8b8395d..63998a7 100755
--- a/cartridges/openshift-origin-cartridge-haproxy/bin/control
+++ b/cartridges/openshift-origin-cartridge-haproxy/bin/control
@@ -246,12 +246,6 @@ function enable-server() {
echo "Enabling server $gear"
if [ "${gear}" == "${OPENSHIFT_GEAR_UUID}" ]; then
gearid="local-gear"
- info=($(app_web_to_proxy_ratio_and_colocated_gears))
- ratio=${info[0]}
@ncdc
ncdc / gist:7270125
Last active December 27, 2015 04:49
$ git diff
diff --git a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb b/node/lib/openshift-origin-node/model/application_container_ext/cartridge_acti
index 57f4cd4..9dded00 100644
--- a/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
+++ b/node/lib/openshift-origin-node/model/application_container_ext/cartridge_actions.rb
@@ -249,66 +249,91 @@ module OpenShift
end
#
- # Handles the binary artifact deployment inside of the head gear from a downloadable url
@ncdc
ncdc / gist:7321561
Last active December 27, 2015 11:49
diff --git a/node/misc/bin/oo-iptables-port-proxy b/node/misc/bin/oo-iptables-port-proxy
index 02e9d7d..e22bc63 100755
--- a/node/misc/bin/oo-iptables-port-proxy
+++ b/node/misc/bin/oo-iptables-port-proxy
@@ -16,13 +16,14 @@ function getaddr() {
# Fix up the IP Address in the config if the assigned node IP Address has changed.
function fixaddr() {
- cfg_addr=$(tail -n 2 $nat_rules_file | head -n 1 | awk '{ print $4 }')
baddr=$(getaddr)
diff --git a/node/lib/openshift-origin-node/model/application_repository.rb b/node/lib/openshift-origin-node/model/application_repository.rb
index 4c80eb8..851c5ea 100644
--- a/node/lib/openshift-origin-node/model/application_repository.rb
+++ b/node/lib/openshift-origin-node/model/application_repository.rb
@@ -47,9 +47,7 @@ module OpenShift
# Returns +true+ if the given +filename+ exists in the tree for the git ref +ref+
# of the repository, otherwise +false+.
def file_exists?(filename, ref)
- Dir.chdir(@path) do
- return (not `git ls-tree #{ref} -- #{filename}`.chomp.strip.empty?)
[root@ip-10-116-75-32 p]# rhc deployments
10:08 AM, deployment 5dc8e08e
[root@ip-10-116-75-32 p]# rhc show deployment 5dc8e08e
Usage: rhc deployment-show <deployment_id> --app NAME [--namespace NAME]
Display details of the given deployment id.
Options