Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-24196

Mpack Instance Manager Produces Bad JSON and Doesn't List Versions

    XMLWordPrintableJSON

Details

    Description

      The Mpack Instance manage is producing JSON output which cannot be parsed by non-Python parsers:

      • Includes unicode markers for strings (like u'ZOOKEEPER')
      • Uses non-standard single quotes
        [root@c7403 mpack-instance-manager]$ python mpack-instance-manager.py list-instances
        {'mpacks': \{'hdpcore': {'mpack-instances': {'HDPCORE': {'name': 'HDPCORE', 'subgroups': {'default': {'modules': {'zookeeper': {'category': u'SERVER', 'name': 'zookeeper', 'components': {'zookeeper_server': {'component-instances': {'default': {'path': '/usr/hwx/mpacks/hdpcore/1.0.0-b450/zookeeper_server', 'name': 'default'}}}}}, 'zookeeper_clients': \{'category': u'CLIENT', 'name': 'zookeeper_clients', 'components': {'zookeeper_client': {'component-instances': {'default': {'path': '/usr/hwx/mpacks/hdpcore/1.0.0-b450/zookeeper_client', 'name': 'default'}}}}}}}}}}}}}
        

      It also fails to provide information about the mpack version and component version. The output from the command list-instances needs to provide both the mpack version and the module component version. Otherwise, this data cannot be reported back.

      If the list-instances is not the correct command for this, then that's fine, but we still need a command we can invoke to get this information back in a structure manner.

      Attachments

        Issue Links

          Activity

            People

              sduan Scott Duan
              sduan Scott Duan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h