Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-2911

[gcp][CORS-1774] with both "id" and "project" specified for "privateDNSZone", it seems installer doesn't horner "project"

XMLWordPrintable

    • None
    • 2
    • Sprint 227
    • 1
    • Proposed
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      The service project and the host project both have a private DNS zone named as "ipi-xpn-private-zone". The thing is, although platform.gcp.privateDNSZone.project is set as the host project, the installer checks the zone of the service project, and complains dns name not match. 

      Version-Release number of selected component (if applicable):

      $ openshift-install version
      openshift-install 4.12.0-0.nightly-2022-10-25-210451
      built from commit 14d496fdaec571fa97604a487f5df6a0433c0c68
      release image registry.ci.openshift.org/ocp/release@sha256:d6cc07402fee12197ca1a8592b5b781f9f9a84b55883f126d60a3896a36a9b74
      release architecture amd64
      

      How reproducible:

      Always, if both the service project and the host project have a private DNS zone with the same name.

      Steps to Reproduce:

      1. try IPI installation to a shared VPC, using "privateDNSZone" of the host project
      

      Actual results:

      $ openshift-install create cluster --dir test7
      INFO Credentials loaded from file "/home/fedora/.gcp/osServiceAccount.json" 
      ERROR failed to fetch Metadata: failed to load asset "Install Config": failed to create install config: platform.gcp.privateManagedZone: Invalid value: "ipi-xpn-private-zone": dns zone jiwei-1026a.qe1.gcp.devcluster.openshift.com. did not match expected jiwei-1027a.qe-shared-vpc.qe.gcp.devcluster.openshift.com 
      $ 
      

      Expected results:

      The installer should check the private zone in the specified project (i.e. the host project).

      Additional info:

      $ yq-3.3.0 r test7/install-config.yaml platform
      gcp:
        projectID: openshift-qe
        region: us-central1
        computeSubnet: installer-shared-vpc-subnet-2
        controlPlaneSubnet: installer-shared-vpc-subnet-1
        createFirewallRules: Disabled
        publicDNSZone:
          id: qe-shared-vpc
          project: openshift-qe-shared-vpc
        privateDNSZone:
          id: ipi-xpn-private-zone
          project: openshift-qe-shared-vpc
        network: installer-shared-vpc
        networkProjectID: openshift-qe-shared-vpc
      $ yq-3.3.0 r test7/install-config.yaml baseDomain
      qe-shared-vpc.qe.gcp.devcluster.openshift.com
      $ yq-3.3.0 r test7/install-config.yaml metadata
      creationTimestamp: null
      name: jiwei-1027a
      $ 
      $ openshift-install create cluster --dir test7
      INFO Credentials loaded from file "/home/fedora/.gcp/osServiceAccount.json" 
      ERROR failed to fetch Metadata: failed to load asset "Install Config": failed to create install config: platform.gcp.privateManagedZone: Invalid value: "ipi-xpn-private-zone": dns zone jiwei-1026a.qe1.gcp.devcluster.openshift.com. did not match expected jiwei-1027a.qe-shared-vpc.qe.gcp.devcluster.openshift.com 
      $ 
      $ gcloud --project openshift-qe-shared-vpc dns managed-zones list --filter='name=qe-shared-vpc'
      NAME           DNS_NAME                                        DESCRIPTION  VISIBILITY
      qe-shared-vpc  qe-shared-vpc.qe.gcp.devcluster.openshift.com.               public
      $ gcloud --project openshift-qe-shared-vpc dns managed-zones list --filter='name=ipi-xpn-private-zone'
      NAME                  DNS_NAME                                                    DESCRIPTION                         VISIBILITY
      ipi-xpn-private-zone  jiwei-1027a.qe-shared-vpc.qe.gcp.devcluster.openshift.com.  Preserved private zone for IPI XPN  private
      $ gcloud dns managed-zones list --filter='name=ipi-xpn-private-zone'
      NAME                  DNS_NAME                                       DESCRIPTION                         VISIBILITY
      ipi-xpn-private-zone  jiwei-1026a.qe1.gcp.devcluster.openshift.com.  Preserved private zone for IPI XPN  private
      $ 
      $ gcloud --project openshift-qe-shared-vpc dns managed-zones describe qe-shared-vpc
      cloudLoggingConfig:
        kind: dns#managedZoneCloudLoggingConfig
      creationTime: '2020-04-26T02:50:25.172Z'
      description: ''
      dnsName: qe-shared-vpc.qe.gcp.devcluster.openshift.com.
      id: '7036327024919173373'
      kind: dns#managedZone
      name: qe-shared-vpc
      nameServers:
      - ns-cloud-b1.googledomains.com.
      - ns-cloud-b2.googledomains.com.
      - ns-cloud-b3.googledomains.com.
      - ns-cloud-b4.googledomains.com.
      visibility: public
      $ 
      $ gcloud --project openshift-qe-shared-vpc dns managed-zones describe ipi-xpn-private-zone         
      cloudLoggingConfig:
        kind: dns#managedZoneCloudLoggingConfig
      creationTime: '2022-10-27T08:05:18.332Z'
      description: Preserved private zone for IPI XPN
      dnsName: jiwei-1027a.qe-shared-vpc.qe.gcp.devcluster.openshift.com.
      id: '5506116785330943369'
      kind: dns#managedZone
      name: ipi-xpn-private-zone
      nameServers:
      - ns-gcp-private.googledomains.com.
      privateVisibilityConfig:
        kind: dns#managedZonePrivateVisibilityConfig
        networks:
        - kind: dns#managedZonePrivateVisibilityConfigNetwork
          networkUrl: https://www.googleapis.com/compute/v1/projects/openshift-qe-shared-vpc/global/networks/installer-shared-vpc
      visibility: private
      $ 
      $ gcloud dns managed-zones describe ipi-xpn-private-zone
      cloudLoggingConfig:
        kind: dns#managedZoneCloudLoggingConfig
      creationTime: '2022-10-26T06:42:52.268Z'
      description: Preserved private zone for IPI XPN
      dnsName: jiwei-1026a.qe1.gcp.devcluster.openshift.com.
      id: '7663537481778983285'
      kind: dns#managedZone
      name: ipi-xpn-private-zone
      nameServers:
      - ns-gcp-private.googledomains.com.
      privateVisibilityConfig:
        kind: dns#managedZonePrivateVisibilityConfig
        networks:
        - kind: dns#managedZonePrivateVisibilityConfigNetwork
          networkUrl: https://www.googleapis.com/compute/v1/projects/openshift-qe-shared-vpc/global/networks/installer-shared-vpc
      visibility: private
      $ 
      

       

       

              rh-ee-bbarbach Brent Barbachem
              rhn-support-jiwei Jianli Wei
              Jianli Wei Jianli Wei
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: