Red Hat Bugzilla – Bug 859565
Last modified: 2015-05-14 18:59:44 EDT
Some of our logic is using grep for .dev.rhcloud.com. For example:
cartridges/diy-0.1.old/info/bin/build.sh:if `echo $OPENSHIFT_GEAR_DNS | grep -q .stg.rhcloud.com` || `echo $OPENSHIFT_GEAR_DNS | grep -q .dev.rhcloud.com`
grep .dev.rhcloud.com would also match blahdev.rhcloud.com even though the latter is prod and the former is dev.
To further test this one, create an application with somethingdev as the domain (in prod).
See if application is available after update, we've had a few notes come in this week with that issue, they all were blah-somethingdev.rhcloud.com
Yeah, looks like the jboss abstract + python + perl + diy all have it.
Just changing those to [e]grep -q "\.dev\.rhcloud\.com" should fix it (similar treatment for stg).
Will fix it along w/ another bug am working on.
Fixed and wating on merge of pull request:
Above code is merged in devenv_2550
This works fine for me on devenv -- what's the errors/reason it failed QA? Can you please add some more info/logs.
(In reply to comment #7)
> This works fine for me on devenv -- what's the errors/reason it failed QA?
> Can you please add some more info/logs.
Hi,Ram: in this script: https://github.com/ramr/crankcase/blob/56ac756dbfb6abaa8f5f8945baabb9fbd122b633/cartridges/python-2.6/info/bin/build.sh
there was a line(12): elif `echo $openshift_gear_dns | grep -qe "\.rhcloud\.com"`
I think $openshift_gear_dns should be upper case, like $OPENSHIFT_GEAR_DNS.
Otherwise, the regular expression won't be matched on prod
@Hou, good catch -- you are right, that regexp won't match anything since the
value would be "" and so it won't match prod.
Hmm, seems like that's a day 1 bug.
Fixed with pull request:
Waiting on merge.
Verified on devenv_2295
Tested for python app, regexp matches for both dev and prod
1. Create a python app
2. cd /var/lib/stickshift/$UUID/.env, modify OPENSHIFT_GEAR_DNS
for devenv: export OPENSHIFT_GEAR_DNS='py1-jhou.dev.rhcloud.com'
for prod: export OPENSHIFT_GEAR_DNS='py1-jhou.rhcloud.com'
3. Test regexp for both vars, test passed
So move this bug to verified.