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

Service admin and cluster operator can't modify service configs through API

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • ambari-server

    Description

      Using a serviceoperator user, trying to modify config using the 2 step modification process :

      Request type : POST
      Request URL : /api/v1/clusters/cl1/configurations
      Auth : serviceadminuser/password
      Request Body :

      {"type":"ams-env","tag":"version146474298002","properties":{"ambari_metrics_user":"ams","metrics_monitor_log_dir":"/grid/0/log/metric_monitor_updated","metrics_collector_heapsize":"512","metrics_collector_pid_dir":"/var/run/ambari-metrics-collector","metrics_collector_log_dir":"/grid/0/log/metric_collector","metrics_monitor_pid_dir":"/var/run/ambari-metrics-monitor","content":"\n# Set environment variables here.\n\n# The java implementation to use. Java 1.6 required.\nexport JAVA_HOME\u003d{{java64_home}}\n\n# Collector Log directory for log4j\nexport AMS_COLLECTOR_LOG_DIR\u003d{{ams_collector_log_dir}}\n\n# Monitor Log directory for outfile\nexport AMS_MONITOR_LOG_DIR\u003d{{ams_monitor_log_dir}}\n\n# Collector pid directory\nexport AMS_COLLECTOR_PID_DIR\u003d{{ams_collector_pid_dir}}\n\n# Monitor pid directory\nexport AMS_MONITOR_PID_DIR\u003d{{ams_monitor_pid_dir}}\n\n# AMS HBase pid directory\nexport AMS_HBASE_PID_DIR\u003d{{hbase_pid_dir}}\n\n# AMS Collector heapsize\nexport AMS_COLLECTOR_HEAPSIZE\u003d{{metrics_collector_heapsize}}\n\n# HBase normalizer enabled\nexport AMS_HBASE_NORMALIZER_ENABLED\u003d{{ams_hbase_normalizer_enabled}}\n\n# HBase compaction policy enabled\nexport AMS_HBASE_FIFO_COMPACTION_ENABLED\u003d{{ams_hbase_fifo_compaction_enabled}}\n\n# HBase Tables Initialization check enabled\nexport AMS_HBASE_INIT_CHECK_ENABLED\u003d{{ams_hbase_init_check_enabled}}\n\n# AMS Collector options\nexport AMS_COLLECTOR_OPTS\u003d\"-Djava.library.path\u003d/usr/lib/ams-hbase/lib/hadoop-native\"\n{% if security_enabled %}\nexport AMS_COLLECTOR_OPTS\u003d\"$AMS_COLLECTOR_OPTS -Djava.security.auth.login.config\u003d{{ams_collector_jaas_config_file}}\"\n{% endif %}\n\n# AMS Collector GC options\nexport AMS_COLLECTOR_GC_OPTS\u003d\"-XX:+UseConcMarkSweepGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:{{ams_collector_log_dir}}/collector-gc.log-`date +\u0027%Y%m%d%H%M\u0027`\"\nexport AMS_COLLECTOR_OPTS\u003d\"$AMS_COLLECTOR_OPTS $AMS_COLLECTOR_GC_OPTS\"\n\n    "}}
      

      Request response :

      {
        "status": 403,
        "message": "You do not have permissions to access this resource."
      }
      

      Attachments

        1. AMBARI-17014_branch-2.4_01.patch
          6 kB
          Robert Levas
        2. AMBARI-17014_trunk_01.patch
          6 kB
          Robert Levas

        Issue Links

          Activity

            People

              rlevas Robert Levas
              rlevas Robert Levas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: