Uploaded image for project: 'Policy Framework'
  1. Policy Framework
  2. POLICY-767

OOM : Explicit hostnames in PDP-X pool

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Beijing Release
    • Beijing Release
    • None

      PDP-Xs acting active/active in OOM installation need to identify themselves with their own hostnames rather than relying on PDP-X service cluster generic address.

      These requires changes in PAP and PDP-X configuration.

      PDP-X configuration is trickier as replicas share common configuration resources.

      PAP configuration is to be modified so to allow communication from PDP-X when registering at startup.   

       

      The previous screenshot shows a configuration with the PAP changes, after PDP-Xs 0 and 1 registration.

      PDP-Xs need to identify themselves following the screenshot above at registration with their hostnames.   For example in xacml.pdp.properties in <release-name>-pdp-1 pod:

      xacml.rest.pdp.id=http://dev-pdp-1.pdp:8081/pdp/

      After discussion with mahendrr and mayankg2703, the helm configuration is trickier since replicas share the same configuration files.  There were 2 possibilities discussed:

      1. use the HOSTNAME environment variable somehow :
        policy@dev-pdp-1:/opt/app/policy/servers/pdp/bin$ env | grep "^HOSTNAME"
        HOSTNAME=dev-pdp-1
      2. modify the application code.   This will be in policy/engine repo, file:   ./ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java.   The line below could issue a "getHostname" call instead of blindly populating the PDP header with the PROP_PDP_ID (which comes from pdp.conf): repo connection.setRequestProperty(XACMLRestProperties.PROP_PDP_HTTP_HEADER_ID, XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_ID));**

       

       

        There are no Sub-Tasks for this issue.

            jhh jhh
            jhh jhh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: