GitHub PullRequestReviewCommentEvent at 2014-04-28 19:27:12
Repository: openshift-extras
Actor: detiber
Payload: {"comment":{"url":"https://api.github.com/repos/openshift/openshift-extras/pulls/comments/12063107","id":12063107,"diff_hunk":"@@ -3050,12 +3093,110 @@ configure_openshift()\n   echo \"OpenShift: Completed configuring OpenShift.\"\n }\n \n+restart_services()\n+{\n+  echo \"OpenShift: Begin restarting services.\"\n+  # named is already started in configure_named.\n+  named && service named restart\n+\n+  # mongod is already started in configure_datastore.\n+  node && service cgconfig restart\n+  node && service cgred restart\n+  service network restart\n+  { node || broker; } && service sshd restart\n+  service ntpd restart\n+  node && service messagebus restart\n+  node && service ruby193-mcollective stop\n+  activemq && service activemq restart\n+  node && service ruby193-mcollective start\n+  { node || broker; } && service httpd restart\n+  broker && service openshift-broker restart\n+  broker && service openshift-console restart\n+  node && service oddjobd restart\n+  node && service openshift-iptables-port-proxy restart\n+  node && service openshift-node-web-proxy restart\n+\n+  # ensure openshift facts are updated\n+  node && /etc/cron.minutely/openshift-facts\n+\n+  echo \"OpenShift: Completed restarting services.\"\n+}\n+\n+run_diagnostics()\n+{\n+  echo \"OpenShift: Begin running oo-diagnostics.\"\n+  # prepending the output of oo-diagnostics breaks the ansi color coding\n+  # remove all ansi escape sequences from oo-diagnostics output\n+  oo-diagnostics 2>&1 | sed -u -e 's/\\x1B\\[[0-9;]*[JKmsu]//g' -e 's/^/OpenShift: oo-diagnostics output - /g'\n+  echo \"OpenShift: Completed running oo-diagnostics.\"\n+}\n+\n reboot_after()\n {\n   echo \"OpenShift: Rebooting after install.\"\n   reboot\n }\n \n+configure_districts()\n+{\n+  echo \"OpenShift: Configuring districts.\"\n+\n+  if is_true \"$conf_default_districts\"; then\n+    IFS=','\n+    for p in $conf_valid_gear_sizes; do\n+      oo-admin-ctl-district -p $p -n default-${p} -c add-node --available | sed -e 's/^\\(Error\\)/OpenShift: oo-admin-ctl-district - \\1/g'\n+    done\n+    unset IFS\n+  else\n+    IFS=';'\n+    for mapping in $district_mappings; do\n+      district=$(echo $mapping | awk -F\":\" '{print $1}')\n+      nodes=$(echo $mapping | awk -F\":\" '{print $2}')\n+      OIFS=$IFS\n+      IFS=','\n+      for n in $nodes; do\n+        # query the node for the node profile via mcollective\n+        profile=\"\"\n+        for i in `seq 1 10`; do\n+          reply=$(oo-mco rpc rpcutil get_fact fact=node_profile -S\"public_hostname=${n}\")\n+          value=$(echo $reply | grep 'Value: ')\n+          if [ $? -eq 0 ]; then\n+            profile=$(echo $value | awk -F': ' '{print $2}')\n+            break;\n+          fi\n+          sleep 10\n+        done\n+        if [ \"x$profile\" != \"x\" ]; then\n+          echo \"OpenShift: Adding node: $n with profile: $profile to district: $district.\"\n+          oo-admin-ctl-district -p $profile -n $district -c add-node -i $n | sed -e 's/^\\(Error\\)/OpenShift: oo-admin-ctl-district - \\1/g'","path":"enterprise/install-scripts/generic/openshift.sh","position":200,"original_position":200,"commit_id":"f03a7d93d0a26314216911b21fe341f352e2996f","original_commit_id":"f03a7d93d0a26314216911b21fe341f352e2996f","user":{"login":"detiber","id":915544,"avatar_url":"https://avatars.githubusercontent.com/u/915544?","gravatar_id":"811cd04d3526babe780ddb2a474116d7","url":"https://api.github.com/users/detiber","html_url":"https://github.com/detiber","followers_url":"https://api.github.com/users/detiber/followers","following_url":"https://api.github.com/users/detiber/following{/other_user}","gists_url":"https://api.github.com/users/detiber/gists{/gist_id}","starred_url":"https://api.github.com/users/detiber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/detiber/subscriptions","organizations_url":"https://api.github.com/users/detiber/orgs","repos_url":"https://api.github.com/users/detiber/repos","events_url":"https://api.github.com/users/detiber/events{/privacy}","received_events_url":"https://api.github.com/users/detiber/received_events","type":"User","site_admin":false},"body":"agreed, working up a change.","created_at":"2014-04-28T19:27:12Z","updated_at":"2014-04-28T19:27:12Z","html_url":"https://github.com/openshift/openshift-extras/pull/333#discussion_r12063107","pull_request_url":"https://api.github.com/repos/openshift/openshift-extras/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-extras/pulls/comments/12063107"},"html":{"href":"https://github.com/openshift/openshift-extras/pull/333#discussion_r12063107"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-extras/pulls/333"}}}}