)]}'
{"leap-upgrades/lib/functions.sh":[{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"0891fed398425c6e13a5c6d5b3b8a7ce5ee25af1","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"function discover_code_version {"},{"line_number":154,"context_line":"    get_openstack_release_file"},{"line_number":155,"context_line":"    if [[ ! -f \"/etc/openstack-release\" ]]; then"},{"line_number":156,"context_line":"        export CODE_UPGRADE_FROM\u003d\"JUNO\""},{"line_number":157,"context_line":"        notice \"You seem to be running Juno\""},{"line_number":158,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"3f1d235d_d4d5d8b8","line":155,"updated":"2017-07-11 17:50:03.000000000","message":"I\u0027d change this to:\nif the /etc/openstack-release doesn\u0027t exist, but the /etc/rpc-release exists, then we are using JUNO.\n\nIf none of the files exists, then we are missing the file.\nThen we should bail out and document it properly for the deployer.\n\nThat\u0027s the easiest, and less fragile.","commit_id":"04f6460c25011bed163af7e523a89f664eca03d0"},{"author":{"_account_id":11268,"name":"Miguel Alex Cantu (alextricity25)","email":"miguel.can2@gmail.com","username":"elextro"},"change_message_id":"46552ed4639c8b0ce50650164d5490192f263cb2","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"function discover_code_version {"},{"line_number":154,"context_line":"    get_openstack_release_file"},{"line_number":155,"context_line":"    if [[ ! -f \"/etc/openstack-release\" ]]; then"},{"line_number":156,"context_line":"        export CODE_UPGRADE_FROM\u003d\"JUNO\""},{"line_number":157,"context_line":"        notice \"You seem to be running Juno\""},{"line_number":158,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f1a1f67_0b694824","line":155,"in_reply_to":"3f1d235d_d4d5d8b8","updated":"2017-07-12 13:57:38.000000000","message":"@Jean-Philippe Evrard,\nThe method you suggested won\u0027t cover the case where the rpc-release nor the openstack-release file exist on the deployment node. Are you saying you no longer want to cover that case? Are you saying we shouldn\u0027t copy those files over to the deployment node at all?","commit_id":"04f6460c25011bed163af7e523a89f664eca03d0"},{"author":{"_account_id":11268,"name":"Miguel Alex Cantu (alextricity25)","email":"miguel.can2@gmail.com","username":"elextro"},"change_message_id":"c4f413f60936a21956b540bdc83bf6885d77893b","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"function discover_code_version {"},{"line_number":154,"context_line":"    get_openstack_release_file"},{"line_number":155,"context_line":"    if [[ ! -f \"/etc/openstack-release\" ]]; then"},{"line_number":156,"context_line":"        export CODE_UPGRADE_FROM\u003d\"JUNO\""},{"line_number":157,"context_line":"        notice \"You seem to be running Juno\""},{"line_number":158,"context_line":"    else"}],"source_content_type":"text/x-sh","patch_set":1,"id":"1f1a1f67_d0553d1f","line":155,"in_reply_to":"3f1d235d_d4d5d8b8","updated":"2017-07-12 13:38:13.000000000","message":"Gotcha. I\u0027ll give that a try. I didn\u0027t think about using the rpc-release file before. Thanks!","commit_id":"04f6460c25011bed163af7e523a89f664eca03d0"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"0891fed398425c6e13a5c6d5b3b8a7ce5ee25af1","unresolved":false,"context_lines":[{"line_number":181,"context_line":"function get_openstack_release_file {"},{"line_number":182,"context_line":"  notice \"Getting openstack-release file from infra1 if it exists\""},{"line_number":183,"context_line":"  # Get openstack_user_config.yml file path"},{"line_number":184,"context_line":"  USER_CONFIG_FILE\u003d$(find /etc/ -name \u0027*_user_config.yml\u0027)"},{"line_number":185,"context_line":"  # Get IP of os_infra node"},{"line_number":186,"context_line":"  INFRA_IP\u003d$(sed -n -e \u0027/infra_hosts/, /ip:/ p\u0027 ${USER_CONFIG_FILE} | awk \u0027/ip:/ {print $2; exit}\u0027)"},{"line_number":187,"context_line":"  if [ -z \"$INFRA_IP\" ]; then"}],"source_content_type":"text/x-sh","patch_set":1,"id":"3f1d235d_9499a07a","line":184,"updated":"2017-07-11 17:50:03.000000000","message":"if you\u0027re on the deploy node which is an infra node, you\u0027ll copy to yourself, which sounds problematic (we know are gonna be depending on agent forwarding, or the presence of private keys).","commit_id":"04f6460c25011bed163af7e523a89f664eca03d0"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"0891fed398425c6e13a5c6d5b3b8a7ce5ee25af1","unresolved":false,"context_lines":[{"line_number":189,"context_line":"      exit 99"},{"line_number":190,"context_line":"  fi"},{"line_number":191,"context_line":"  # Get the openstack-release file from the infra node. Don\u0027t fail if file doesn\u0027t exist"},{"line_number":192,"context_line":"  scp -o StrictHostKeyChecking\u003dno root@${INFRA_IP}:/etc/openstack-release /etc/openstack-release || true"},{"line_number":193,"context_line":"}"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"function set_upgrade_vars {"}],"source_content_type":"text/x-sh","patch_set":1,"id":"3f1d235d_f440d437","line":192,"updated":"2017-07-11 17:50:03.000000000","message":"This seems fragile, because it will never fail at the end.","commit_id":"04f6460c25011bed163af7e523a89f664eca03d0"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"45a2889447bf328e8f144ac25b45a1a4f5e09d97","unresolved":false,"context_lines":[{"line_number":151,"context_line":"}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"function discover_code_version {"},{"line_number":154,"context_line":"    # If there is no release file present, then try to find one"},{"line_number":155,"context_line":"    # from the infra node."},{"line_number":156,"context_line":"    if [[ ! -f \"/etc/openstack-release\" ]]; then"},{"line_number":157,"context_line":"        get_openstack_release_file"}],"source_content_type":"text/x-sh","patch_set":8,"id":"1f1a1f67_ea2ca69a","line":154,"range":{"start_line":154,"start_character":29,"end_line":154,"end_character":33},"updated":"2017-07-13 09:21:27.000000000","message":"files (plural form)","commit_id":"10610bb88e9f1d917bc336b8591fe2440c6eab79"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"45a2889447bf328e8f144ac25b45a1a4f5e09d97","unresolved":false,"context_lines":[{"line_number":153,"context_line":"function discover_code_version {"},{"line_number":154,"context_line":"    # If there is no release file present, then try to find one"},{"line_number":155,"context_line":"    # from the infra node."},{"line_number":156,"context_line":"    if [[ ! -f \"/etc/openstack-release\" ]]; then"},{"line_number":157,"context_line":"        get_openstack_release_file"},{"line_number":158,"context_line":"    fi"},{"line_number":159,"context_line":""}],"source_content_type":"text/x-sh","patch_set":8,"id":"1f1a1f67_2a329ef2","line":156,"updated":"2017-07-13 09:21:27.000000000","message":"I\u0027d then check if there is no local files (so neither /etc/openstack-release NOR /etc/rpc-release.\n\nThen it means fetching, whatever the version is.\nIf at some point we want to change this function, to drop a warning instead, it\u0027s easy and no need of hard refactor.","commit_id":"10610bb88e9f1d917bc336b8591fe2440c6eab79"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"45a2889447bf328e8f144ac25b45a1a4f5e09d97","unresolved":false,"context_lines":[{"line_number":191,"context_line":"  USER_CONFIG_FILE\u003d$(find /etc/ -name \u0027*_user_config.yml\u0027)"},{"line_number":192,"context_line":"  # Get IP of os_infra node"},{"line_number":193,"context_line":"  INFRA_IP\u003d$(sed -n -e \u0027/infra_hosts/, /ip:/ p\u0027 ${USER_CONFIG_FILE} | awk \u0027/ip:/ {print $2; exit}\u0027)"},{"line_number":194,"context_line":"  if [ -z \"$INFRA_IP\" ]; then"},{"line_number":195,"context_line":"      notice \"Could not find infra ip to get openstack-release file. Exiting..\""},{"line_number":196,"context_line":"      exit 99"},{"line_number":197,"context_line":"  fi"}],"source_content_type":"text/x-sh","patch_set":8,"id":"1f1a1f67_aaa90ee0","line":194,"updated":"2017-07-13 09:21:27.000000000","message":"nit: two [[ ]] instead of one is generally a best practice for bash scripts, IIRC. But don\u0027t take my word for it.","commit_id":"10610bb88e9f1d917bc336b8591fe2440c6eab79"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"a4848d2e4090ed5332e812a8ddcbf3172a6aebf9","unresolved":false,"context_lines":[{"line_number":191,"context_line":"  # Get openstack_user_config.yml file path"},{"line_number":192,"context_line":"  USER_CONFIG_FILE\u003d$(find /etc/ -name \u0027*_user_config.yml\u0027)"},{"line_number":193,"context_line":"  # Get IP of os_infra node"},{"line_number":194,"context_line":"  INFRA_IP\u003d$(/opt/rpc-openstack/openstack-ansible/scripts/inventory-manage.py -l | grep \u0027^| infra1 \u0027 | egrep -o \u0027[0-9]+.[0-9]+.[0-9]+.[0-9]+\u0027)"},{"line_number":195,"context_line":"  if [[ -z \"${INFRA_IP}\" ]]; then"},{"line_number":196,"context_line":"      failure \"Could not find infra ip to get openstack-release file. Exiting..\""},{"line_number":197,"context_line":"      exit 99"}],"source_content_type":"text/x-sh","patch_set":9,"id":"1f1a1f67_43302057","line":194,"range":{"start_line":194,"start_character":92,"end_line":194,"end_character":98},"updated":"2017-07-13 13:00:44.000000000","message":"The name of the infra node is not always infra1.\nThe sed works for me, what was your issue?","commit_id":"4df93dcc4eaec9de6f04d360072ef59e8a09e1c9"}]}
