Bug 1238305 - [RFE] gear-placement plugin domain_id as input data
Summary: [RFE] gear-placement plugin domain_id as input data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Miciah Dashiel Butler Masters
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-01 14:40 UTC by Ryan Howe
Modified: 2019-09-12 08:35 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-12-17 17:10:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:2666 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.8 security, bug fix, and enhancement update 2015-12-17 22:07:54 UTC

Description Ryan Howe 2015-07-01 14:40:32 UTC
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 19:12:30 UTC
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 22:51:01 UTC
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 14:34:21 UTC
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-26 04:58:04 UTC
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 17:10:09 UTC
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.