You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Doroszlai, Attila (JIRA)" <ji...@apache.org> on 2017/09/25 07:10:00 UTC

[jira] [Reopened] (AMBARI-22040) configs.py does not work properly when dealing with files

     [ https://issues.apache.org/jira/browse/AMBARI-22040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doroszlai, Attila reopened AMBARI-22040:
----------------------------------------

Hi [~aonishuk], a bunch of python unit tests are failing due to changes in configs.py.  Can you please check?

{noformat:title=https://builds.apache.org/job/Ambari-trunk-Commit/8128/consoleText}
ERROR: test_delete_config (TestConfigs.TestConfigs)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-common/src/test/python/mock/mock.py", line 1199, in patched
    return func(*args, **keywargs)
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/TestConfigs.py", line 163, in test_delete_config
    configs.main()
  File "/home/jenkins/jenkins-slave/workspace/Ambari-trunk-Commit/ambari-server/src/test/python/../../main/resources/scripts/configs.py", line 327, in main
    parser.error("One of required options is not passed")
  File "/usr/lib/python2.7/optparse.py", line 1584, in error
    self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
  File "/usr/lib/python2.7/optparse.py", line 1574, in exit
    sys.exit(status)
SystemExit: 2
{noformat}

> configs.py does not work properly when dealing with files
> ---------------------------------------------------------
>
>                 Key: AMBARI-22040
>                 URL: https://issues.apache.org/jira/browse/AMBARI-22040
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 2.6.0
>
>         Attachments: AMBARI-22040.patch
>
>
> configs.py is used by users and support folks for modifying
> configurations. While this works well for getting and setting individual
> properties, it does not work well for dealing with json files. This is needed
> for edits to *env.sh or stack_features.
> _Current behavior_:
>   * Exporting ams-grafana-env does not give a properly formatted json file
>   * Cannot use a get change the json and set it back.
> The expected behavior is to let the user modify the json file and re-import it
> into the cluster.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)