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

Openshift-install bootstrap operation cannot find a cloud defined in clouds.yaml in the current directory

XMLWordPrintable

    • +
    • Important
    • None
    • ShiftStack Sprint 227, ShiftStack Sprint 228, ShiftStack Sprint 229, ShiftStack Sprint 230
    • 4
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • None

      Description of problem:

      Openshift-install destroy bootstrap cannot find a cloud defined in clouds.yaml in the current directory. (IPI installation)

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

      4.11.0-0.nightly-2022-11-18-172834 on top of RHOS-16.1-RHEL-8-20220804.n.1:
      
      $ openshift-install version      
      openshift-install 4.11.0-0.nightly-2022-11-18-172834
      built from commit 0c4e73175c1aaa2140fb360ce8ff44a4b9dd669f
      release image registry.ci.openshift.org/ocp/release@sha256:46117ba2e9000f4816ec86eaf8f11c9b840d71eb3e13732df814b4de33f46491
      release architecture amd64
                                
      $ oc get clusterversion   
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.11.0-0.nightly-2022-11-18-172834   True        False         157m    Cluster version is 4.11.0-0.nightly-2022-11-18-172834
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. Define 'shiftstack' cloud in clouds.yaml in the current directory:
      ```
      $ grep -A 5 shiftstack clouds.yaml
       shiftstack:
          auth:
              auth_url: https://10.46.44.140:13000
              password: not_the_real_pass
              project_domain_name: Default
              project_name: shiftstack
              project_id: 5ad951d3776b46b3a6952aea86c9ad23
              user_domain_name: Default
              username: shiftstack_user
          cacert: /etc/pki/ca-trust/source/anchors/undercloud-cacert.pem
          identity_api_version: '3'
          region_name: regionOne
      
      ```
      
      2. Configure the "shiftstack" cloud in the install-config.yaml:
      ```
      platform:
        openstack:
          cloud:            "shiftstack"
          externalNetwork:  "nova"
          region:           "regionOne"
          computeFlavor:    "m4.xlarge"
          lbFloatingIP:     "10.46.44.161"
          ingressFloatingIP:     "10.46.44.182"
          externalDNS:      ["10.46.0.31"]
      ```
      
      3. Run the 'openshift-install destroy bootstrap':
      ```
      $ openshift-install destroy bootstrap --dir ostest --log-level debug
      DEBUG OpenShift Installer 4.11.0-0.nightly-2022-11-18-172834
      DEBUG Built from commit 0c4e73175c1aaa2140fb360ce8ff44a4b9dd669f
      ```
      ...
      ```
      ERROR Error: cloud shiftstack does not exist in clouds.yaml
      ERROR
      ERROR   with provider["openshift/local/openstack"],
      ERROR   on main.tf line 5, in provider "openstack":
      ERROR    5: provider "openstack" {
      ERROR
      FATAL terraform destroy: failed doing terraform destroy: exit status 1
      FATAL
      FATAL Error: cloud shiftstack does not exist in clouds.yaml
      FATAL
      FATAL   with provider["openshift/local/openstack"],
      FATAL   on main.tf line 5, in provider "openstack":
      FATAL    5: provider "openstack" {
      ```

      Actual results:

      But OCP-installer fails to find the shiftstack cloud

      Expected results:

      The installer looks at the cloud.yaml finding the correct cloud name

      Additional info:

      * "openshift-install create cluster" manages to find the shiftstack cloud in the same environment.
      
      * A similar issue, where "openshift-install create the cluster" failed to find a cloud defined in clouds.yaml in the current directory, fixed by https://bugzilla.redhat.com/show_bug.cgi?id=2064693.

      Workaround:

      Set the OS_CLIENT_CONFIG_FILE environment variable before executing the openshift-install:
      ```
      $ pwd
      /home/stack
      $ export OS_CLIENT_CONFIG_FILE=/home/stack/clouds.yaml
      $ openshift-install destroy bootstrap --dir ostest --log-level debug
      DEBUG Destroy complete! Resources: 0 destroyed.
      INFO Time elapsed: 3s
      ```

            mdemaced Maysa De Macedo Souza
            rhn-support-imatza Itay Matza
            Itay Matza Itay Matza
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: