Looking to add domain_id as and input structure to determine where gears are placed using the gear-placement plugin.
The solution is pretty trivial. I am not exactly sure why the object gets stripped of the information before it gets passed on to other parts of the software but in order to get this info all that needs to occur is: edit /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.35.1.3/app/plugin_models/application_properties.rb file and change the following lines: 1) Add :namespace to: attr_accessor :id, :name, :web_cartridge, :namespace 2) Add the following line to store namespace: self.namespace = app.domain.namespace This produces the following: 2015-06-30 16:35:15.559 [INFO ] app_props: #<ApplicationProperties:0x000000067b49f8 @id="5592fd7eb024e8c373000016", @name="testphp3", @namespace="middleware", @web_cartridge="php-5.4"> (pid:1058) -B
Is the RFE only to pass the namespace to the plug-in as described in comment 3? From the initial description, I thought the RFE was to provide an example plug-in that scheduled based on the namespace, but just adding the namespace to app_props is much simpler.
My comment/ticket is what spawned the RFE, we need what I described in comment 3, to get the namspace to be passed in so it can be used in the scheduler plugin/custom plugins as needed. For whatever reason that information gets stripped before it gets to the gear_placement.rb
Verified and pass. The namespace are passed to gear-placement plugin 2015-11-25 22:27:56.655 [INFO ] app_props: #<ApplicationProperties:0x000000079628a8 @id="56567c3682611dbd88000001", @name="sphp", @namespace="anlidom",
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2666.html