Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1238305 - [RFE] gear-placement plugin domain_id as input data
[RFE] gear-placement plugin domain_id as input data
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE (Show other bugs)
2.2.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Miciah Dashiel Butler Masters
Johnny Liu
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-01 10:40 EDT by Ryan Howe
Modified: 2016-01-04 14:57 EST (History)
10 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-controller-1.38.4.1-1.el6op
Doc Type: Enhancement
Doc Text:
The author of a gear-placement plug-in may want to use the domain_id to determine where gears are placed. For example, applications in a particular domain may need to be isolated on a separate set of nodes in order to comply with requirements specified in external security policies. This enhancements expands the input parameters to gear-placement plug-ins to include the domain ID of the application, and as a result gear-placement plug-ins can now make placement decisions using applications' respective domain IDs.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-17 12:10:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2666 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.8 security, bug fix, and enhancement update 2015-12-17 17:07:54 EST

  None (edit)
Description Ryan Howe 2015-07-01 10:40:32 EDT
Looking to add domain_id as and input structure to determine where gears are placed using the gear-placement plugin.
Comment 3 Boris Kurktchiev 2015-07-10 15:12:30 EDT
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
Comment 5 Miciah Dashiel Butler Masters 2015-09-25 18:51:01 EDT
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.
Comment 6 Boris Kurktchiev 2015-10-02 10:34:21 EDT
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
Comment 14 Anping Li 2015-11-25 23:58:04 EST
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",
Comment 16 errata-xmlrpc 2015-12-17 12:10:09 EST
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

Note You need to log in before you can comment on or make changes to this bug.