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

[gcp][CORS-2420] deploying compact 3-nodes cluster on GCP, by setting mastersSchedulable as true and removing worker machineset YAMLs, got panic

XMLWordPrintable

    • Low
    • No
    • Sprint 254, Sprint 255
    • 2
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, when attempting to install a three node cluster on GCP with invalid configuration, the installation would fail with a panic error that did not report the reason for the failure. With this update, the installation program validates the installation configuration to successfully install a three node cluster on GCP. (link:https://issues.redhat.com/browse/OCPBUGS-35103[*OCPBUGS-35103*])
      Show
      * Previously, when attempting to install a three node cluster on GCP with invalid configuration, the installation would fail with a panic error that did not report the reason for the failure. With this update, the installation program validates the installation configuration to successfully install a three node cluster on GCP. (link: https://issues.redhat.com/browse/OCPBUGS-35103 [* OCPBUGS-35103 *])
    • Bug Fix
    • Done

      This is a clone of issue OCPBUGS-35099. The following is the description of the original issue:

      This is a clone of issue OCPBUGS-4466. The following is the description of the original issue:

      Description of problem:

      deploying compact 3-nodes cluster on GCP, by setting mastersSchedulable as true and removing worker machineset YAMLs, got panic

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

      $ openshift-install version
      openshift-install 4.13.0-0.nightly-2022-12-04-194803
      built from commit cc689a21044a76020b82902056c55d2002e454bd
      release image registry.ci.openshift.org/ocp/release@sha256:9e61cdf7bd13b758343a3ba762cdea301f9b687737d77ef912c6788cbd6a67ea
      release architecture amd64
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. create manifests
      2. set 'spec.mastersSchedulable' as 'true', in <installation dir>/manifests/cluster-scheduler-02-config.yml
      3. remove the worker machineset YAML file from <installation dir>/openshift directory
      4. create cluster 

      Actual results:

      Got "panic: runtime error: index out of range [0] with length 0".

      Expected results:

      The installation should succeed, or giving clear error messages. 

      Additional info:

      $ openshift-install version
      openshift-install 4.13.0-0.nightly-2022-12-04-194803
      built from commit cc689a21044a76020b82902056c55d2002e454bd
      release image registry.ci.openshift.org/ocp/release@sha256:9e61cdf7bd13b758343a3ba762cdea301f9b687737d77ef912c6788cbd6a67ea
      release architecture amd64
      $ 
      $ openshift-install create manifests --dir test1
      ? SSH Public Key /home/fedora/.ssh/openshift-qe.pub
      ? Platform gcp
      INFO Credentials loaded from file "/home/fedora/.gcp/osServiceAccount.json"
      ? Project ID OpenShift QE (openshift-qe)
      ? Region us-central1
      ? Base Domain qe.gcp.devcluster.openshift.com
      ? Cluster Name jiwei-1205a
      ? Pull Secret [? for help] ******
      INFO Manifests created in: test1/manifests and test1/openshift 
      $ 
      $ vim test1/manifests/cluster-scheduler-02-config.yml
      $ yq-3.3.0 r test1/manifests/cluster-scheduler-02-config.yml spec.mastersSchedulable
      true
      $ 
      $ rm -f test1/openshift/99_openshift-cluster-api_worker-machineset-?.yaml
      $ 
      $ tree test1
      test1
      ├── manifests
      │   ├── cloud-controller-uid-config.yml
      │   ├── cloud-provider-config.yaml
      │   ├── cluster-config.yaml
      │   ├── cluster-dns-02-config.yml
      │   ├── cluster-infrastructure-02-config.yml
      │   ├── cluster-ingress-02-config.yml
      │   ├── cluster-network-01-crd.yml
      │   ├── cluster-network-02-config.yml
      │   ├── cluster-proxy-01-config.yaml
      │   ├── cluster-scheduler-02-config.yml
      │   ├── cvo-overrides.yaml
      │   ├── kube-cloud-config.yaml
      │   ├── kube-system-configmap-root-ca.yaml
      │   ├── machine-config-server-tls-secret.yaml
      │   └── openshift-config-secret-pull-secret.yaml
      └── openshift
          ├── 99_cloud-creds-secret.yaml
          ├── 99_kubeadmin-password-secret.yaml
          ├── 99_openshift-cluster-api_master-machines-0.yaml
          ├── 99_openshift-cluster-api_master-machines-1.yaml
          ├── 99_openshift-cluster-api_master-machines-2.yaml
          ├── 99_openshift-cluster-api_master-user-data-secret.yaml
          ├── 99_openshift-cluster-api_worker-user-data-secret.yaml
          ├── 99_openshift-machineconfig_99-master-ssh.yaml
          ├── 99_openshift-machineconfig_99-worker-ssh.yaml
          ├── 99_role-cloud-creds-secret-reader.yaml
          └── openshift-install-manifests.yaml2 directories, 26 files
      $ 
      $ openshift-install create cluster --dir test1
      INFO Consuming Openshift Manifests from target directory
      INFO Consuming Master Machines from target directory 
      INFO Consuming Worker Machines from target directory 
      INFO Consuming OpenShift Install (Manifests) from target directory 
      INFO Consuming Common Manifests from target directory 
      INFO Credentials loaded from file "/home/fedora/.gcp/osServiceAccount.json" 
      panic: runtime error: index out of range [0] with length 0goroutine 1 [running]:
      github.com/openshift/installer/pkg/tfvars/gcp.TFVars({{{0xc000cf6a40, 0xc}, {0x0, 0x0}, {0xc0011d4a80, 0x91d}}, 0x1, 0x1, {0xc0010abda0, 0x58}, ...})
              /go/src/github.com/openshift/installer/pkg/tfvars/gcp/gcp.go:70 +0x66f
      github.com/openshift/installer/pkg/asset/cluster.(*TerraformVariables).Generate(0x1daff070, 0xc000cef530?)
              /go/src/github.com/openshift/installer/pkg/asset/cluster/tfvars.go:479 +0x6bf8
      github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc000c78870, {0x1a777f40, 0x1daff070}, {0x0, 0x0})
              /go/src/github.com/openshift/installer/pkg/asset/store/store.go:226 +0x5fa
      github.com/openshift/installer/pkg/asset/store.(*storeImpl).Fetch(0x7ffc4c21413b?, {0x1a777f40, 0x1daff070}, {0x1dadc7e0, 0x8, 0x8})
              /go/src/github.com/openshift/installer/pkg/asset/store/store.go:76 +0x48
      main.runTargetCmd.func1({0x7ffc4c21413b, 0x5})
              /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:259 +0x125
      main.runTargetCmd.func2(0x1dae27a0?, {0xc000c702c0?, 0x2?, 0x2?})
              /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:289 +0xe7
      github.com/spf13/cobra.(*Command).execute(0x1dae27a0, {0xc000c70280, 0x2, 0x2})
              /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:876 +0x67b
      github.com/spf13/cobra.(*Command).ExecuteC(0xc000c3a500)
              /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:990 +0x3bd
      github.com/spf13/cobra.(*Command).Execute(...)
              /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:918
      main.installerMain()
              /go/src/github.com/openshift/installer/cmd/openshift-install/main.go:61 +0x2b0
      main.main()
              /go/src/github.com/openshift/installer/cmd/openshift-install/main.go:38 +0xff
      $ 
      

       

       

            sdasu@redhat.com Sandhya Dasu
            openshift-crt-jira-prow OpenShift Prow Bot
            Jianli Wei Jianli Wei
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: