migtools / mig-operator

OpenShift Migration Operator
Apache License 2.0
66 stars 46 forks source link

mig-operator latest fails to start #428

Closed djwhatle closed 3 years ago

djwhatle commented 3 years ago

Got this error trying to run mig-operator built from master:

[WARN  tini (8)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Error: unknown flag: --watches-file
Usage:
  operator-sdk run [flags]

Flags:
      --kubeconfig string           The file path to kubernetes configuration file. Defaults to location specified by $KUBECONFIG, or to default file rules if not set
      --namespace string            (Deprecated: use --watch-namespace instead.)The namespace where the operator watches for changes.
      --olm                         The operator to be run will be managed by OLM in a cluster. Cannot be set with another run-type flag
      --olm-namespace string        [olm only] The namespace where OLM is installed (default "olm")
      --operator-namespace string   [olm only] The namespace where operator resources are created. It must already exist in the cluster or be defined in a manifest passed to --include
      --manifests string            [olm only] Directory containing operator bundle directories and metadata
      --operator-version string     [olm only] Version of operator to deploy
      --install-mode string         [olm only] InstallMode to create OperatorGroup with. Format: InstallModeType=[ns1,ns2[, ...]]
      --include strings             [olm only] Path to Kubernetes resource manifests, ex. Role, Subscription. These supplement or override defaults generated by run/cleanup
      --timeout duration            [olm only] Time to wait for the command to complete before failing (default 2m0s)
      --local                       The operator will be run locally by building the operator binary with the ability to access a kubernetes cluster using a kubeconfig file. Cannot be set with another run-type flag.
      --watch-namespace string      [local only] The namespace where the operator watches for changes. Set "" for AllNamespaces, set "ns1,ns2" for MultiNamespace
      --operator-flags string       [local only] The flags that the operator needs. Example: "--flag1 value1 --flag2=value2"
      --go-ldflags string           [local only] Set Go linker options
      --enable-delve                [local only] Start the operator using the delve debugger
  -h, --help                        help for run

Global Flags:
      --verbose   Enable verbose logging
djwhatle commented 3 years ago

image

jmontleon commented 3 years ago

I just installed latest and it's working fine. It was probably built within the last 20 minutes. Any more info?

jmontleon commented 3 years ago

Did you build your own? Maybe you need to update your operator-sdk image? docker pull quay.io/operator-framework/ansible-operator:latest?

jmontleon commented 3 years ago
$ docker pull quay.io/operator-framework/ansible-operator:latest
latest: Pulling from operator-framework/ansible-operator
Digest: sha256:c5aabcda683416ce2273a61ee7b7e3bfa2385d0c0402b6b3eceb23048c5515ac
Status: Image is up to date for quay.io/operator-framework/ansible-operator:latest
quay.io/operator-framework/ansible-operator:latest

$ docker run --rm -it --entrypoint=ansible-operator quay.io/operator-framework/ansible-operator:latest run --help
Run the operator

Usage:
  ansible-operator run [flags]

Flags:
      --ansible-args string                Ansible args. Allows user to specify arbitrary arguments for ansible-based operators.
      --ansible-collections-path string    Path to installed Ansible Collections. If set, collections should be located in {{value}}/ansible_collections/. If unset, collections are assumed to be in ~/.ansible/collections or /usr/share/ansible/collections.
      --ansible-roles-path string          Ansible Roles Path. If unset, roles are assumed to be in {{CWD}}/roles.
      --ansible-verbosity int              Ansible verbosity. Overridden by environment variable. (default 2)
      --enable-leader-election             Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager.
  -h, --help                               help for run
      --inject-owner-ref                   The ansible operator will inject owner references unless this flag is false (default true)
      --leader-election-id string          Name of the configmap that is used for holding the leader lock.
      --leader-election-namespace string   Namespace in which to create the leader election configmap for holding the leader lock (required if running locally with leader election enabled).
      --max-concurrent-reconciles int      Maximum number of concurrent reconciles for controllers. Overridden by environment variable. (default 16)
      --metrics-addr string                The address the metric endpoint binds to (default ":8080")
      --reconcile-period duration          Default reconcile period for controllers (default 1m0s)
      --watches-file string                Path to the watches file to use (default "./watches.yaml")
      --zap-devel                          Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
      --zap-encoder encoder                Zap log encoding ('json' or 'console')
      --zap-log-level level                Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity
      --zap-stacktrace-level level         Zap Level at and above which stacktraces are captured (one of 'info', 'error').

--watches-file is valid on latest

djwhatle commented 3 years ago

I did build my own, perhaps need to re-pull the base image as you say. Will try later today.

djwhatle commented 3 years ago

This was resolved by updating my base image. Thanks @jmontleon