)]}'
{"functions":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a0451351ec848198b6df6591569bfad2ab1b9065","unresolved":false,"context_lines":[{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"# This function recursively compares versions, and is not meant to be"},{"line_number":1470,"context_line":"# called by anything other than vercmp below."},{"line_number":1471,"context_line":"# _vercmp_r ver1 ver1 ver2"},{"line_number":1472,"context_line":"function _vercmp_r {"},{"line_number":1473,"context_line":"  typeset sep"},{"line_number":1474,"context_line":"  typeset -a ver1\u003d() ver2\u003d()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2FmzU%3D","line":1471,"updated":"2013-06-14 14:51:25.000000000","message":"The first arg above should be updated to reflect the actual usage, ie \u0027sep\u0027 or whatever is appropriate.","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"d8f8f5fcd6f785f089763c29bd5cd4ccdacf3e6e","unresolved":false,"context_lines":[{"line_number":1468,"context_line":""},{"line_number":1469,"context_line":"# This function recursively compares versions, and is not meant to be"},{"line_number":1470,"context_line":"# called by anything other than vercmp below."},{"line_number":1471,"context_line":"# _vercmp_r ver1 ver1 ver2"},{"line_number":1472,"context_line":"function _vercmp_r {"},{"line_number":1473,"context_line":"  typeset sep"},{"line_number":1474,"context_line":"  typeset -a ver1\u003d() ver2\u003d()"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2Fmek%3D","line":1471,"in_reply_to":"AAAAPX%2F%2FmzU%3D","updated":"2013-06-14 16:00:00.000000000","message":"Done","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a0451351ec848198b6df6591569bfad2ab1b9065","unresolved":false,"context_lines":[{"line_number":1491,"context_line":""},{"line_number":1492,"context_line":""},{"line_number":1493,"context_line":"# This function compares two versions and is meant to be called by"},{"line_number":1494,"context_line":"# external callers."},{"line_number":1495,"context_line":"# vercmp ver1 ver2"},{"line_number":1496,"context_line":"vercmp() {"},{"line_number":1497,"context_line":"  typeset v1\u003d$1 v2\u003d$2 sep"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2FmyE%3D","line":1494,"updated":"2013-06-14 14:51:25.000000000","message":"I\u0027d like to see a bit more here about what kinds of version strings are allowed, ie can I use it to compare package version such as \u00271:5.9p1-5ubuntu1.1\u0027?  Having a general function invites it to be (mis-)used elsewhere.","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"d8f8f5fcd6f785f089763c29bd5cd4ccdacf3e6e","unresolved":false,"context_lines":[{"line_number":1491,"context_line":""},{"line_number":1492,"context_line":""},{"line_number":1493,"context_line":"# This function compares two versions and is meant to be called by"},{"line_number":1494,"context_line":"# external callers."},{"line_number":1495,"context_line":"# vercmp ver1 ver2"},{"line_number":1496,"context_line":"vercmp() {"},{"line_number":1497,"context_line":"  typeset v1\u003d$1 v2\u003d$2 sep"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2FmgI%3D","line":1494,"in_reply_to":"AAAAPX%2F%2FmyE%3D","updated":"2013-06-14 16:00:00.000000000","message":"Done","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"a0451351ec848198b6df6591569bfad2ab1b9065","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"# This function compares two versions and is meant to be called by"},{"line_number":1494,"context_line":"# external callers."},{"line_number":1495,"context_line":"# vercmp ver1 ver2"},{"line_number":1496,"context_line":"vercmp() {"},{"line_number":1497,"context_line":"  typeset v1\u003d$1 v2\u003d$2 sep"},{"line_number":1498,"context_line":"  typeset -a ver1 ver2"},{"line_number":1499,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2Fmww%3D","line":1496,"updated":"2013-06-14 14:51:25.000000000","message":"Please use a more descriptive name, especially if it is not a general version comparison function.","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"d8f8f5fcd6f785f089763c29bd5cd4ccdacf3e6e","unresolved":false,"context_lines":[{"line_number":1493,"context_line":"# This function compares two versions and is meant to be called by"},{"line_number":1494,"context_line":"# external callers."},{"line_number":1495,"context_line":"# vercmp ver1 ver2"},{"line_number":1496,"context_line":"vercmp() {"},{"line_number":1497,"context_line":"  typeset v1\u003d$1 v2\u003d$2 sep"},{"line_number":1498,"context_line":"  typeset -a ver1 ver2"},{"line_number":1499,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAPX%2F%2FmgM%3D","line":1496,"in_reply_to":"AAAAPX%2F%2Fmww%3D","updated":"2013-06-14 16:00:00.000000000","message":"Done","commit_id":"6ffce80c4f8f59e2d02494450b3c0f314a10d2c9"}],"lib/quantum_plugins/openvswitch_agent":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a7c56a29da063f6a75daf448be1ec06bbb6c87e8","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | awk \u0027{print $4;}\u0027 | awk \u0027{split($0,a,\".\"); print a[1] \".\" a[2];}\u0027`"},{"line_number":47,"context_line":"        OVS_VERSION_MAJOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[1];}\u0027`"},{"line_number":48,"context_line":"        OVS_VERSION_MINOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[2];}\u0027`"},{"line_number":49,"context_line":"        if [ $OVS_VERSION_MAJOR -le \"1\" ] \u0026\u0026 [ $OVS_VERSION_MINOR -lt \"1\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":50,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":51,"context_line":"        fi"},{"line_number":52,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAPX%2F%2FoDY%3D","line":49,"updated":"2013-06-14 02:58:22.000000000","message":"This test seems wrong. At the very least you should be checking for MINOR -lt \"4\", but only if MAJOR -eq \"1\". This gets very unwieldy and begs for a version checking function in functions. I am no good at bash so I asked on the #bash channel on IRC and was offered this:\n\nhttp://paste.openstack.org/show/38559","commit_id":"31a0f3367ca7314b985eb299b4d8d1d8b1b36780"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"3e7f4798220a6888b791c2a3a2895e5129fc5d12","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | awk \u0027{print $4;}\u0027 | awk \u0027{split($0,a,\".\"); print a[1] \".\" a[2];}\u0027`"},{"line_number":47,"context_line":"        OVS_VERSION_MAJOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[1];}\u0027`"},{"line_number":48,"context_line":"        OVS_VERSION_MINOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[2];}\u0027`"},{"line_number":49,"context_line":"        if [ $OVS_VERSION_MAJOR -le \"1\" ] \u0026\u0026 [ $OVS_VERSION_MINOR -lt \"1\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":50,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":51,"context_line":"        fi"},{"line_number":52,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAPX%2F%2Fn%2F0%3D","line":49,"in_reply_to":"AAAAPX%2F%2FoDY%3D","updated":"2013-06-14 03:19:54.000000000","message":"Great find, thanks Henry! Incorporating this now.","commit_id":"31a0f3367ca7314b985eb299b4d8d1d8b1b36780"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"a7c56a29da063f6a75daf448be1ec06bbb6c87e8","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        OVS_VERSION_MAJOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[1];}\u0027`"},{"line_number":48,"context_line":"        OVS_VERSION_MINOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[2];}\u0027`"},{"line_number":49,"context_line":"        if [ $OVS_VERSION_MAJOR -le \"1\" ] \u0026\u0026 [ $OVS_VERSION_MINOR -lt \"1\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":50,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":51,"context_line":"        fi"},{"line_number":52,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"},{"line_number":53,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS local_ip $HOST_IP"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAPX%2F%2FoA4%3D","line":50,"updated":"2013-06-14 02:58:22.000000000","message":"This looks like perl? It does not work for me in bash.","commit_id":"31a0f3367ca7314b985eb299b4d8d1d8b1b36780"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"3e7f4798220a6888b791c2a3a2895e5129fc5d12","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        OVS_VERSION_MAJOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[1];}\u0027`"},{"line_number":48,"context_line":"        OVS_VERSION_MINOR\u003d`echo $OVS_VERSION | awk \u0027{split($0,a,\".\"); print a[2];}\u0027`"},{"line_number":49,"context_line":"        if [ $OVS_VERSION_MAJOR -le \"1\" ] \u0026\u0026 [ $OVS_VERSION_MINOR -lt \"1\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":50,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":51,"context_line":"        fi"},{"line_number":52,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"},{"line_number":53,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS local_ip $HOST_IP"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAPX%2F%2Fn%2Fs%3D","line":50,"in_reply_to":"AAAAPX%2F%2FoA4%3D","updated":"2013-06-14 03:19:54.000000000","message":"die is a function defined in the toplevel functions file.","commit_id":"31a0f3367ca7314b985eb299b4d8d1d8b1b36780"},{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"bcbe64c05e5eb3f2662895abb51a834119b3c069","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    if [[ \"$OVS_ENABLE_TUNNELING\" \u003d \"True\" ]]; then"},{"line_number":44,"context_line":"        # Verify tunnels are supported"},{"line_number":45,"context_line":"        # REVISIT - also check kernel module support for GRE and patch ports"},{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | awk \u0027{print $4;}\u0027 | awk \u0027{split($0,a,\".\"); print a[1] \".\" a[2];}\u0027`"},{"line_number":47,"context_line":"        if [ $(ovs_vercmp \"$OVS_VERSION\" \"1.4\") -lt \"0\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":48,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":49,"context_line":"        fi"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAPX%2F%2FnNw%3D","line":46,"updated":"2013-06-14 11:31:38.000000000","message":"Would something simpler than a double awk do the trick ? such as :\novs-vsctl --version | head -n 1 | grep -E -o \"[0-9]+\\.[0-9]+\"","commit_id":"1cf656372b42eb9e5e90e19ca771aacfba10c491"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"8a88a174e882db19d1dcc8ee82a9d02351b2bb0c","unresolved":false,"context_lines":[{"line_number":43,"context_line":"    if [[ \"$OVS_ENABLE_TUNNELING\" \u003d \"True\" ]]; then"},{"line_number":44,"context_line":"        # Verify tunnels are supported"},{"line_number":45,"context_line":"        # REVISIT - also check kernel module support for GRE and patch ports"},{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | awk \u0027{print $4;}\u0027 | awk \u0027{split($0,a,\".\"); print a[1] \".\" a[2];}\u0027`"},{"line_number":47,"context_line":"        if [ $(ovs_vercmp \"$OVS_VERSION\" \"1.4\") -lt \"0\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":48,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":49,"context_line":"        fi"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAPX%2F%2FnEY%3D","line":46,"in_reply_to":"AAAAPX%2F%2FnNw%3D","updated":"2013-06-14 12:45:16.000000000","message":"Thanks for the tip, I\u0027ve incorporated this into the next version of the patch!","commit_id":"1cf656372b42eb9e5e90e19ca771aacfba10c491"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f55b1556221c9f94973475acd9e514ff1eb2a6b5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Verify tunnels are supported"},{"line_number":45,"context_line":"        # REVISIT - also check kernel module support for GRE and patch ports"},{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | grep -E -o \"[0-9]+\\.[0-9]+\"`"},{"line_number":47,"context_line":"        if [ `vercmp_numbers \"$OVS_VERSION\" \"1.4\"` -lt \"0\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":48,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":49,"context_line":"        fi"},{"line_number":50,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAPn%2F%2F%2Bkw%3D","line":47,"updated":"2013-06-16 08:23:02.000000000","message":"Would this work with a RHEL version - say for example 1.09 which does not have tunneling support?","commit_id":"51a3f1f6369d27193daa6132fd8bcf6ba1972bd2"},{"author":{"_account_id":105,"name":"Kyle Mestery","email":"mestery@mestery.com","username":"mestery"},"change_message_id":"d26f31620f22d4a56cf4c9edfc310bf76f98a98b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        # Verify tunnels are supported"},{"line_number":45,"context_line":"        # REVISIT - also check kernel module support for GRE and patch ports"},{"line_number":46,"context_line":"        OVS_VERSION\u003d`ovs-vsctl --version | head -n 1 | grep -E -o \"[0-9]+\\.[0-9]+\"`"},{"line_number":47,"context_line":"        if [ `vercmp_numbers \"$OVS_VERSION\" \"1.4\"` -lt \"0\" ] \u0026\u0026 ! is_service_enabled q-svc ; then"},{"line_number":48,"context_line":"            die $LINENO \"You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts.\""},{"line_number":49,"context_line":"        fi"},{"line_number":50,"context_line":"        iniset /$Q_PLUGIN_CONF_FILE OVS enable_tunneling True"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"AAAAPn%2F%2F%2BYM%3D","line":47,"in_reply_to":"AAAAPn%2F%2F%2Bkw%3D","updated":"2013-06-16 18:42:31.000000000","message":"Gary, if RHEL had version \"1.09\", then this check would fail, yes. If it had version \"1.9\", then the check would proceed, as the existing code would as well. Ideally, this should also check the kernel module version as well. I\u0027ll file a separate bug for that and fix that one next.","commit_id":"51a3f1f6369d27193daa6132fd8bcf6ba1972bd2"}]}
