Bug 1835477 - run-local make target is broken
Summary: run-local make target is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Routing
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Daneyon Hansen
QA Contact: Hongan Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-13 21:41 UTC by Daneyon Hansen
Modified: 2020-07-13 17:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-07-13 17:38:37 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-ingress-operator pull 398 0 None closed Bug 1835477: updates run-local script to use flags 2020-06-24 02:34:40 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:38:52 UTC

Description Daneyon Hansen 2020-05-13 21:41:12 UTC
Description of problem:
Running "make run-local" fails with:

$ make run-local
hack/run-local.sh
deployment.apps/cluster-version-operator scaled
deployment.apps/ingress-operator scaled
Image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:31cb93b70dabeadfee2165bcaa1d36a3aafbed44358d3e0658af4ba44acf0e5b
Release version: 4.4.0-0.nightly-2020-05-12-234606
Error: required flag(s) "image", "namespace" not set
Usage:
  ingress-operator start [flags]

Flags:
  -h, --help                         help for start
  -i, --image string                 image of the ingress controller the operator will manage (required)
      --metrics-listen-addr string   metrics endpoint listen address (required) (default ":60000")
  -n, --namespace string             namespace the operator is deployed to (required) (default "openshift-ingress-operator")
      --release-version string       the release version the operator should converge to (required) (default "unknown")
  -s, --shutdown-file string         if provided, shut down the operator when this file changes (default "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem")

Version-Release number of selected component (if applicable):
$ oc get co/ingress
NAME      VERSION                             AVAILABLE   PROGRESSING   DEGRADED   SINCE
ingress   4.4.0-0.nightly-2020-05-12-234606   True        False         False      7m19s

How reproducible:
Always

Steps to Reproduce:
1. Install a cluster
2. Run "make run-local"

Actual results:
Failed to run the ingress operator

Expected results:
Run the ingress operator

Additional info:

Comment 3 Hongan Li 2020-05-19 09:02:19 UTC
$ oc get co/ingress
NAME      VERSION                             AVAILABLE   PROGRESSING   DEGRADED   SINCE
ingress   4.5.0-0.nightly-2020-05-18-225907   True        False         False      6h42m

$ make run-local
hack/run-local.sh
deployment.apps/cluster-version-operator scaled
deployment.apps/ingress-operator scaled
Image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:430cf1bc3b7506e935578db1a9a193f21c12ffa23534ece6f5d826d02112d061
Release version: 4.5.0-0.nightly-2020-05-18-225907
Namespace: openshift-ingress-operator
hack/run-local.sh: line 17: ./ingress-operator: No such file or directory
make: *** [Makefile:72: run-local] Error 127

Am I missing something?

Comment 4 Miciah Dashiel Butler Masters 2020-05-19 13:40:50 UTC
The following should work:

    make build run-local

Dane, is there any reason we don't make the following change so that the run-local target depends on the build target?

    @@ -68,5 +68,5 @@ uninstall:
     	hack/uninstall.sh
     
     .PHONY: run-local
    -run-local:
    +run-local: build
     	hack/run-local.sh

Comment 5 Andrew McDermott 2020-05-19 15:27:39 UTC
(In reply to Hongan Li from comment #3)
> $ oc get co/ingress
> NAME      VERSION                             AVAILABLE   PROGRESSING  
> DEGRADED   SINCE
> ingress   4.5.0-0.nightly-2020-05-18-225907   True        False        
> False      6h42m
> 
> $ make run-local
> hack/run-local.sh
> deployment.apps/cluster-version-operator scaled
> deployment.apps/ingress-operator scaled
> Image:
> quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:
> 430cf1bc3b7506e935578db1a9a193f21c12ffa23534ece6f5d826d02112d061
> Release version: 4.5.0-0.nightly-2020-05-18-225907
> Namespace: openshift-ingress-operator
> hack/run-local.sh: line 17: ./ingress-operator: No such file or directory
> make: *** [Makefile:72: run-local] Error 127
> 
> Am I missing something?

No, it assumes you have built the binary using `make build`.

If you run `make build` first, then `make run-local` this should now work (at least for verification).

Comment 6 Andrew McDermott 2020-05-19 15:29:35 UTC
(In reply to Andrew McDermott from comment #5)
> (In reply to Hongan Li from comment #3)
> > $ oc get co/ingress
> > NAME      VERSION                             AVAILABLE   PROGRESSING  
> > DEGRADED   SINCE
> > ingress   4.5.0-0.nightly-2020-05-18-225907   True        False        
> > False      6h42m
> > 
> > $ make run-local
> > hack/run-local.sh
> > deployment.apps/cluster-version-operator scaled
> > deployment.apps/ingress-operator scaled
> > Image:
> > quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:
> > 430cf1bc3b7506e935578db1a9a193f21c12ffa23534ece6f5d826d02112d061
> > Release version: 4.5.0-0.nightly-2020-05-18-225907
> > Namespace: openshift-ingress-operator
> > hack/run-local.sh: line 17: ./ingress-operator: No such file or directory
> > make: *** [Makefile:72: run-local] Error 127
> > 
> > Am I missing something?
> 
> No, it assumes you have built the binary using `make build`.
> 
> If you run `make build` first, then `make run-local` this should now work
> (at least for verification).

Moving this back to MODIFIED because as things stand there is no dependency that run-local should build first. We can follow up if necessary with that change as I think we should add the same dependency for the `test-e2e` target too.

Comment 8 Hongan Li 2020-05-20 06:51:02 UTC
Thank you, Miciah and Andrew. It works now and moving the BZ to verified. 

$ make run-local
hack/run-local.sh
deployment.apps/cluster-version-operator scaled
deployment.apps/ingress-operator scaled
Image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:430cf1bc3b7506e935578db1a9a193f21c12ffa23534ece6f5d826d02112d061
Release version: 4.5.0-0.nightly-2020-05-19-041951
Namespace: openshift-ingress-operator
I0520 14:38:50.774279    8030 request.go:621] Throttling request took 1.045685873s, request: GET:https://api.hongli-pl951.qe.gcp.devcluster.openshift.com:6443/apis/image.openshift.io/v1?timeout=32s
2020-05-20T14:38:51.983+0800	INFO	operator.main	ingress-operator/start.go:107	using operator namespace	{"namespace": "openshift-ingress-operator"}
2020-05-20T14:38:55.277+0800	INFO	operator.init.controller-runtime.metrics	metrics/listener.go:44	metrics server is starting to listen	{"addr": ":60000"}

Comment 10 errata-xmlrpc 2020-07-13 17:38:37 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://access.redhat.com/errata/RHBA-2020:2409


Note You need to log in before you can comment on or make changes to this bug.