)]}'
{"docker/ceph/ceph-osd/extend_start.sh":[{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"d9a00b97af869ae5f5275ae10a55ba389b845aea","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    fi"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if [[ \"${OSD_INITIAL_WEIGHT}\" \u003d\u003d \"auto\" ]]; then"},{"line_number":54,"context_line":"        OSD_INITIAL_WEIGHT\u003d$(parted ${OSD_PARTITION} unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027)"},{"line_number":55,"context_line":"    fi"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # These commands only need to be run once per host but are safe to run"}],"source_content_type":"text/x-sh","patch_set":2,"id":"5a9d85d2_d6133a0c","line":54,"updated":"2016-06-19 03:09:46.000000000","message":"need add --script param","commit_id":"cd3652fdf2d6f00828edd21946d70d83446b1cd1"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"76e7f2dadf2b297ca7b95c0a470603ed6fb52b4c","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    fi"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if [[ \"${OSD_INITIAL_WEIGHT}\" \u003d\u003d \"auto\" ]]; then"},{"line_number":54,"context_line":"        OSD_INITIAL_WEIGHT\u003d$(parted --script ${OSD_PARTITION} unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027)"},{"line_number":55,"context_line":"    fi"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # These commands only need to be run once per host but are safe to run"}],"source_content_type":"text/x-sh","patch_set":4,"id":"3aaa91ec_0ba400b7","line":54,"updated":"2016-06-29 11:37:16.000000000","message":"When running a local test with \"parted --script /dev/sdd1 unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027\" I got \"awk: line 1: syntax error at or near ,\".","commit_id":"815a2a836de11589b6b584f8a7c1b0008d8e1bb3"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"61ea2706665eaaa47d8f17b28b793f47a996ed2a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    fi"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if [[ \"${OSD_INITIAL_WEIGHT}\" \u003d\u003d \"auto\" ]]; then"},{"line_number":54,"context_line":"        OSD_INITIAL_WEIGHT\u003d$(parted --script ${OSD_PARTITION} unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027)"},{"line_number":55,"context_line":"    fi"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # These commands only need to be run once per host but are safe to run"}],"source_content_type":"text/x-sh","patch_set":4,"id":"3aaa91ec_1f88b770","line":54,"updated":"2016-06-29 12:16:38.000000000","message":"found that there is only mawk on the Ubuntu, so it busted. and\nthe CentOS works, because it installed gawk in the ubuntu:7 images.\n\nSo we need install gawk on the ubuntu installation.","commit_id":"815a2a836de11589b6b584f8a7c1b0008d8e1bb3"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"37f9e541ad421184a15c1c1880112d673670a7f4","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    fi"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if [[ \"${OSD_INITIAL_WEIGHT}\" \u003d\u003d \"auto\" ]]; then"},{"line_number":54,"context_line":"        OSD_INITIAL_WEIGHT\u003d$(parted --script ${OSD_PARTITION} unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027)"},{"line_number":55,"context_line":"    fi"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # These commands only need to be run once per host but are safe to run"}],"source_content_type":"text/x-sh","patch_set":4,"id":"3aaa91ec_3c9661f0","line":54,"updated":"2016-06-29 12:09:28.000000000","message":"what os and awk version are u using?\n\nin my env(centos 7), when i run awk, i use gawk actually. I do not found there is a package \nnamed awk\n\n# yum search awk\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * epel: mirrors.neusoft.edu.cn\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d N/S matched: awk \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\ngawk.x86_64 : The GNU version of the awk text processing utility\nmawk.x86_64 : Interpreter for the AWK programming language\nnawk.x86_64 : \"The one true awk\" descended from UNIX V7\nnodejs-hawk.noarch : HTTP Hawk authentication scheme\npython-hawkey.x86_64 : Python 2 bindings for the hawkey library\nfex.x86_64 : Field split/extraction like cut/awk\nhawkey.i686 : Library providing simplified C and Python API to libsolv\nhawkey.x86_64 : Library providing simplified C and Python API to libsolv\nhawkey-devel.i686 : A Library providing simplified C and Python API to libsolv\nhawkey-devel.x86_64 : A Library providing simplified C and Python API to libsolv\nlibhif.i686 : Simple package library built on top of hawkey and librepo\nlibhif.x86_64 : Simple package library built on top of hawkey and librepo\n\n  Name and summary matches only, use \"search all\" for everything.","commit_id":"815a2a836de11589b6b584f8a7c1b0008d8e1bb3"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"b2c31eaf0a3aafef647fccf7f3c96ad68594ae65","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    fi"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    if [[ \"${OSD_INITIAL_WEIGHT}\" \u003d\u003d \"auto\" ]]; then"},{"line_number":54,"context_line":"        OSD_INITIAL_WEIGHT\u003d$(parted --script ${OSD_PARTITION} unit GB print | awk \u0027match($0, /^Disk.* (.*)GB/, a){printf(\"%.2f\", a[1])}\u0027)"},{"line_number":55,"context_line":"    fi"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    # These commands only need to be run once per host but are safe to run"}],"source_content_type":"text/x-sh","patch_set":4,"id":"3aaa91ec_4b5d6878","line":54,"in_reply_to":"3aaa91ec_0ba400b7","updated":"2016-06-29 11:41:57.000000000","message":"I think you used gawk. With gawk the command is working like expected. For example for mawk the method match has only two parameters and not three like with gawk. At least on Ubuntu awk is a symlink to the installed awk. It has to be ensure that gawk is installed first and that gawk is used.","commit_id":"815a2a836de11589b6b584f8a7c1b0008d8e1bb3"}]}
