Reproduce: 1) Create and install an RPM web framework cartridge onto the system using a different "vendor" value in the manifest. 2) Create an application based on that - add the jenkins client Expect: Jenkins builder_type in build job should be "paypal-go-1.1" Actual: Jenkins builder_type in build job is "go-1.1" Jenkins build gets a builder_type set that doesn't have the vendor attribute in it - so "go-1.1" instead of "paypal-go-1.1". The REST API rejects go-1.1 as a valid cartridge name because you must specify a vendor for non redhat carts. The builder_type is set by bash/sdk function primary_cartridge_name() which looks at OPENSHIFT_*_IDENT and takes the second and third elements. Fix: No one else uses primary_cartridge_name() any more - we probably should change the meaning of the API function to "return the cartridge name that the rest api accepts". Since the REST API treats non vendored cart names as "redhat-", we can also send "redhat-mysql-5.1" to the REST API. So we should be able to change primary_cartridge_name to return $1-$2-$3 instead of $2-$3. Tested and verified this change: function primary_cartridge_name() { awk -F: '{printf "%s-%s-%s", $1, $2, $3}' $OPENSHIFT_PRIMARY_CARTRIDGE_DIR/env/OPENSHIFT_*_IDENT } Did not implement change
We won't be able to implement this capability without some changes to the OpenShift Java API; it currently doesn't have any notion of cartridge vendors, so there's no way to obtain references to non-redhat cartridges, nor is there a way to add such cartridges to applications via the API. Marking this UpcomingRelease again while I work with Andre on enhancing the Java API.
Further investigation has revealed the the current Java API might actually accommodate this if the REST API is behaving as expected in terms of cartridge listings. Reassigning to the release.
Identified some blocking bugs that will require this fix to be deferred.
Found a workaround that makes the fix blocked only on 1028154, which is achievable this release after all.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/a55e99c2a4aec4ccb0c90ec1a069e99e473a90bc Bug 1025451: Include cartridge vendor in sdk cart ident function Include the cartridge vendor when constructing a cartridge name/identifier from the `primary_cartridge_name` function. This disambiguates cartridges provided by other vendors (e.g. for builder cartridges such as Jenkins which will use the identifier to construct new gears).
Removing the block on bug 1028154.
test on devenv 4016 steps: 1. install a new cartridge using a different "vendor" value in the manifest. 2. create an app with the cartridge installed 3. add jenkins client to the app 4. make some change for jenkins build After jenkins build, check the jenkins console, builder type is shown with vendor attribute. move to verified.