Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2030974

Summary: external dns pod is CrashLoopBackOff if CR ExternalDNS specifies spec.source.type as OpenShiftRoute
Product: OpenShift Container Platform Reporter: Hongan Li <hongli>
Component: NetworkingAssignee: aos-network-edge-staff <aos-network-edge-staff>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: alebedev, aos-bugs, luzuccar, mmasters
Version: 4.10   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-08 16:03:07 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 Hongan Li 2021-12-10 07:06:50 UTC
Description of problem:
external dns pod is CrashLoopBackOff, and get below error in pod log:
time="2021-12-10T06:53:20Z" level=fatal msg="flag parsing error: unknown long flag '--openshift-router-name'"

OpenShift release version:
4.10.0-0.nightly-2021-12-06-201335
external-dns-operator.v0.1.2

Cluster Platform:
Azure

How reproducible:
100%

Steps to Reproduce (in detail):
1. install cluster and install the externaldns operator from Console>OperatorHub
2. create CR ExternalDNS as below:
---
apiVersion: externaldns.olm.openshift.io/v1alpha1
kind: ExternalDNS
metadata:
  name: sample-azure
spec:
  domain:
  - filterType: Include
    matchType: Exact
    name: hongli-az.qe.xxxx.com
  provider:
    type: Azure
  zones:
    - "xxxx"
  source:
    hostnameAnnotation: Allow
    openshiftRouteOptions:
      routerName: default
    fqdnTemplate:
    - "{{.Name}}.hongli-test.qe.xxxx.com"
    type: OpenShiftRoute


3. check the pod in ns external-dns


Actual results:
$ oc -n external-dns get pod
NAME                                         READY   STATUS             RESTARTS        AGE
external-dns-sample-azure-7dff5487f5-jttbx   0/1     CrashLoopBackOff   39 (3m5s ago)   177m

$ oc -n external-dns logs external-dns-sample-azure-7dff5487f5-jttbx
time="2021-12-10T06:53:20Z" level=fatal msg="flag parsing error: unknown long flag '--openshift-router-name'"


Expected results:
external-dns pod should be running

Impact of the problem:
External DNS doesn't work for OpenShiftRoute

Additional info:
1. the pod is running if specify ExternalDNS spec.source.type as "Service"
2. the external pod consumes the image below: 
  Normal   Pulled          13s (x2 over 14s)  kubelet            Container image "registry.redhat.io/external-dns@sha256:525727af24afe533036f7d634cc0026e59adf15d968a40fd665165ea7f045041" already present on machine



** Please do not disregard the report template; filling the template out as much as possible will allow us to help you. Please consider attaching a must-gather archive (via `oc adm must-gather`). Please review must-gather contents for sensitive information before attaching any must-gathers to a bugzilla report.  You may also mark the bug private if you wish.

Comment 4 Hongan Li 2021-12-14 04:34:56 UTC
verified with 4.10.0-0.nightly-2021-12-12-232810 and latest external-dns-operator.v0.1.2, and the issue has been fixed.

Comment 7 errata-xmlrpc 2022-03-08 16:03:07 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 (Release of ExternalDNS Operator on OperatorHub), 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/RHEA-2022:0781