Skip to content

status: Add more details for a broken dc trigger#6224

Merged
openshift-bot merged 1 commit intoopenshift:masterfrom
0xmichalis:promote-info-marker
Dec 18, 2015
Merged

status: Add more details for a broken dc trigger#6224
openshift-bot merged 1 commit intoopenshift:masterfrom
0xmichalis:promote-info-marker

Conversation

@0xmichalis
Copy link
Contributor

Builds on changes from #6078

@deads2k @ironcladlou @smarterclayton

@0xmichalis
Copy link
Contributor Author

[vagrant@localhost sample-app]$ oc status
In project test on server https://localhost:8443

svc/database - 172.30.16.62:5434 -> 3306
  dc/database deploys docker.io/openshift/mysql-55-centos7:latest 
    #1 deployment running for 15 seconds - 1 pod

svc/doesntmatter - 172.30.93.6:5432 -> 8080
  exposed by route/etcd-cruft

svc/frontend - 172.30.6.25:5432 -> 8080
  dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest 
      not built yet
    #1 deployment waiting on image or update
  exposed by route/route-edge

Warnings:
  * The image trigger for dc/frontend will have no effect because imagestreamtag/origin-ruby-sample:latest does not exist but bc/ruby-sample-build points to imagestreamtag/origin-ruby-sample:latest.
  * route/etcd-cruft has a TLS configuration but no termination type specified.

2 warnings identified, use 'oc status -v' to see details.

[vagrant@localhost sample-app]$ oc status -v
In project test on server https://localhost:8443

svc/database - 172.30.16.62:5434 -> 3306
  dc/database deploys docker.io/openshift/mysql-55-centos7:latest 
    #1 deployed 33 seconds ago - 1 pod

svc/doesntmatter - 172.30.93.6:5432 -> 8080
  exposed by route/etcd-cruft

svc/frontend - 172.30.6.25:5432 -> 8080
  dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest 
      not built yet
    #1 deployment waiting on image or update
  exposed by route/route-edge

Warnings:
  * The image trigger for dc/frontend will have no effect because imagestreamtag/origin-ruby-sample:latest does not exist but bc/ruby-sample-build points to imagestreamtag/origin-ruby-sample:latest.
    try: oc start-build bc/ruby-sample-build
  * route/etcd-cruft has a TLS configuration but no termination type specified.
    try: oc patch route/etcd-cruft -p '{"spec":{"tls":{"termination":"<type>"}}}' (replace <type> with a valid termination type: edge, passthrough, reencrypt)

To see more, use 'oc describe <resource>/<name>'.
You can use 'oc get all' to see a list of other objects.

@smarterclayton
Copy link
Contributor

Without -v I wouldn't expect to see the list of warnings

On Mon, Dec 7, 2015 at 7:00 AM, Michail Kargakis notifications@github.com
wrote:

[vagrant@localhost sample-app]$ oc status
In project test on server https://localhost:8443

svc/database - 172.30.16.62:5434 -> 3306
dc/database deploys docker.io/openshift/mysql-55-centos7:latest
#1 deployment running for 15 seconds - 1 pod

svc/doesntmatter - 172.30.93.6:5432 -> 8080
exposed by route/etcd-cruft

svc/frontend - 172.30.6.25:5432 -> 8080
dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest
not built yet
#1 deployment waiting on image or update
exposed by route/route-edge

Warnings:

  • The image trigger for dc/frontend will have no effect because imagestreamtag/origin-ruby-sample:latest does not exist but bc/ruby-sample-build points to imagestreamtag/origin-ruby-sample:latest.
  • route/etcd-cruft has a TLS configuration but no termination type specified.

2 warnings identified, use 'oc status -v' to see details.

[vagrant@localhost sample-app]$ oc status -v
In project test on server https://localhost:8443

svc/database - 172.30.16.62:5434 -> 3306
dc/database deploys docker.io/openshift/mysql-55-centos7:latest
#1 deployed 33 seconds ago - 1 pod

svc/doesntmatter - 172.30.93.6:5432 -> 8080
exposed by route/etcd-cruft

svc/frontend - 172.30.6.25:5432 -> 8080
dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest
not built yet
#1 deployment waiting on image or update
exposed by route/route-edge

Warnings:

  • The image trigger for dc/frontend will have no effect because imagestreamtag/origin-ruby-sample:latest does not exist but bc/ruby-sample-build points to imagestreamtag/origin-ruby-sample:latest.
    try: oc start-build bc/ruby-sample-build
  • route/etcd-cruft has a TLS configuration but no termination type specified.
    try: oc patch route/etcd-cruft -p '{"spec":{"tls":{"termination":""}}}' (replace with a valid termination type: edge, passthrough, reencrypt)

To see more, use 'oc describe /'.
You can use 'oc get all' to see a list of other objects.


Reply to this email directly or view it on GitHub
#6224 (comment).

@deads2k
Copy link
Contributor

deads2k commented Dec 8, 2015

Without -v I wouldn't expect to see the list of warnings

Ok, can you describe the distinction between warnings and errors? Right now, warnings mean "this thing isn't behaving how you think it will". The two examples shown above (bad dc trigger and bad tls termination on route), do you see them as errors or warnings?

@smarterclayton
Copy link
Contributor

Two axis:

Usability: only nag me about fixing things that I must fix, or should
fix. If I may not want to fix it, and you nag me, it devalues the nag and
makes all other errors harder to read.

Warning vs Error: An error is "this is broken and we have no doubt". A
warning is "this might be broken but we're not positive".

On Tue, Dec 8, 2015 at 8:15 AM, David Eads notifications@github.com wrote:

Without -v I wouldn't expect to see the list of warnings

Ok, can you describe the distinction between warnings and errors? Right
now, warnings mean "this thing isn't behaving how you think it will". The
two examples shown above (bad dc trigger and bad tls termination on route),
do you see them as errors or warnings?


Reply to this email directly or view it on GitHub
#6224 (comment).

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 11, 2015
@0xmichalis 0xmichalis changed the title Promote info marker - suggest oc start-build status: Add more details for a broken dc trigger Dec 14, 2015
@0xmichalis
Copy link
Contributor Author

@deads2k @ironcladlou @smarterclayton PTAL, I have added a couple of more cases and suggestions for dc triggers. Fixing #6281 too

@0xmichalis
Copy link
Contributor Author

Needs a new unit test and another fixed

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2015
@0xmichalis
Copy link
Contributor Author

[test]

@0xmichalis
Copy link
Contributor Author

@deads2k @ironcladlou this is ready for reviewing.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 16, 2015
@0xmichalis
Copy link
Contributor Author

#6065 flake

[test]

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't I attach this sort of marker to the build config, instead of the deployment config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I updated both this error and the warning re a bc with no builds. ptal so I can squash

@deads2k
Copy link
Contributor

deads2k commented Dec 16, 2015

implementation looks fine, just not sure of where I'd want the marker. Seems like I'd want it on the build config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, wouldn't it make more sense to move this entire check to pkg/build/graph/analysis and make the marker there? Both the error and the help make sense there. The other marker (TagNotAvailable), will still make sense too, but that way I'll get help when all I have are builds or chained builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved build related issues

@0xmichalis
Copy link
Contributor Author

$ oc status -v
In project test on server https://localhost:8443

svc/database - 172.30.60.90:5434 -> 3306
  dc/database deploys docker.io/openshift/mysql-55-centos7:latest 
    #1 deployment running for 9 seconds

svc/frontend - 172.30.95.119:5432 -> 8080
  dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest 
      #1 build running for 4 seconds
    #1 deployment waiting on image or update
  exposed by route/route-edge

Warnings:
  * imagestreamtag/origin-ruby-sample:latest needs to be imported or created by a build.
  * The image trigger for dc/frontend will have no effect until imagestreamtag/origin-ruby-sample:latest is imported or created by a build.

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't I see this suggestion in your output?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a running build there. Will post two more (one with this and one with a failed build).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a running build there. Will post two more (one with this and one with a failed build).

Hmmm... I hadn't considered that. Think we should skip the warning if a build is in progress?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fine. How about the dc trigger warning? Should we detect that a build is running and print something like Waiting on build/%s to complete for triggering a new deployment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds fine. How about the dc trigger warning? Should we detect that a build is running and print something like Waiting on build/%s to complete for triggering a new deployment

Yes. Your choice on this pull or another pull.

@0xmichalis
Copy link
Contributor Author

So my build just failed

$ oc status -v
In project test on server https://localhost:8443

svc/database - 172.30.60.90:5434 -> 3306
  dc/database deploys docker.io/openshift/mysql-55-centos7:latest 
    #1 deployment running for 9 minutes

svc/frontend - 172.30.95.119:5432 -> 8080
  dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest 
      #1 build failed 48 seconds ago - 5868780: Merge pull request #49 from bparees/bump_version (Ben Parees <bparees@users.noreply.github.com>)
    #1 deployment waiting on image or update
  exposed by route/route-edge

Errors:
  * build/ruby-sample-build-1 has failed.
    try: Inspect the build failure with 'oc logs build/ruby-sample-build-1'
Warnings:
  * The image trigger for dc/frontend will have no effect until imagestreamtag/origin-ruby-sample:latest is imported or created by a build.

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.

I delete it and now I have none

[vagrant@localhost sample-app]$ oc delete builds --all
build "ruby-sample-build-1" deleted

[vagrant@localhost sample-app]$ oc status -v
In project test on server https://localhost:8443

svc/database - 172.30.60.90:5434 -> 3306
  dc/database deploys docker.io/openshift/mysql-55-centos7:latest 
    #1 deployment running for 10 minutes

svc/frontend - 172.30.95.119:5432 -> 8080
  dc/frontend deploys imagestreamtag/origin-ruby-sample:latest <-
    bc/ruby-sample-build builds https://github.com/openshift/ruby-hello-world.git with test/ruby-22-centos7:latest 
      not built yet
    #1 deployment waiting on image or update
  exposed by route/route-edge

Warnings:
  * imagestreamtag/origin-ruby-sample:latest needs to be imported or created by a build.
    try: oc start-build bc/ruby-sample-build
  * The image trigger for dc/frontend will have no effect until imagestreamtag/origin-ruby-sample:latest is imported or created by a build.

View details with 'oc describe <resource>/<name>' or list everything with 'oc get all'.

@deads2k
Copy link
Contributor

deads2k commented Dec 17, 2015

@openshift/ui-review Adding more linkage checking and debugging help to oc status. I think the web console already does this.

@deads2k
Copy link
Contributor

deads2k commented Dec 17, 2015

@stevekuznetsov take a pass?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to use this syntax? continue will jump to the next iteration of the for loop as-is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time we hit a marker for an object, there is no need to continue inspecting it (assuming markers in the same unit are placed in order of precedence).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevekuznetsov you are right, the label was primarily used in other places where we are using nested loops. Will remove it here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every time we hit a marker for an object, there is no need to continue inspecting it (assuming markers in the same unit are placed in order of precedence).

I wouldn't expect a continue inside a switch to require the label. break would, but I don't think continue does.

@stevekuznetsov
Copy link
Contributor

If all -v is doing is adding the try: messages to warnings already shown by oc status, it seems unnecessary, we might as well show both.

@deads2k
Copy link
Contributor

deads2k commented Dec 17, 2015

If all -v is doing is adding the try: messages to warnings already shown by oc status, it seems unnecessary, we might as well show both.

eh, wrong jungle.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Godoc with list of precedence would be nice here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@stevekuznetsov
Copy link
Contributor

Two small nits, but otherwise LGTM.

@deads2k understood

@0xmichalis
Copy link
Contributor Author

I have updated the build analysis to take into account {new,pending,running} builds and not warn for them. Have another look in FindPendingTags. Will add godoc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we raise a warning here as well telling them to re-start the build?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the build is complete we should have the tag populated so we should never hit this. Or even if we do, it's probably a race and we should do nothing I think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this return a *buildgraph.BuildConfigNode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really care about these helpers, will change to specific node kinds.

@0xmichalis
Copy link
Contributor Author

Comments addressed, squashed

I will update the dc trigger warning in a follow-up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename to latestBuild? That helps me remember which build we're attaching the marker to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@deads2k
Copy link
Contributor

deads2k commented Dec 17, 2015

Minor comments on types and anonymous inclusion. lgtm otherwise.

If there is no build running for an istag where the user has placed an
ICT, suggest oc start-build or oc logs.
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 7f1d28e

@deads2k
Copy link
Contributor

deads2k commented Dec 17, 2015

lgtm [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4397/) (Image: devenv-rhel7_2983)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 7f1d28e

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7914/)

openshift-bot pushed a commit that referenced this pull request Dec 18, 2015
@openshift-bot openshift-bot merged commit 45d4849 into openshift:master Dec 18, 2015
@0xmichalis 0xmichalis deleted the promote-info-marker branch December 18, 2015 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants