)]}'
{"barbican/templates/job-db-drop.yaml":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"3e5ab096ba431790b2ec6f361a139d9f10ba3f61","unresolved":false,"context_lines":[{"line_number":21,"context_line":"apiVersion: batch/v1"},{"line_number":22,"context_line":"kind: Job"},{"line_number":23,"context_line":"metadata:"},{"line_number":24,"context_line":"  name: barbican-db-drop"},{"line_number":25,"context_line":"  annotations:"},{"line_number":26,"context_line":"    \"helm.sh/hook\": pre-delete"},{"line_number":27,"context_line":"    \"helm.sh/hook-delete-policy\": hook-succeeded"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7f515b1d_a2ba2007","line":24,"updated":"2017-09-25 21:05:12.000000000","message":"could you give these a generated name e.g.: https://github.com/openstack/openstack-helm/blob/master/glance/templates/job-clean.yaml#L24, otherwise the job will need to be manually cleaned up on each run.","commit_id":"145ba8550a44cf73c160702f2303d1b4f73ba3c2"},{"author":{"_account_id":26952,"name":"Sean Larimore","email":"slarimore02@gmail.com","username":"slarimore02"},"change_message_id":"390ba526a6246898910cb36a3b3d5bb45e919743","unresolved":false,"context_lines":[{"line_number":21,"context_line":"apiVersion: batch/v1"},{"line_number":22,"context_line":"kind: Job"},{"line_number":23,"context_line":"metadata:"},{"line_number":24,"context_line":"  name: barbican-db-drop"},{"line_number":25,"context_line":"  annotations:"},{"line_number":26,"context_line":"    \"helm.sh/hook\": pre-delete"},{"line_number":27,"context_line":"    \"helm.sh/hook-delete-policy\": hook-succeeded"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7f515b1d_103eded9","line":24,"in_reply_to":"7f515b1d_a2ba2007","updated":"2017-09-25 23:27:46.000000000","message":"Updated patch set with the generated names added. I also have the helm.sh/hook-delete-policy code below which should delete the job if the job completes successfully. The delete policy code hasn\u0027t been merged into Helm so the naming is good to have so then it\u0027s helm version independent. Thanks for the feedback!","commit_id":"145ba8550a44cf73c160702f2303d1b4f73ba3c2"}],"cinder/values.yaml":[{"author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"change_message_id":"ffdf8fd697302c25d57838d0adabee0413706999","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        limits:"},{"line_number":132,"context_line":"          memory: \"1024Mi\""},{"line_number":133,"context_line":"          cpu: \"2000m\""},{"line_number":134,"context_line":"      db_drop:"},{"line_number":135,"context_line":"        requests:"},{"line_number":136,"context_line":"          memory: \"128Mi\""},{"line_number":137,"context_line":"          cpu: \"100m\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"7f515b1d_7cddf312","line":134,"updated":"2017-09-25 20:08:37.000000000","message":"i sometimes wonder if the fairly meager resources we request here are even worth the effort/overhead","commit_id":"145ba8550a44cf73c160702f2303d1b4f73ba3c2"}],"doc/source/devref/images.rst":[{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"3eeb05a3f0baada68330bdba6899234fdb005e24","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   for the OpenStack service."},{"line_number":40,"context_line":"-  db\\_sync: The image that will perform database sync (schema"},{"line_number":41,"context_line":"   initialization and migration) for the OpenStack service."},{"line_number":42,"context_line":"-  db\\_drop: The image that will perform database deletion operations"},{"line_number":43,"context_line":"   for the OpenStack service."},{"line_number":44,"context_line":"-  ks\\_user: The image that will perform keystone user creation for the"},{"line_number":45,"context_line":"   service."},{"line_number":46,"context_line":"-  ks\\_service: The image that will perform keystone service"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_f450b60c","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":29},"updated":"2017-09-26 17:38:29.000000000","message":"As this will be a standard across the openstack-services, please include an example in the yaml snippet below","commit_id":"325da3b162517fb5649f3f26bb62e0fe8c862e54"},{"author":{"_account_id":26952,"name":"Sean Larimore","email":"slarimore02@gmail.com","username":"slarimore02"},"change_message_id":"6d3716860290e76f1ec3d87ad9e94d1d69d1fd42","unresolved":false,"context_lines":[{"line_number":39,"context_line":"   for the OpenStack service."},{"line_number":40,"context_line":"-  db\\_sync: The image that will perform database sync (schema"},{"line_number":41,"context_line":"   initialization and migration) for the OpenStack service."},{"line_number":42,"context_line":"-  db\\_drop: The image that will perform database deletion operations"},{"line_number":43,"context_line":"   for the OpenStack service."},{"line_number":44,"context_line":"-  ks\\_user: The image that will perform keystone user creation for the"},{"line_number":45,"context_line":"   service."},{"line_number":46,"context_line":"-  ks\\_service: The image that will perform keystone service"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7f515b1d_6c04f24a","line":43,"range":{"start_line":42,"start_character":0,"end_line":43,"end_character":29},"in_reply_to":"7f515b1d_f450b60c","updated":"2017-09-27 00:58:53.000000000","message":"Done","commit_id":"325da3b162517fb5649f3f26bb62e0fe8c862e54"}],"doc/source/install/developer/all-in-one.rst":[{"author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"change_message_id":"687fcc257551e5c705c0592e881e757244fb2d13","unresolved":false,"context_lines":[{"line_number":254,"context_line":"receive requests."},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"Removing Helm Charts"},{"line_number":257,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"To delete an installed helm chart, use the following command:"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_4a191320","line":257,"updated":"2017-09-27 05:16:16.000000000","message":"that too","commit_id":"223dd474ce53eea3b7afef8abfab470b6400dbca"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"c57e296a2e607f23cc19a7b5951fcf9c1954e116","unresolved":false,"context_lines":[{"line_number":263,"context_line":"  helm delete ${RELEASE_NAME} --purge"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"This will delete all Kubernetes resources generated when the chart was "},{"line_number":267,"context_line":"instantiated. However for Openstack charts, by default, this will not delete"},{"line_number":268,"context_line":"the database and database users that were created when the chart was installed."},{"line_number":269,"context_line":"All OpenStack projects can be configured such that upon deletion, their database"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_5cc44591","line":266,"range":{"start_line":266,"start_character":70,"end_line":266,"end_character":71},"updated":"2017-09-27 02:51:05.000000000","message":"ws","commit_id":"223dd474ce53eea3b7afef8abfab470b6400dbca"}],"doc/source/install/multinode.rst":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"c57e296a2e607f23cc19a7b5951fcf9c1954e116","unresolved":false,"context_lines":[{"line_number":324,"context_line":"Please ensure that you use ``--purge`` whenever deleting a project. Please note that by default"},{"line_number":325,"context_line":"this will not delete the database associated with the project. To enable the deletion of the"},{"line_number":326,"context_line":"associated database when the chart is deleted the manifests.job_db_drop value should be set"},{"line_number":327,"context_line":"to true when the chart is installed. "},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"Ceph Installation and Verification"},{"line_number":330,"context_line":"----------------------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7f515b1d_fc3891a0","line":327,"range":{"start_line":327,"start_character":36,"end_line":327,"end_character":37},"updated":"2017-09-27 02:51:05.000000000","message":"ws","commit_id":"223dd474ce53eea3b7afef8abfab470b6400dbca"}],"helm-toolkit/templates/scripts/_db-drop.py.tpl":[{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"9ab0a54b894aa126cff2500daa58cec5e79ff45d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{{/*"},{"line_number":2,"context_line":"Copyright 2017 The Openstack-Helm Authors."},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"Licensed under the Apache License, Version 2.0 (the \"License\");"},{"line_number":5,"context_line":"you may not use this file except in compliance with the License."},{"line_number":6,"context_line":"You may obtain a copy of the License at"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"   http://www.apache.org/licenses/LICENSE-2.0"},{"line_number":9,"context_line":""},{"line_number":10,"context_line":"Unless required by applicable law or agreed to in writing, software"},{"line_number":11,"context_line":"distributed under the License is distributed on an \"AS IS\" BASIS,"},{"line_number":12,"context_line":"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied."},{"line_number":13,"context_line":"See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"limitations under the License."},{"line_number":15,"context_line":"*/}}"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"{{- define \"helm-toolkit.scripts.db_drop\" }}"},{"line_number":18,"context_line":"#!/usr/bin/env python"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# Drops db and user for an OpenStack Service:"},{"line_number":21,"context_line":"# Set ROOT_DB_CONNECTION and DB_CONNECTION environment variables to contain"},{"line_number":22,"context_line":"# SQLAlchemy strings for the root connection to the database and the one you"},{"line_number":23,"context_line":"# wish the service to use. Alternatively, you can use an ini formatted config"},{"line_number":24,"context_line":"# at the location specified by OPENSTACK_CONFIG_FILE, and extract the string"},{"line_number":25,"context_line":"# from the key OPENSTACK_CONFIG_DB_KEY, in the section specified by"},{"line_number":26,"context_line":"# OPENSTACK_CONFIG_DB_SECTION."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"import os"},{"line_number":29,"context_line":"import sys"},{"line_number":30,"context_line":"import ConfigParser"},{"line_number":31,"context_line":"import logging"},{"line_number":32,"context_line":"from sqlalchemy import create_engine"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"# Create logger, console handler and formatter"},{"line_number":35,"context_line":"logger \u003d logging.getLogger(\u0027OpenStack-Helm DB Drop\u0027)"},{"line_number":36,"context_line":"logger.setLevel(logging.DEBUG)"},{"line_number":37,"context_line":"ch \u003d logging.StreamHandler()"},{"line_number":38,"context_line":"ch.setLevel(logging.DEBUG)"},{"line_number":39,"context_line":"formatter \u003d logging.Formatter(\u0027%(asctime)s - %(name)s - %(levelname)s - %(message)s\u0027)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# Set the formatter and add the handler"},{"line_number":42,"context_line":"ch.setFormatter(formatter)"},{"line_number":43,"context_line":"logger.addHandler(ch)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"# Get the connection string for the service db root user"},{"line_number":47,"context_line":"if \"ROOT_DB_CONNECTION\" in os.environ:"},{"line_number":48,"context_line":"    db_connection \u003d os.environ[\u0027ROOT_DB_CONNECTION\u0027]"},{"line_number":49,"context_line":"    logger.info(\u0027Got DB root connection\u0027)"},{"line_number":50,"context_line":"else:"},{"line_number":51,"context_line":"    logger.critical(\u0027environment variable ROOT_DB_CONNECTION not set\u0027)"},{"line_number":52,"context_line":"    sys.exit(1)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"# Get the connection string for the service db"},{"line_number":55,"context_line":"if \"OPENSTACK_CONFIG_FILE\" in os.environ:"},{"line_number":56,"context_line":"    os_conf \u003d os.environ[\u0027OPENSTACK_CONFIG_FILE\u0027]"},{"line_number":57,"context_line":"    if \"OPENSTACK_CONFIG_DB_SECTION\" in os.environ:"},{"line_number":58,"context_line":"        os_conf_section \u003d os.environ[\u0027OPENSTACK_CONFIG_DB_SECTION\u0027]"},{"line_number":59,"context_line":"    else:"},{"line_number":60,"context_line":"        logger.critical(\u0027environment variable OPENSTACK_CONFIG_DB_SECTION not set\u0027)"},{"line_number":61,"context_line":"        sys.exit(1)"},{"line_number":62,"context_line":"    if \"OPENSTACK_CONFIG_DB_KEY\" in os.environ:"},{"line_number":63,"context_line":"        os_conf_key \u003d os.environ[\u0027OPENSTACK_CONFIG_DB_KEY\u0027]"},{"line_number":64,"context_line":"    else:"},{"line_number":65,"context_line":"        logger.critical(\u0027environment variable OPENSTACK_CONFIG_DB_KEY not set\u0027)"},{"line_number":66,"context_line":"        sys.exit(1)"},{"line_number":67,"context_line":"    try:"},{"line_number":68,"context_line":"        config \u003d ConfigParser.RawConfigParser()"},{"line_number":69,"context_line":"        logger.info(\"Using {0} as db config source\".format(os_conf))"},{"line_number":70,"context_line":"        config.read(os_conf)"},{"line_number":71,"context_line":"        logger.info(\"Trying to load db config from {0}:{1}\".format("},{"line_number":72,"context_line":"            os_conf_section, os_conf_key))"},{"line_number":73,"context_line":"        user_db_conn \u003d config.get(os_conf_section, os_conf_key)"},{"line_number":74,"context_line":"        logger.info(\"Got config from {0}\".format(os_conf))"},{"line_number":75,"context_line":"    except:"},{"line_number":76,"context_line":"        logger.critical(\"Tried to load config from {0} but failed.\".format(os_conf))"},{"line_number":77,"context_line":"        raise"},{"line_number":78,"context_line":"elif \"DB_CONNECTION\" in os.environ:"},{"line_number":79,"context_line":"    user_db_conn \u003d os.environ[\u0027DB_CONNECTION\u0027]"},{"line_number":80,"context_line":"    logger.info(\u0027Got config from DB_CONNECTION env var\u0027)"},{"line_number":81,"context_line":"else:"},{"line_number":82,"context_line":"    logger.critical(\u0027Could not get db config, either from config file or env var\u0027)"},{"line_number":83,"context_line":"    sys.exit(1)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Root DB engine"},{"line_number":86,"context_line":"try:"},{"line_number":87,"context_line":"    root_engine_full \u003d create_engine(db_connection)"},{"line_number":88,"context_line":"    root_user \u003d root_engine_full.url.username"},{"line_number":89,"context_line":"    root_password \u003d root_engine_full.url.password"},{"line_number":90,"context_line":"    drivername \u003d root_engine_full.url.drivername"},{"line_number":91,"context_line":"    host \u003d root_engine_full.url.host"},{"line_number":92,"context_line":"    port \u003d root_engine_full.url.port"},{"line_number":93,"context_line":"    root_engine_url \u003d \u0027\u0027.join([drivername, \u0027://\u0027, root_user, \u0027:\u0027, root_password, \u0027@\u0027, host, \u0027:\u0027, str (port)])"},{"line_number":94,"context_line":"    root_engine \u003d create_engine(root_engine_url)"},{"line_number":95,"context_line":"    connection \u003d root_engine.connect()"},{"line_number":96,"context_line":"    connection.close()"},{"line_number":97,"context_line":"    logger.info(\"Tested connection to DB @ {0}:{1} as {2}\".format("},{"line_number":98,"context_line":"        host, port, root_user))"},{"line_number":99,"context_line":"except:"},{"line_number":100,"context_line":"    logger.critical(\u0027Could not connect to database as root user\u0027)"},{"line_number":101,"context_line":"    raise"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"# User DB engine"},{"line_number":104,"context_line":"try:"},{"line_number":105,"context_line":"    user_engine \u003d create_engine(user_db_conn)"},{"line_number":106,"context_line":"    # Get our user data out of the user_engine"},{"line_number":107,"context_line":"    database \u003d user_engine.url.database"},{"line_number":108,"context_line":"    user \u003d user_engine.url.username"},{"line_number":109,"context_line":"    password \u003d user_engine.url.password"},{"line_number":110,"context_line":"    logger.info(\u0027Got user db config\u0027)"},{"line_number":111,"context_line":"except:"},{"line_number":112,"context_line":"    logger.critical(\u0027Could not get user database config\u0027)"},{"line_number":113,"context_line":"    raise"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"# Delete DB"},{"line_number":116,"context_line":"try:"}],"source_content_type":"text/x-smarty","patch_set":4,"id":"7f515b1d_33be44d5","line":113,"range":{"start_line":1,"start_character":0,"end_line":113,"end_character":9},"updated":"2017-09-27 15:10:34.000000000","message":"SUggestion: if you made the bellow functionality an option in the db-init.py then we would not need to replicate this code in two places. But we could do this in a follow-up ps.","commit_id":"223dd474ce53eea3b7afef8abfab470b6400dbca"}]}
