)]}'
{"ceph-client/templates/bin/_helm-tests.sh.tpl":[{"author":{"_account_id":28372,"name":"chinasubbareddy mallavarapu","email":"cr3938@att.com","username":"chinasubbareddy"},"change_message_id":"bd406574307fe436e5e517ad855813ff148bb3d2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  ceph_status_output\u003d$(ceph -s -f json | jq -r \u0027.health\u0027)"},{"line_number":22,"context_line":"  ceph_health_status\u003d$(echo $ceph_status_output | jq -r \u0027.status\u0027)"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"  if [ \"x${ceph_health_status}\" \u003d\u003d \"xHEALTH_OK\" ]; then"},{"line_number":25,"context_line":"    echo \"Ceph status is HEALTH_OK\""},{"line_number":26,"context_line":"  else"},{"line_number":27,"context_line":"    echo \"Ceph cluster status is NOT HEALTH_OK.\""}],"source_content_type":"text/x-smarty","patch_set":1,"id":"9f560f44_917d991e","line":24,"range":{"start_line":24,"start_character":1,"end_line":24,"end_character":55},"updated":"2020-07-29 00:14:36.000000000","message":"when we setup flags like \"noup\", it will be in warning state right ? shall we handle it here ?","commit_id":"f58e8012365329ef706c6a03f32dd1aca53f5b9f"},{"author":{"_account_id":17119,"name":"Dmitrii Kabanov","email":"dmitrii.kabanov@att.com","username":"dk370c"},"change_message_id":"02713257848d19ba967fe0edf0a8915b384f66c4","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    echo \"Ceph cluster status is not HEALTH_OK, checking PG states\""},{"line_number":28,"context_line":"    retries\u003d0"},{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"active+\") ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"peering\") ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"}],"source_content_type":"text/x-smarty","patch_set":6,"id":"9f560f44_fe92b94a","line":30,"range":{"start_line":30,"start_character":15,"end_line":30,"end_character":75},"updated":"2020-07-30 20:06:44.000000000","message":"Please, consider to use jq. For instance:\nceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | startswith(\"active+\") | not)\u0027","commit_id":"8361930c3c972438ab239eb942746c36e43a2c0a"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"cc67860222cbb06deb9071d2365fec916ddad801","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    echo \"Ceph cluster status is not HEALTH_OK, checking PG states\""},{"line_number":28,"context_line":"    retries\u003d0"},{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"active+\") ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"peering\") ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"}],"source_content_type":"text/x-smarty","patch_set":6,"id":"9f560f44_410dca35","line":30,"range":{"start_line":30,"start_character":15,"end_line":30,"end_character":75},"in_reply_to":"9f560f44_fe92b94a","updated":"2020-07-30 20:26:39.000000000","message":"Is there a benefit to using jq? I don\u0027t have any problem switching if there\u0027s a reason, but grep is simpler to read and works fine.","commit_id":"8361930c3c972438ab239eb942746c36e43a2c0a"},{"author":{"_account_id":17119,"name":"Dmitrii Kabanov","email":"dmitrii.kabanov@att.com","username":"dk370c"},"change_message_id":"02713257848d19ba967fe0edf0a8915b384f66c4","unresolved":false,"context_lines":[{"line_number":37,"context_line":"      sleep 3"},{"line_number":38,"context_line":"      ((retries\u003dretries+1))"},{"line_number":39,"context_line":"    done"},{"line_number":40,"context_line":"    # If peering PGs haven\u0027t gone active after 5 minutes, fail"},{"line_number":41,"context_line":"    if [[ retries -ge 60 ]]; then"},{"line_number":42,"context_line":"      echo \"PGs appear to be stuck peering\""},{"line_number":43,"context_line":"      exit 1"}],"source_content_type":"text/x-smarty","patch_set":6,"id":"9f560f44_bb2a138d","line":40,"range":{"start_line":40,"start_character":41,"end_line":40,"end_character":56},"updated":"2020-07-30 20:06:44.000000000","message":"3 seconds (sleep) * 60 retries !\u003d 5 minutes.\nBTW, you can use \"date\". For instance:\ntimeout\u003d180\nendtime\u003d$(date -ud \"${timeout} seconds\" +%s)\n...\nwhile [ $endtime -gt $(date -u +%s) ]; do\n...\ndone","commit_id":"8361930c3c972438ab239eb942746c36e43a2c0a"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"cc67860222cbb06deb9071d2365fec916ddad801","unresolved":false,"context_lines":[{"line_number":37,"context_line":"      sleep 3"},{"line_number":38,"context_line":"      ((retries\u003dretries+1))"},{"line_number":39,"context_line":"    done"},{"line_number":40,"context_line":"    # If peering PGs haven\u0027t gone active after 5 minutes, fail"},{"line_number":41,"context_line":"    if [[ retries -ge 60 ]]; then"},{"line_number":42,"context_line":"      echo \"PGs appear to be stuck peering\""},{"line_number":43,"context_line":"      exit 1"}],"source_content_type":"text/x-smarty","patch_set":6,"id":"9f560f44_61f44ef3","line":40,"range":{"start_line":40,"start_character":41,"end_line":40,"end_character":56},"in_reply_to":"9f560f44_bb2a138d","updated":"2020-07-30 20:26:39.000000000","message":"Sorry, forgot to update the comment when I changed the retries from 100 as you suggested earlier. Comment updated.\n\nThis isn\u0027t meant to be exactly 3 minutes, but if there is a reason to make it exact I\u0027m happy to update it.","commit_id":"8361930c3c972438ab239eb942746c36e43a2c0a"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"eed5084357d7d160c3fe1241f748b6b89191a2f6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    echo \"Ceph cluster status is not HEALTH_OK, checking PG states\""},{"line_number":28,"context_line":"    retries\u003d0"},{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"active+\") ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"peering\") ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"9f560f44_01c0f24f","line":30,"range":{"start_line":30,"start_character":41,"end_line":30,"end_character":75},"updated":"2020-07-30 20:38:31.000000000","message":"why not use jq here?","commit_id":"f362b60630f7aaa99127ade8191017b24a4848ff"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"a215867f85ed2a592b0723434a2faf44c515f03a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    echo \"Ceph cluster status is not HEALTH_OK, checking PG states\""},{"line_number":28,"context_line":"    retries\u003d0"},{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"active+\") ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"peering\") ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"9f560f44_a17e6616","line":30,"range":{"start_line":30,"start_character":41,"end_line":30,"end_character":75},"in_reply_to":"9f560f44_01c0f24f","updated":"2020-07-30 20:41:08.000000000","message":"missed that this had been mentioned in a previous comment - jq is much more robust than grep - eg the above simply searches for a line where `state` is present and `active+` is not - rather than actually drilling into the key and value we are looking for.","commit_id":"f362b60630f7aaa99127ade8191017b24a4848ff"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"efc98516cff59f9afc30efaf96b844ce2a20235e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    echo \"Ceph cluster status is not HEALTH_OK, checking PG states\""},{"line_number":28,"context_line":"    retries\u003d0"},{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"active+\") ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json-pretty | grep \"state\" | grep -v \"peering\") ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"}],"source_content_type":"text/x-smarty","patch_set":7,"id":"9f560f44_a1fae671","line":30,"range":{"start_line":30,"start_character":41,"end_line":30,"end_character":75},"in_reply_to":"9f560f44_a17e6616","updated":"2020-07-30 20:45:05.000000000","message":"I understand that jq provides more capability that isn\u0027t needed here, but I can change it if everyone feels so strongly about it. :-) There is only 1 \"state\" line per PG in the output and finding anything in those lines that doesn\u0027t contain \"active+\" is exactly what I need here. But jq will also work. I can change it.","commit_id":"f362b60630f7aaa99127ade8191017b24a4848ff"},{"author":{"_account_id":17119,"name":"Dmitrii Kabanov","email":"dmitrii.kabanov@att.com","username":"dk370c"},"change_message_id":"1e2306202607a03416e4af53660483cc02d459ca","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") | not)\u0027) ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") or contains(\"peering\") | not)\u0027) ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"},{"line_number":34,"context_line":"        echo \"Failure, found inactive PGs that aren\u0027t peering\""},{"line_number":35,"context_line":"        exit 1"}],"source_content_type":"text/x-smarty","patch_set":11,"id":"9f560f44_75cd24b7","line":32,"range":{"start_line":32,"start_character":42,"end_line":32,"end_character":53},"updated":"2020-07-31 01:04:10.000000000","message":"Shall we take into account mimic release?","commit_id":"91cef447dc37eeb5b48c2647ddd2c104d00e1eea"},{"author":{"_account_id":17119,"name":"Dmitrii Kabanov","email":"dmitrii.kabanov@att.com","username":"dk370c"},"change_message_id":"af23c8d8d67b0c6c92337f205bae93add6c465e8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") | not)\u0027) ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") or contains(\"peering\") | not)\u0027) ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"},{"line_number":34,"context_line":"        echo \"Failure, found inactive PGs that aren\u0027t peering\""},{"line_number":35,"context_line":"        exit 1"}],"source_content_type":"text/x-smarty","patch_set":11,"id":"9f560f44_953c38c0","line":32,"range":{"start_line":32,"start_character":14,"end_line":32,"end_character":32},"updated":"2020-07-31 00:45:54.000000000","message":"We can avoid of execution of \"ceph pg ls\" second time by using the output of the first command.\nvariable\u003d$(ceph pg ls -f json | jq -c \u0027...\u0027)\njq -c \"...\" \u003c\u003c\u003c \"$variable\"\n\nPlease, take a look at the lines 62-65.","commit_id":"91cef447dc37eeb5b48c2647ddd2c104d00e1eea"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"39533eab04701e3a859a2bc4490ec9f629ca9d91","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") | not)\u0027) ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") or contains(\"peering\") | not)\u0027) ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"},{"line_number":34,"context_line":"        echo \"Failure, found inactive PGs that aren\u0027t peering\""},{"line_number":35,"context_line":"        exit 1"}],"source_content_type":"text/x-smarty","patch_set":11,"id":"9f560f44_21108401","line":32,"range":{"start_line":32,"start_character":42,"end_line":32,"end_character":53},"in_reply_to":"9f560f44_75cd24b7","updated":"2020-07-31 14:03:48.000000000","message":"You\u0027re right. This won\u0027t work with Mimic. The previous grep-based solution was compatible with both Mimic and Nautilus and I missed that when I made the change. That was one reason I did it that way originally.","commit_id":"91cef447dc37eeb5b48c2647ddd2c104d00e1eea"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"39533eab04701e3a859a2bc4490ec9f629ca9d91","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    # If all PGs are active, pass"},{"line_number":30,"context_line":"    while [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") | not)\u0027) ]] \u0026\u0026 [[ retries -lt 60 ]]; do"},{"line_number":31,"context_line":"      # If all inactive PGs are peering, wait for peering to complete"},{"line_number":32,"context_line":"      if [[ $(ceph pg ls -f json | jq -c \u0027.pg_stats[] | {s: .state} | select(.s | contains(\"active\") or contains(\"peering\") | not)\u0027) ]]; then"},{"line_number":33,"context_line":"        # If inactive PGs aren\u0027t peering, fail"},{"line_number":34,"context_line":"        echo \"Failure, found inactive PGs that aren\u0027t peering\""},{"line_number":35,"context_line":"        exit 1"}],"source_content_type":"text/x-smarty","patch_set":11,"id":"9f560f44_a155b4c8","line":32,"range":{"start_line":32,"start_character":14,"end_line":32,"end_character":32},"in_reply_to":"9f560f44_953c38c0","updated":"2020-07-31 14:03:48.000000000","message":"I actually did it this way intentionally to give the cluster an opportunity to change state before we fail the test if possible, but I can change it in the interest of getting this thing merged.","commit_id":"91cef447dc37eeb5b48c2647ddd2c104d00e1eea"}],"ceph-client/templates/bin/pool/_init.sh.tpl":[{"author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"change_message_id":"4828e4343af726d989742e158124ddce5d3cea0f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  echo \"### Start: Checking for flags that will prevent recovery\""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"  # Ensure there are no flags set that will prevent recovery of degraded PGs"},{"line_number":53,"context_line":"  if [[ $(ceph osd stat | grep \"norecover\\|nobackfill\\|norebalance\") ]]; then"},{"line_number":54,"context_line":"    ceph osd stat"},{"line_number":55,"context_line":"    echo \"Flags are set that prevent recovery of degraded PGs\""},{"line_number":56,"context_line":"    exit 1"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"9f560f44_0c23f0a9","line":53,"range":{"start_line":53,"start_character":5,"end_line":53,"end_character":72},"updated":"2020-07-31 18:52:59.000000000","message":"grep -q ?","commit_id":"84f1557566da2d6a28164bceddd37fef6b1d6c03"},{"author":{"_account_id":29974,"name":"Stephen Taylor","email":"stephen.taylor.1@att.com","username":"st053q"},"change_message_id":"b29caec398137ce085fa3d6f099810d87a0e1fc7","unresolved":false,"context_lines":[{"line_number":50,"context_line":"  echo \"### Start: Checking for flags that will prevent recovery\""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"  # Ensure there are no flags set that will prevent recovery of degraded PGs"},{"line_number":53,"context_line":"  if [[ $(ceph osd stat | grep \"norecover\\|nobackfill\\|norebalance\") ]]; then"},{"line_number":54,"context_line":"    ceph osd stat"},{"line_number":55,"context_line":"    echo \"Flags are set that prevent recovery of degraded PGs\""},{"line_number":56,"context_line":"    exit 1"}],"source_content_type":"text/x-smarty","patch_set":13,"id":"9f560f44_cf2baae8","line":53,"range":{"start_line":53,"start_character":5,"end_line":53,"end_character":72},"in_reply_to":"9f560f44_0c23f0a9","updated":"2020-07-31 20:30:16.000000000","message":"This is actually checking the output text (true if exists, false if the output is empty). Using -q would work, but then this would need to check the return code instead of the output. Is there an advantage to doing it that way?","commit_id":"84f1557566da2d6a28164bceddd37fef6b1d6c03"}]}
