)]}'
{"ceph-osd/templates/bin/_post-apply.sh.tpl":[{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":": \"${ADMIN_KEYRING:\u003d/etc/ceph/${CLUSTER}.client.admin.keyring}\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if [[ ! -e /etc/ceph/${CLUSTER}.conf ]]; then"},{"line_number":24,"context_line":"  echo \"ERROR- /etc/ceph/${CLUSTER}.conf must exist; get it from your existing mon\""},{"line_number":25,"context_line":"  exit 1"},{"line_number":26,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_3d5f7be6","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":10},"updated":"2020-05-08 20:42:39.000000000","message":"Would -f be better here? The only difference being if a /etc/ceph/${CLUSTER}.conf directory happens to exist this check will pass where it should probably fail.","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"5eb5c96cb23aee2f17c28db0ab2648f7dde90d62","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":": \"${ADMIN_KEYRING:\u003d/etc/ceph/${CLUSTER}.client.admin.keyring}\""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"if [[ ! -e /etc/ceph/${CLUSTER}.conf ]]; then"},{"line_number":24,"context_line":"  echo \"ERROR- /etc/ceph/${CLUSTER}.conf must exist; get it from your existing mon\""},{"line_number":25,"context_line":"  exit 1"},{"line_number":26,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_858e132c","line":23,"range":{"start_line":23,"start_character":8,"end_line":23,"end_character":10},"in_reply_to":"ff570b3c_3d5f7be6","updated":"2020-05-11 15:26:05.000000000","message":"Done","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  exit 1"},{"line_number":26,"context_line":"fi"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"if [[ ! -e ${ADMIN_KEYRING} ]]; then"},{"line_number":29,"context_line":"   echo \"ERROR- ${ADMIN_KEYRING} must exist; get it from your existing mon\""},{"line_number":30,"context_line":"   exit 1"},{"line_number":31,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_1d6437b9","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":10},"updated":"2020-05-08 20:42:39.000000000","message":"Same as above","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"5eb5c96cb23aee2f17c28db0ab2648f7dde90d62","unresolved":false,"context_lines":[{"line_number":25,"context_line":"  exit 1"},{"line_number":26,"context_line":"fi"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"if [[ ! -e ${ADMIN_KEYRING} ]]; then"},{"line_number":29,"context_line":"   echo \"ERROR- ${ADMIN_KEYRING} must exist; get it from your existing mon\""},{"line_number":30,"context_line":"   exit 1"},{"line_number":31,"context_line":"fi"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_e5838f03","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":10},"in_reply_to":"ff570b3c_1d6437b9","updated":"2020-05-11 15:26:05.000000000","message":"Done","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  end\u003d$(date +%s)"},{"line_number":36,"context_line":"  timeout\u003d${2:-900}"},{"line_number":37,"context_line":"  end\u003d$((end + timeout))"},{"line_number":38,"context_line":"  while true; do"},{"line_number":39,"context_line":"      kubectl get pods --namespace\u003d$1 -l component\u003dosd -o json | jq -r \\"},{"line_number":40,"context_line":"          \u0027.items[].status.phase\u0027 | grep Pending \u003e /dev/null \u0026\u0026 \\"},{"line_number":41,"context_line":"          PENDING\u003d\"True\" || PENDING\u003d\"False\""}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_9dc7a746","line":38,"range":{"start_line":38,"start_character":2,"end_line":38,"end_character":12},"updated":"2020-05-08 20:42:39.000000000","message":"Nit - \u0027while [ $now -le $end ]\u0027 and move the if block outside of the loop? Functionally identical but maybe slightly more readable.\n\nI don\u0027t feel strongly about this if you want to leave it alone.","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":70,"context_line":"function check_ds() {"},{"line_number":71,"context_line":" for ds in `kubectl get ds --namespace\u003d$CEPH_NAMESPACE -l component\u003dosd --no-headers\u003dtrue|awk \u0027{print $1}\u0027`"},{"line_number":72,"context_line":" do"},{"line_number":73,"context_line":"   if kubectl get ds $ds -n $CEPH_NAMESPACE -o json|jq -r .status|grep -i \"numberAvailable\" ;then"},{"line_number":74,"context_line":"     currentNumberScheduled\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.currentNumberScheduled`"},{"line_number":75,"context_line":"     desiredNumberScheduled\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.desiredNumberScheduled`"},{"line_number":76,"context_line":"     numberAvailable\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.numberAvailable`"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_1d18b7d1","line":73,"range":{"start_line":73,"start_character":6,"end_line":73,"end_character":51},"updated":"2020-05-08 20:42:39.000000000","message":"Why not call kubectl once, save the output to a variable, then extract all of these values from the string variable instead of calling kubectl repeatedly?","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"5eb5c96cb23aee2f17c28db0ab2648f7dde90d62","unresolved":false,"context_lines":[{"line_number":70,"context_line":"function check_ds() {"},{"line_number":71,"context_line":" for ds in `kubectl get ds --namespace\u003d$CEPH_NAMESPACE -l component\u003dosd --no-headers\u003dtrue|awk \u0027{print $1}\u0027`"},{"line_number":72,"context_line":" do"},{"line_number":73,"context_line":"   if kubectl get ds $ds -n $CEPH_NAMESPACE -o json|jq -r .status|grep -i \"numberAvailable\" ;then"},{"line_number":74,"context_line":"     currentNumberScheduled\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.currentNumberScheduled`"},{"line_number":75,"context_line":"     desiredNumberScheduled\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.desiredNumberScheduled`"},{"line_number":76,"context_line":"     numberAvailable\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status.numberAvailable`"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_4574fb35","line":73,"range":{"start_line":73,"start_character":6,"end_line":73,"end_character":51},"in_reply_to":"ff570b3c_1d18b7d1","updated":"2020-05-11 15:26:05.000000000","message":"done ,  than you for suggestion.","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"  # Loop until all pgs are active"},{"line_number":97,"context_line":"  if [[ $(ceph tell mon.* version | egrep -q \"nautilus\"; echo $?) -eq 0 ]]; then"},{"line_number":98,"context_line":"    while [[ `ceph --cluster ${CLUSTER} pg ls | tail -n +2 | head -n -2 | grep -v \"active+\"` ]]"},{"line_number":99,"context_line":"    do"},{"line_number":100,"context_line":"      sleep 3"},{"line_number":101,"context_line":"      ceph -s"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_fd2063fa","line":98,"range":{"start_line":98,"start_character":14,"end_line":98,"end_character":91},"updated":"2020-05-08 20:42:39.000000000","message":"Since these loop bodies are the same, why not save the command in a variable and execute it in a single while loop?","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"ce36076855dff9f284442fda60f77dec3f2bb0a3","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  echo \"Racks under ceph cluster are: $racks\""},{"line_number":127,"context_line":"  for rack in $racks"},{"line_number":128,"context_line":"  do"},{"line_number":129,"context_line":"     hosts_in_rack\u003d`ceph osd tree | sed -n \"/rack $rack/,/rack/p\" | awk \u0027/host/{print $4}\u0027 | tr \u0027\\n\u0027 \u0027 \u0027|sed \u0027s/ *$//g\u0027`"},{"line_number":130,"context_line":"     echo \"hosts under rack \"$rack\" are: $hosts_in_rack\""},{"line_number":131,"context_line":"     hosts_count\u003d`echo $(IFS\u003d\u0027 \u0027; set -f; set -- $hosts_in_rack; echo $#)`"},{"line_number":132,"context_line":"     echo \"hosts count under $rack are: $hosts_count\""},{"line_number":133,"context_line":"     for host in $hosts_in_rack"},{"line_number":134,"context_line":"     do"},{"line_number":135,"context_line":"       echo \"host is : $host\""},{"line_number":136,"context_line":"       if [[ ! -z \"$host\" ]]; then"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_fde343a3","line":133,"range":{"start_line":129,"start_character":5,"end_line":133,"end_character":31},"updated":"2020-05-08 20:42:39.000000000","message":"Nit - This can be simplified slightly with an array:\n\nhosts_in_rack\u003d(`ceph osd tree | sed -n \"/rack $rack/,/rack/p\" | awk \u0027/host/{print $4}\u0027 | tr \u0027\\n\u0027 \u0027 \u0027|sed \u0027s/ *$//g\u0027`)\necho \"hosts under rack \"$rack\" are: ${hosts_in_rack[@]}\"\necho \"hosts count under $rack are: ${#hosts_in_rack[@]}\"\nfor host in ${hosts_in_rack[@]}","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"5eb5c96cb23aee2f17c28db0ab2648f7dde90d62","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  echo \"Racks under ceph cluster are: $racks\""},{"line_number":127,"context_line":"  for rack in $racks"},{"line_number":128,"context_line":"  do"},{"line_number":129,"context_line":"     hosts_in_rack\u003d`ceph osd tree | sed -n \"/rack $rack/,/rack/p\" | awk \u0027/host/{print $4}\u0027 | tr \u0027\\n\u0027 \u0027 \u0027|sed \u0027s/ *$//g\u0027`"},{"line_number":130,"context_line":"     echo \"hosts under rack \"$rack\" are: $hosts_in_rack\""},{"line_number":131,"context_line":"     hosts_count\u003d`echo $(IFS\u003d\u0027 \u0027; set -f; set -- $hosts_in_rack; echo $#)`"},{"line_number":132,"context_line":"     echo \"hosts count under $rack are: $hosts_count\""},{"line_number":133,"context_line":"     for host in $hosts_in_rack"},{"line_number":134,"context_line":"     do"},{"line_number":135,"context_line":"       echo \"host is : $host\""},{"line_number":136,"context_line":"       if [[ ! -z \"$host\" ]]; then"}],"source_content_type":"text/x-smarty","patch_set":36,"id":"ff570b3c_e598af6b","line":133,"range":{"start_line":129,"start_character":5,"end_line":133,"end_character":31},"in_reply_to":"ff570b3c_fde343a3","updated":"2020-05-11 15:26:05.000000000","message":"done , thank you","commit_id":"e6b571dd0f9e56d51bc296d69b98479afa7a60a9"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"d19737b31cee5bacef029b804e1c8b318fe0fce1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"function check_ds() {"},{"line_number":71,"context_line":" for ds in `kubectl get ds --namespace\u003d$CEPH_NAMESPACE -l component\u003dosd --no-headers\u003dtrue|awk \u0027{print $1}\u0027`"},{"line_number":72,"context_line":" do"},{"line_number":73,"context_line":"   if kubectl get ds $ds -n $CEPH_NAMESPACE -o json|jq -r .status|grep -i \"numberAvailable\" ;then"},{"line_number":74,"context_line":"     ds_query\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status`"},{"line_number":75,"context_line":"     currentNumberScheduled\u003d`echo $ds_query|jq -r .currentNumberScheduled`"},{"line_number":76,"context_line":"     desiredNumberScheduled\u003d`echo $ds_query|jq -r .desiredNumberScheduled`"},{"line_number":77,"context_line":"     numberAvailable\u003d`echo $ds_query|jq -r .numberAvailable`"}],"source_content_type":"text/x-smarty","patch_set":38,"id":"ff570b3c_7ce39534","line":74,"range":{"start_line":73,"start_character":0,"end_line":74,"end_character":75},"updated":"2020-05-11 21:34:06.000000000","message":"ds_query\u003d`kubectl get ds -n $CEPH_NAMESPACE $ds -o json|jq -r .status`\nif echo $ds_query|grep -i \"numberAvailable\" ;then","commit_id":"a61209b8fdeaca3be0a13e24c002d5387f81d5e6"},{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"a80f912efc289e3e7dfe0bb25840b79aadf56513","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"{{/*"},{"line_number":4,"context_line":"Copyright 2020 The Openstack-Helm Authors."},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":7,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-smarty","patch_set":41,"id":"ff570b3c_df0a7a88","line":4,"range":{"start_line":4,"start_character":0,"end_line":4,"end_character":42},"updated":"2020-05-12 18:57:43.000000000","message":"Remove this, there\u0027s wip to remove these meaningless copyrights from OSH.\n\nhttps://review.opendev.org/#/c/710844/","commit_id":"63ce10aa64a659f9497d7da5557aa842bf4af148"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"ccc6ebb1bd814d61cbcbb8828426da8fa586ddd6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/bash"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"{{/*"},{"line_number":4,"context_line":"Copyright 2020 The Openstack-Helm Authors."},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":7,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-smarty","patch_set":41,"id":"ff570b3c_da660852","line":4,"range":{"start_line":4,"start_character":0,"end_line":4,"end_character":42},"in_reply_to":"ff570b3c_df0a7a88","updated":"2020-05-12 19:49:02.000000000","message":"Done","commit_id":"63ce10aa64a659f9497d7da5557aa842bf4af148"}],"ceph-osd/templates/job-post-apply.yaml":[{"author":{"_account_id":21420,"name":"Gage Hugo","email":"gagehugo@gmail.com","username":"ghugo"},"change_message_id":"a80f912efc289e3e7dfe0bb25840b79aadf56513","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{/*"},{"line_number":2,"context_line":"Copyright 2020 The Openstack-Helm Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-yaml","patch_set":41,"id":"ff570b3c_7ff9ae7e","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":42},"updated":"2020-05-12 18:57:43.000000000","message":"Ditto","commit_id":"63ce10aa64a659f9497d7da5557aa842bf4af148"},{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"ccc6ebb1bd814d61cbcbb8828426da8fa586ddd6","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{/*"},{"line_number":2,"context_line":"Copyright 2020 The Openstack-Helm Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."}],"source_content_type":"text/x-yaml","patch_set":41,"id":"ff570b3c_3a5c647d","line":2,"range":{"start_line":2,"start_character":0,"end_line":2,"end_character":42},"in_reply_to":"ff570b3c_7ff9ae7e","updated":"2020-05-12 19:49:02.000000000","message":"Done","commit_id":"63ce10aa64a659f9497d7da5557aa842bf4af148"}]}
