)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2feffa7df1c01350fb8fd5f00bf53243be46521d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"we are hitting max msdos limit. Detect total disk size, and if"},{"line_number":12,"context_line":"it exceeds that limit, create the partition at the end of legal"},{"line_number":13,"context_line":"limits."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I11dd3f11eaa6af764151b442768d10289ced6d3f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"ba8a016a_fdd3895d","line":14,"updated":"2015-11-17 15:00:11.000000000","message":"Can we open a bug for that please? So we can keep track of it","commit_id":"56c8bfa7e377d64949c25cb34058e790e57cff81"}],"ironic_python_agent/shell/copy_configdrive_to_disk.sh":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2feffa7df1c01350fb8fd5f00bf53243be46521d","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    log \"Adding configdrive partition to $DEVICE\""},{"line_number":92,"context_line":"    parted -a optimal -s -- $DEVICE mkpart primary ext2 -64MiB -0 "},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    if [ $? -neq 0 ]; then"},{"line_number":95,"context_line":"      log \"Adding configdrive to end of device $DEVICE failed, adding to max limit\""},{"line_number":96,"context_line":"      startlimit\u003d$(($MAX_MBR_SIZE-64))"},{"line_number":97,"context_line":"      parted -a optimal -s -- $DEVICE mkpart primary ext2 ${startlimit} 100% || fail \"creating configdrive on ${DEVICE}\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"ba8a016a_1df20dd3","line":94,"updated":"2015-11-17 15:00:11.000000000","message":"I don\u0027t think we need to wait for the first command to fail, we can check if disk size \u003e max size MBR and if so we can set the initial block as you did in the command below","commit_id":"56c8bfa7e377d64949c25cb34058e790e57cff81"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"2feffa7df1c01350fb8fd5f00bf53243be46521d","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    if [ $? -neq 0 ]; then"},{"line_number":95,"context_line":"      log \"Adding configdrive to end of device $DEVICE failed, adding to max limit\""},{"line_number":96,"context_line":"      startlimit\u003d$(($MAX_MBR_SIZE-64))"},{"line_number":97,"context_line":"      parted -a optimal -s -- $DEVICE mkpart primary ext2 ${startlimit} 100% || fail \"creating configdrive on ${DEVICE}\""},{"line_number":98,"context_line":"    fi"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    # Find partition we just created"}],"source_content_type":"text/x-sh","patch_set":3,"id":"ba8a016a_9d991d71","line":97,"updated":"2015-11-17 15:00:11.000000000","message":"Wondering if parted will respect 100% to be up to the max allowed size of the MBR, wouldn\u0027t it be better to set the end of the partition since we already know the expected size ? (64MiB)\n\ne.g\n\nparted -a optimal -s -- $DEVICE mkpart primary ext2 ${startlimit} $MAX_MBR_SIZE","commit_id":"56c8bfa7e377d64949c25cb34058e790e57cff81"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"952d5504d3b6f527bb4e2e44c34df9da53c30f00","unresolved":false,"context_lines":[{"line_number":36,"context_line":"}"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"MAX_DISK_PARTITIONS\u003d128"},{"line_number":39,"context_line":"MAX_MBR_SIZE\u003d2097152"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"CONFIGDRIVE\u003d\"$1\""},{"line_number":42,"context_line":"DEVICE\u003d\"$2\""}],"source_content_type":"text/x-sh","patch_set":6,"id":"ba8a016a_903b3738","line":39,"updated":"2015-11-17 18:18:02.000000000","message":"MAX_MBR_SIZE_MB\n\nLet\u0027s keep the units","commit_id":"a1bb810f8bba7704077d9e2c4b0bbab48b124973"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"952d5504d3b6f527bb4e2e44c34df9da53c30f00","unresolved":false,"context_lines":[{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    # get total disk size, to detect if that exceeds 2TB msdos limit"},{"line_number":91,"context_line":"    disksize\u003d$(blockdev --getsize64 $DEVICE)"},{"line_number":92,"context_line":"    disksize\u003d$(( ${disksize%% *} / 1048576))"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    if [ \"$disksize\" -gt \"$MAX_MBR_SIZE\" ]; then"},{"line_number":95,"context_line":"      # Create small partition at 2TB limit"}],"source_content_type":"text/x-sh","patch_set":6,"id":"ba8a016a_101667a7","line":92,"updated":"2015-11-17 18:18:02.000000000","message":"ditto units\n\n disksize_bytes\u003d$(blockdev --getsize64 $DEVICE)\n disksize_mb\u003d$(( ${disksize%% *} / 1024 / 1024 ))","commit_id":"a1bb810f8bba7704077d9e2c4b0bbab48b124973"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"952d5504d3b6f527bb4e2e44c34df9da53c30f00","unresolved":false,"context_lines":[{"line_number":101,"context_line":"      # Create small partition at the end of the device"},{"line_number":102,"context_line":"      log \"Adding configdrive partition to $DEVICE\""},{"line_number":103,"context_line":"      parted -a optimal -s -- $DEVICE mkpart primary ext2 -64MiB -0 || fail \"creating configdrive on ${DEVICE}\""},{"line_number":104,"context_line":"    fi"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    # Find partition we just created"},{"line_number":107,"context_line":"    # Dump all partitions, ignore empty ones, then get the last partition ID"}],"source_content_type":"text/x-sh","patch_set":6,"id":"ba8a016a_508f0fcc","line":104,"updated":"2015-11-17 18:18:02.000000000","message":"most aesthetics but\n\n startlimit\u003d-64MiB\n endlimit\u003d-0\n if [ \"$disksize_mb\" -gt \"$MAX_MBR_SIZE_MB\" ]; then\n     startlimit\u003d$(($MAX_MBR_SIZE_MB - 65))\n     endlimit\u003d$(($MAX_MBR_SIZE_MB - 1))\n fi\n\n log \"Adding configdrive partition to $DEVICE\"\n parted -a optimal -s -- $DEVICE mkpart primary ext2 $startlimit $endlimit || fail \"creating configdrive on ${DEVICE}\"","commit_id":"a1bb810f8bba7704077d9e2c4b0bbab48b124973"}]}
