)]}'
{"cinder/cmd/manage.py":[{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3716bd3c7cfbdfbc5ff158e1ba8c8a06802cf624","unresolved":false,"context_lines":[{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"class BaseCommand(object):"},{"line_number":440,"context_line":"    @staticmethod"},{"line_number":441,"context_line":"    def normalize_time(time_field):"},{"line_number":442,"context_line":"        return time_field and timeutils.normalize_time(time_field)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    @staticmethod"},{"line_number":445,"context_line":"    def state_repr(is_up):"},{"line_number":446,"context_line":"        return \u0027:-)\u0027 if is_up else \u0027XXX\u0027"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"class ServiceCommands(BaseCommand):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_516280d9","line":446,"range":{"start_line":440,"start_character":0,"end_line":446,"end_character":40},"updated":"2016-06-28 08:27:06.000000000","message":"-1,\n\n:/opt/stack/cinder$ cinder-manage cluster\nusage: cinder-manage cluster [-h]\n                             {list,normalize_time,remove,rename,state_repr}\n                             ...\ncinder-manage cluster: error: too few arguments\n\nIt seems that \"state_repr\" and \"normalize_time\" should not show here.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":437,"context_line":""},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"class BaseCommand(object):"},{"line_number":440,"context_line":"    @staticmethod"},{"line_number":441,"context_line":"    def normalize_time(time_field):"},{"line_number":442,"context_line":"        return time_field and timeutils.normalize_time(time_field)"},{"line_number":443,"context_line":""},{"line_number":444,"context_line":"    @staticmethod"},{"line_number":445,"context_line":"    def state_repr(is_up):"},{"line_number":446,"context_line":"        return \u0027:-)\u0027 if is_up else \u0027XXX\u0027"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":""},{"line_number":449,"context_line":"class ServiceCommands(BaseCommand):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_f8c38888","line":446,"range":{"start_line":440,"start_character":0,"end_line":446,"end_character":40},"in_reply_to":"3aaa91ec_516280d9","updated":"2016-06-28 13:06:53.000000000","message":"Good catch!\n\nYup, and it\u0027s also affecting `cinder-manage service`.  It\u0027s an easy fix.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3716bd3c7cfbdfbc5ff158e1ba8c8a06802cf624","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            status \u003d \u0027disabled\u0027 if cluster.disabled else \u0027enabled\u0027"},{"line_number":516,"context_line":"            heartbeat \u003d self.normalize_time(cluster.last_heartbeat)"},{"line_number":517,"context_line":"            updated_at \u003d self.normalize_time(cluster.updated_at)"},{"line_number":518,"context_line":"            print(print_format % (cluster.name, cluster.binary, status, art,"},{"line_number":519,"context_line":"                                  heartbeat, cluster.num_hosts,"},{"line_number":520,"context_line":"                                  cluster.num_down_hosts, updated_at))"},{"line_number":521,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_7667b225","line":518,"updated":"2016-06-28 08:27:06.000000000","message":"-1\nThe updated_at field shows None.\n\n\u003e\u003e:/opt/stack/cinder$ cinder-manage cluster list\n\nName                                 Binary           Status     State Heartbeat            Hosts   Down Hosts   Updated At\ntestcluster@sheepdog                 cinder-volume    enabled    :-)   2016-06-28 08:14:08  1       0            None","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":515,"context_line":"            status \u003d \u0027disabled\u0027 if cluster.disabled else \u0027enabled\u0027"},{"line_number":516,"context_line":"            heartbeat \u003d self.normalize_time(cluster.last_heartbeat)"},{"line_number":517,"context_line":"            updated_at \u003d self.normalize_time(cluster.updated_at)"},{"line_number":518,"context_line":"            print(print_format % (cluster.name, cluster.binary, status, art,"},{"line_number":519,"context_line":"                                  heartbeat, cluster.num_hosts,"},{"line_number":520,"context_line":"                                  cluster.num_down_hosts, updated_at))"},{"line_number":521,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_389fd060","line":518,"in_reply_to":"3aaa91ec_7667b225","updated":"2016-06-28 13:06:53.000000000","message":"That\u0027s exactly what `cinder-manage service list` does, so it\u0027s consistent.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"66aa0067d19c897db35636bdfae84bd13ff7611b","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    @args(\u0027binary\u0027, type\u003dstr,"},{"line_number":525,"context_line":"          help\u003d\u0027Service to delete from the cluster.\u0027)"},{"line_number":526,"context_line":"    @args(\u0027cluster-name\u0027, type\u003dstr, help\u003d\u0027Cluster to delete.\u0027)"},{"line_number":527,"context_line":"    def remove(self, cluster_name, binary, recursive):"},{"line_number":528,"context_line":"        \"\"\"Completely removes a cluster.\"\"\""},{"line_number":529,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":530,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_dc40470a","line":527,"updated":"2016-06-28 08:42:03.000000000","message":"Another interest case, when I comment the problem in Line 552, I run command to remove a cluster which contains a up service, it returns \"Cluster False successfully removed.\"\n\nThe interest point is in the db: the original cluster is removed and new cluster with new id is created again.\n\nmysql\u003e select * from clusters;\n+---------------------+---------------------+---------------------+---------+----+----------------------+---------------+----------+-----------------+----------------+\n| created_at          | updated_at          | deleted_at          | deleted | id | name                 | binary        | disabled | disabled_reason | race_preventer |\n+---------------------+---------------------+---------------------+---------+----+----------------------+---------------+----------+-----------------+----------------+\n| 2016-06-28 08:41:22 | 2016-06-28 08:42:18 | 2016-06-28 08:42:18 |       1 |  5 | testcluster@sheepdog | cinder-volume |        0 | NULL            |              5 |\n| 2016-06-28 08:42:22 | NULL                | NULL                |       0 |  6 | testcluster@sheepdog | cinder-volume |        0 | NULL            |              0 |","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    @args(\u0027binary\u0027, type\u003dstr,"},{"line_number":525,"context_line":"          help\u003d\u0027Service to delete from the cluster.\u0027)"},{"line_number":526,"context_line":"    @args(\u0027cluster-name\u0027, type\u003dstr, help\u003d\u0027Cluster to delete.\u0027)"},{"line_number":527,"context_line":"    def remove(self, cluster_name, binary, recursive):"},{"line_number":528,"context_line":"        \"\"\"Completely removes a cluster.\"\"\""},{"line_number":529,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":530,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_b843c06b","line":527,"in_reply_to":"3aaa91ec_5c773702","updated":"2016-06-28 13:06:53.000000000","message":"I assumed our arg parsing was smarter and was passing arguments as keyword arguments and not positional.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3502a8c8a6c4dcc0d5a632c7ee5e58518c7f3be3","unresolved":false,"context_lines":[{"line_number":524,"context_line":"    @args(\u0027binary\u0027, type\u003dstr,"},{"line_number":525,"context_line":"          help\u003d\u0027Service to delete from the cluster.\u0027)"},{"line_number":526,"context_line":"    @args(\u0027cluster-name\u0027, type\u003dstr, help\u003d\u0027Cluster to delete.\u0027)"},{"line_number":527,"context_line":"    def remove(self, cluster_name, binary, recursive):"},{"line_number":528,"context_line":"        \"\"\"Completely removes a cluster.\"\"\""},{"line_number":529,"context_line":"        ctxt \u003d context.get_admin_context()"},{"line_number":530,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_5c773702","line":527,"in_reply_to":"3aaa91ec_dc40470a","updated":"2016-06-28 08:49:18.000000000","message":"The paramater sequence is wrong, should be \n\ndef remove(self, recursive, binary, cluster_name):","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3716bd3c7cfbdfbc5ff158e1ba8c8a06802cf624","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        msg \u003d _(\u0027Cluster %s successfully removed.\u0027) % cluster_name"},{"line_number":551,"context_line":"        if recursive:"},{"line_number":552,"context_line":"            msg +\u003d (_(\u0027 And %s services from the cluster were also removed.\u0027) %"},{"line_number":553,"context_line":"                    len(cluster.services))"},{"line_number":554,"context_line":"        print(msg)"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_5176003f","line":552,"updated":"2016-06-28 08:27:06.000000000","message":"-1,\n\nErrors when running the remove command:\n\n$ cinder-manage cluster remove cinder-volume lisa\n2016-06-28 16:28:39.085 DEBUG oslo_db.sqlalchemy.engines [req-29a8c076-ad45-4a8c-90d4-27296140f20c None None] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION from (pid\u003d26262) _check_effective_sql_mode /usr/local/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py:256\n2016-06-28 16:28:39.233 CRITICAL cinder [req-29a8c076-ad45-4a8c-90d4-27296140f20c None None] TypeError: Message objects do not support addition.\n\n2016-06-28 16:28:39.233 TRACE cinder Traceback (most recent call last):\n2016-06-28 16:28:39.233 TRACE cinder   File \"/usr/local/bin/cinder-manage\", line 10, in \u003cmodule\u003e\n2016-06-28 16:28:39.233 TRACE cinder     sys.exit(main())\n2016-06-28 16:28:39.233 TRACE cinder   File \"/opt/stack/cinder/cinder/cmd/manage.py\", line 711, in main\n2016-06-28 16:28:39.233 TRACE cinder     fn(*fn_args)\n2016-06-28 16:28:39.233 TRACE cinder   File \"/opt/stack/cinder/cinder/cmd/manage.py\", line 553, in remove\n2016-06-28 16:28:39.233 TRACE cinder     len(cluster.services))\n2016-06-28 16:28:39.233 TRACE cinder   File \"/usr/local/lib/python2.7/dist-packages/oslo_i18n/_message.py\", line 230, in __add__\n2016-06-28 16:28:39.233 TRACE cinder     raise TypeError(msg)\n2016-06-28 16:28:39.233 TRACE cinder TypeError: Message objects do not support addition.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":549,"context_line":""},{"line_number":550,"context_line":"        msg \u003d _(\u0027Cluster %s successfully removed.\u0027) % cluster_name"},{"line_number":551,"context_line":"        if recursive:"},{"line_number":552,"context_line":"            msg +\u003d (_(\u0027 And %s services from the cluster were also removed.\u0027) %"},{"line_number":553,"context_line":"                    len(cluster.services))"},{"line_number":554,"context_line":"        print(msg)"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_7387b912","line":552,"in_reply_to":"3aaa91ec_5176003f","updated":"2016-06-28 13:06:53.000000000","message":"Done","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3716bd3c7cfbdfbc5ff158e1ba8c8a06802cf624","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                    len(cluster.services))"},{"line_number":554,"context_line":"        print(msg)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    @args(\u0027--full-rename\u0027, dest\u003d\u0027partial\u0027,"},{"line_number":557,"context_line":"          action\u003d\u0027store_false\u0027, default\u003dTrue,"},{"line_number":558,"context_line":"          help\u003d\u0027Do full cluster rename instead of just replacing provided \u0027"},{"line_number":559,"context_line":"               \u0027current cluster name and preserving backend and/or pool info.\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_f1d9ec84","line":556,"updated":"2016-06-28 08:27:06.000000000","message":"-1,\n\ncinder-manage cluster rename lisa lisa2\n2016-06-28 16:24:59.916 CRITICAL cinder [-] NoSuchOptError: no such option in group DEFAULT: full-rename\n\n2016-06-28 16:24:59.916 TRACE cinder Traceback (most recent call last):\n2016-06-28 16:24:59.916 TRACE cinder   File \"/usr/local/bin/cinder-manage\", line 10, in \u003cmodule\u003e\n2016-06-28 16:24:59.916 TRACE cinder     sys.exit(main())\n2016-06-28 16:24:59.916 TRACE cinder   File \"/opt/stack/cinder/cinder/cmd/manage.py\", line 710, in main\n2016-06-28 16:24:59.916 TRACE cinder     fn_args \u003d fetch_func_args(fn)\n2016-06-28 16:24:59.916 TRACE cinder   File \"/opt/stack/cinder/cinder/cmd/manage.py\", line 669, in fetch_func_args\n2016-06-28 16:24:59.916 TRACE cinder     fn_args.append(getattr(CONF.category, arg))\n2016-06-28 16:24:59.916 TRACE cinder   File \"/usr/local/lib/python2.7/dist-packages/oslo_config/cfg.py\", line 3029, in __getattr__\n2016-06-28 16:24:59.916 TRACE cinder     raise NoSuchOptError(name)\n2016-06-28 16:24:59.916 TRACE cinder NoSuchOptError: no such option in group DEFAULT: full-rename\n2016-06-28 16:24:59.916 TRACE cinder","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":553,"context_line":"                    len(cluster.services))"},{"line_number":554,"context_line":"        print(msg)"},{"line_number":555,"context_line":""},{"line_number":556,"context_line":"    @args(\u0027--full-rename\u0027, dest\u003d\u0027partial\u0027,"},{"line_number":557,"context_line":"          action\u003d\u0027store_false\u0027, default\u003dTrue,"},{"line_number":558,"context_line":"          help\u003d\u0027Do full cluster rename instead of just replacing provided \u0027"},{"line_number":559,"context_line":"               \u0027current cluster name and preserving backend and/or pool info.\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_aeb37a09","line":556,"in_reply_to":"3aaa91ec_f1d9ec84","updated":"2016-06-28 13:06:53.000000000","message":"Our args handling in here is terrible!! I\u0027ll create another patch to improve it and support dest, dashes in the args, and pass arguments as keyword arguments and not positional.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":15961,"name":"lisali","email":"xiaoyan.li@intel.com","username":"lisali"},"change_message_id":"3716bd3c7cfbdfbc5ff158e1ba8c8a06802cf624","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            ctxt, new, partial_rename\u003dpartial, cluster_name\u003dcurrent)"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"        if num_vols or num_cgs:"},{"line_number":584,"context_line":"            msg \u003d _(\u0027Successfully renamed %(num_vols)s volumes and \u0027"},{"line_number":585,"context_line":"                    \u0027%(num_cgs)s consistency groups from cluster %(current)s \u0027"},{"line_number":586,"context_line":"                    \u0027to %(new)s\u0027)"},{"line_number":587,"context_line":"            print(msg % {\u0027num_vols\u0027: num_vols, \u0027num_cgs\u0027: num_cgs, \u0027new\u0027: new,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_8b7ddbe9","line":584,"updated":"2016-06-28 08:27:06.000000000","message":"%(num_vols)s --\u003e %(num_vols)d?","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"6109c4023eaf68d72ce33eb8a715e8e0a0bc3e91","unresolved":false,"context_lines":[{"line_number":581,"context_line":"            ctxt, new, partial_rename\u003dpartial, cluster_name\u003dcurrent)"},{"line_number":582,"context_line":""},{"line_number":583,"context_line":"        if num_vols or num_cgs:"},{"line_number":584,"context_line":"            msg \u003d _(\u0027Successfully renamed %(num_vols)s volumes and \u0027"},{"line_number":585,"context_line":"                    \u0027%(num_cgs)s consistency groups from cluster %(current)s \u0027"},{"line_number":586,"context_line":"                    \u0027to %(new)s\u0027)"},{"line_number":587,"context_line":"            print(msg % {\u0027num_vols\u0027: num_vols, \u0027num_cgs\u0027: num_cgs, \u0027new\u0027: new,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3aaa91ec_6e2a32e9","line":584,"in_reply_to":"3aaa91ec_8b7ddbe9","updated":"2016-06-28 13:06:53.000000000","message":"It\u0027s not necessary, %s modifier is just saying to use str(num_vols) which is ok and it\u0027s usually safer since it will work whether num_vols is an integer or a string.","commit_id":"1e74ce3fa1776d4855a148f2623f48237f51052a"}]}
