Bug 1257576

Summary: possible breaking change in oc 1.0.5
Product: OKD Reporter: Aleksandar Kostadinov <akostadi>
Component: ocAssignee: Cesar Wong <cewong>
Status: CLOSED CURRENTRELEASE QA Contact: Yan Du <yadu>
Severity: high Docs Contact:
Priority: medium    
Version: 3.xCC: akostadi, aos-bugs, bparees, ccoleman, cewong, jliggitt, mmccomas, pruan, rcarvalh, yapei
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openshift-3.0.2.0-0.git.0.b0a2fa5.el7ose Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 21:17:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksandar Kostadinov 2015-08-27 11:36:48 UTC
Description of problem:
Looks like oc 1.0.5 introduces a compatibility issue. I'd suggest we don't break backward compatibility with micro releases. Same thing worked with 1.0.4

Version-Release number of selected component (if applicable):
oc v1.0.5
kubernetes v1.1.0-alpha.0-1605-g44c91b1

How reproducible:
always

Steps to Reproduce:
1.oc new-app --docker-image=openshift/ruby-20-centos7\~https://github.com/openshift/ruby-hello-world --name=myapp 

Actual results:
> Error: BuildConfig "myapp" is invalid: triggers[2].type: invalid value 'ConfigChange': invalid trigger type

Expected results:
>      imagestreams/ruby-20-centos7
>      imagestreams/myapp
>      buildconfigs/myapp
>      deploymentconfigs/myapp
>      services/myapp


Additional info:
some thoughts about versioning policy bug 1235445

Comment 1 Fabiano Franz 2015-08-27 20:14:17 UTC
I don't seem to be able to reproduce it, could you provide more info?

$ oc version
oc v1.0.5-67-gc9cb0b6
kubernetes v1.1.0-alpha.0-1605-g44c91b1

$ oc new-app --docker-image=openshift/ruby-20-centos7\~https://github.com/openshift/ruby-hello-world --name=myapp 
imagestreams/ruby-20-centos7
imagestreams/myapp
buildconfigs/myapp
deploymentconfigs/myapp
services/myapp
WARNING: We created an image stream "myapp", but it does not look like a Docker registry has been integrated with the server. Automatic builds and deployments depend on that integration to detect new images and will not function properly.
Build "myapp" created and started - you can run `oc status` to check the progress.
Service "myapp" created at 172.30.98.73 with port mappings 8080.
Run 'oc status' to view your app.

Comment 2 Aleksandar Kostadinov 2015-08-27 20:46:27 UTC
Not sure what can I say more, perhaps it could be related to the underlying environment?
> [fedora@akostadi-fedora22-client ~]$ oc version
> oc v1.0.5
> kubernetes v1.1.0-alpha.0-1605-g44c91b1
> [fedora@akostadi-fedora22-client ~]$ oc new-project asdfg
> Now using project "asdfg" on server "https://openshift-137.example.com:8443".
> [fedora@akostadi-fedora22-client ~]$ oc new-app --docker-image=openshift/ruby-20-centos7\~https://github.com/openshift/ruby-hello-world --name=myapp 
> imagestreams/ruby-20-centos7
> imagestreams/myapp
> Error: BuildConfig "myapp" is invalid: triggers[2].type: invalid value 'ConfigChange': invalid trigger type
> deploymentconfigs/myapp
> services/myapp

This is from the underlying environment:
> [root@openshift-137 ~]# openshift version
> openshift v3.0.1.0-528-g8c2fe51
> kubernetes v1.0.0

Comment 3 Fabiano Franz 2015-08-28 20:56:07 UTC
Ben / Cesar, any clue here?

Comment 4 Peter Ruan 2015-08-28 21:12:42 UTC
This happens when I run it against OSE.3.x using 1.0.5 (or 1.0.4).  I don't see the error when I run the same test against an EC2 instance.

Comment 5 Peter Ruan 2015-08-28 21:55:58 UTC
Here's more information on what we tried.

oc version  | client platform   |  master platform | status |
1.0.4       | Mac               |   OSE            |   F    |
1.0.4       | Linux             |   OSE            |   P    |
1.0.5       | Mac               |   OSE            |   F    |
1.0.5       | Linux             |   OSE            |   F    |

All passed when run against EC2 (devenv-fedora_xxx)

Comment 6 Peter Ruan 2015-08-28 21:57:39 UTC
From the above test matrix, it looks like there are some differences between the client verison for Mac vs Linux as well.

Comment 7 Ben Parees 2015-08-29 01:52:44 UTC
ConfigChange is definitely a new trigger that was introduced, so i can understand the server side not recognizing it, but it should ignore it..I guess our validation rules were a bit aggressive.

I'm not sure what we can do now...the only viable fix would be for the client tools to know what version of the backend they are talking to (And not just an api version) and not add the ConfigChange trigger if they are talking to an older server that is going to fail the validation.

Clayton, how bad did we mess up here? :)

Comment 8 Ben Parees 2015-09-01 22:17:37 UTC
related:
https://github.com/openshift/origin/issues/4447

Comment 9 Peter Ruan 2015-09-01 22:24:01 UTC
The OSE version has this version information.
[root@openshift-138 ~]# oc version
oc v3.0.1.0-528-g8c2fe51
kubernetes v1.0.0

Comment 10 Rodolfo Carvalho 2015-09-07 12:37:35 UTC
Not a fix for existing OSE versions, but in the future we'll be less strict about validating trigger names when this gets merged:

https://github.com/openshift/origin/pull/4556

It will allow new triggers to be added without breaking old versions of servers.

Comment 11 Ben Parees 2015-09-08 15:36:07 UTC
*** Bug 1259263 has been marked as a duplicate of this bug. ***

Comment 12 Ben Parees 2015-09-08 15:36:55 UTC
we discussed this on the bug scrub today and the proposed solution is to catch the validation failure in new-app and then recreate the buildconfig without the trigger and resubmit it.

Comment 13 Cesar Wong 2015-09-10 14:46:30 UTC
PR https://github.com/openshift/origin/pull/4613

Comment 14 Jordan Liggitt 2015-09-11 20:26:55 UTC
PR #2: https://github.com/openshift/origin/pull/4635

Comment 15 Aleksandar Kostadinov 2015-09-14 11:21:06 UTC
Verified with b0a2fa5 client against
> openshift v3.0.1.900-185-g2f7757a

Comment 16 Red Hat Bugzilla 2023-09-14 03:04:21 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days