)]}'
{"functions":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"3440f8e167398800768649682c15665fb293696f","unresolved":false,"context_lines":[{"line_number":862,"context_line":"}"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"# Check if any database backend is enabled"},{"line_number":865,"context_line":"function is_database_enabled {"},{"line_number":866,"context_line":"    for x in $DATABASE_BACKENDS;do"},{"line_number":867,"context_line":"        if ! is_service_enabled $x; then"},{"line_number":868,"context_line":"            continue"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAALn%2F%2F1AA%3D","line":865,"updated":"2012-11-02 20:06:20.000000000","message":"I don\u0027t think this is required...is_service_enabled() already ORs all of its arguments, returning 0 on the first hit.  It also has that wildcard matching bit but I don\u0027t think we care about that here.\n\n    is_service_enabled $DATABASE_BACKENDS\n\nshould be equivalent to is_database_enabled()","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3aa771c2b9d382bce93f69c842f36c929a86a7fa","unresolved":false,"context_lines":[{"line_number":862,"context_line":"}"},{"line_number":863,"context_line":""},{"line_number":864,"context_line":"# Check if any database backend is enabled"},{"line_number":865,"context_line":"function is_database_enabled {"},{"line_number":866,"context_line":"    for x in $DATABASE_BACKENDS;do"},{"line_number":867,"context_line":"        if ! is_service_enabled $x; then"},{"line_number":868,"context_line":"            continue"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAALn%2F%2F07g%3D","line":865,"in_reply_to":"AAAALn%2F%2F1AA%3D","updated":"2012-11-02 20:35:20.000000000","message":"Ok, thanks for the info! I\u0027ll change it and test and make sure I don\u0027t break anything with it.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"}],"stack.sh":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"3440f8e167398800768649682c15665fb293696f","unresolved":false,"context_lines":[{"line_number":476,"context_line":"# ----------------------"},{"line_number":477,"context_line":"# By default, MySQL is enabled as the database backend."},{"line_number":478,"context_line":"if is_database_enabled; then"},{"line_number":479,"context_line":"    DATABASE_TYPE\u003d${DATABASE_TYPE:-mysql}"},{"line_number":480,"context_line":"    echo \"Using $DATABASE_TYPE backend\""},{"line_number":481,"context_line":"else"},{"line_number":482,"context_line":"    echo \"Database not enabled!\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F0%2FE%3D","line":479,"updated":"2012-11-02 20:06:20.000000000","message":"This is confusing...if is_database_enabled() (or is_service_enabled $DATABASE_BACKENDS) returns true then there is already a value for DATABASE_TYPE in ENABLED_SERVICES.  We should just use it.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3aa771c2b9d382bce93f69c842f36c929a86a7fa","unresolved":false,"context_lines":[{"line_number":476,"context_line":"# ----------------------"},{"line_number":477,"context_line":"# By default, MySQL is enabled as the database backend."},{"line_number":478,"context_line":"if is_database_enabled; then"},{"line_number":479,"context_line":"    DATABASE_TYPE\u003d${DATABASE_TYPE:-mysql}"},{"line_number":480,"context_line":"    echo \"Using $DATABASE_TYPE backend\""},{"line_number":481,"context_line":"else"},{"line_number":482,"context_line":"    echo \"Database not enabled!\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F08Q%3D","line":479,"in_reply_to":"AAAALn%2F%2F0%2FE%3D","updated":"2012-11-02 20:35:20.000000000","message":"Actually, DATABASE_TYPE isn\u0027t set by default. We need to be able to read an existing legacy localrc w/o breaking. So the mysql service could be enabled, but DATABASE_TYPE not be set.\n\nI didn\u0027t set DATABASE_TYPE by default because it would also be possible in legacy code to have \"disable_service mysql\" which would then give us a DATABASE_TYPE\u003dmysql but the service disabled. So, this way we detect and correctly set everything for a legacy localrc.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"bfd270995a893dac2545d500ca8d85a2d633558a","unresolved":false,"context_lines":[{"line_number":476,"context_line":"# ----------------------"},{"line_number":477,"context_line":"# By default, MySQL is enabled as the database backend."},{"line_number":478,"context_line":"if is_database_enabled; then"},{"line_number":479,"context_line":"    DATABASE_TYPE\u003d${DATABASE_TYPE:-mysql}"},{"line_number":480,"context_line":"    echo \"Using $DATABASE_TYPE backend\""},{"line_number":481,"context_line":"else"},{"line_number":482,"context_line":"    echo \"Database not enabled!\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F0t0%3D","line":479,"in_reply_to":"AAAALn%2F%2F02M%3D","updated":"2012-11-02 23:39:23.000000000","message":"Done. Had to move some stuff around. Moving DATABASE_BACKENDS to lib/database means that we have to source lib/database before stackrc so that they are set before we pull in the localrc. Moving that up means that we need an initialize_database_backends function that we run *after* we parse the localrc so that we actually set the DATABASE_TYPE based on the localrc stuff.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"fd367863d9cf2dd6e0a1732393df11f316293769","unresolved":false,"context_lines":[{"line_number":476,"context_line":"# ----------------------"},{"line_number":477,"context_line":"# By default, MySQL is enabled as the database backend."},{"line_number":478,"context_line":"if is_database_enabled; then"},{"line_number":479,"context_line":"    DATABASE_TYPE\u003d${DATABASE_TYPE:-mysql}"},{"line_number":480,"context_line":"    echo \"Using $DATABASE_TYPE backend\""},{"line_number":481,"context_line":"else"},{"line_number":482,"context_line":"    echo \"Database not enabled!\""}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F02M%3D","line":479,"in_reply_to":"AAAALn%2F%2F08Q%3D","updated":"2012-11-02 21:29:40.000000000","message":"I guess I\u0027m wondering why not just extract the database from ENABLED_SERVICES to set DATABASE_TYPE and be done with it.  Loop through $DATABASE_BACKENDS and set DATABASE_TYPE to the first match.\n\nAlso, this could be moved to lib/database.  So could setting BASE_SQL_CONN, that would help with encapsulating the db stuff there.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"}],"stackrc":[{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"3440f8e167398800768649682c15665fb293696f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"NOVA_ENABLED_APIS\u003dec2,osapi_compute,metadata"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# Set available database backends"},{"line_number":24,"context_line":"DATABASE_BACKENDS\u003d\"mysql postgresql\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Repositories"},{"line_number":27,"context_line":"# ------------"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAALn%2F%2F0%2Fw%3D","line":24,"updated":"2012-11-02 20:06:20.000000000","message":"Move this to lib/database.  Or better yet, set it to \"\" in lib/database and have lib/{mysql|postgresql} append their own name to it when they load.  That way lib/db2 will be added just by loading it.  ;)","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3aa771c2b9d382bce93f69c842f36c929a86a7fa","unresolved":false,"context_lines":[{"line_number":21,"context_line":"NOVA_ENABLED_APIS\u003dec2,osapi_compute,metadata"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"# Set available database backends"},{"line_number":24,"context_line":"DATABASE_BACKENDS\u003d\"mysql postgresql\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# Repositories"},{"line_number":27,"context_line":"# ------------"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"AAAALn%2F%2F078%3D","line":24,"in_reply_to":"AAAALn%2F%2F0%2Fw%3D","updated":"2012-11-02 20:35:20.000000000","message":"Good call. Will do.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"}],"unstack.sh":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"4295d52e1bc099608a1dd808c90874fc9ca289fa","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    if is_service_enabled postgresql; then"},{"line_number":106,"context_line":"        stop_service postgresql"},{"line_number":107,"context_line":"    fi"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    # Stop rabbitmq-server"},{"line_number":110,"context_line":"    if is_service_enabled rabbit; then"},{"line_number":111,"context_line":"        stop_service rabbitmq-server"}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F1gQ%3D","line":108,"updated":"2012-11-02 10:41:33.000000000","message":"This doesn\u0027t work any more right? is_service_enabled is only for database now, not for the individual services.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":5756,"name":"Terry Wilson","email":"twilson@redhat.com","username":"otherwiseguy"},"change_message_id":"3aa771c2b9d382bce93f69c842f36c929a86a7fa","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    if is_service_enabled postgresql; then"},{"line_number":106,"context_line":"        stop_service postgresql"},{"line_number":107,"context_line":"    fi"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    # Stop rabbitmq-server"},{"line_number":110,"context_line":"    if is_service_enabled rabbit; then"},{"line_number":111,"context_line":"        stop_service rabbitmq-server"}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F07k%3D","line":108,"in_reply_to":"AAAALn%2F%2F0%2Fs%3D","updated":"2012-11-02 20:35:20.000000000","message":"It should (and does seem to) work.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"3440f8e167398800768649682c15665fb293696f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    if is_service_enabled postgresql; then"},{"line_number":106,"context_line":"        stop_service postgresql"},{"line_number":107,"context_line":"    fi"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    # Stop rabbitmq-server"},{"line_number":110,"context_line":"    if is_service_enabled rabbit; then"},{"line_number":111,"context_line":"        stop_service rabbitmq-server"}],"source_content_type":"text/x-sh","patch_set":3,"id":"AAAALn%2F%2F0%2Fs%3D","line":108,"in_reply_to":"AAAALn%2F%2F1gQ%3D","updated":"2012-11-02 20:06:20.000000000","message":"This should work, if it doesn\u0027t it needs to be fixed.","commit_id":"42893da713f8111c2a3581aabb187b52656af89d"}]}
