Skip to content

create manifests then create cluster panic #1205

@e-minguez

Description

@e-minguez

Version

$ openshift-install version
openshift-install unreleased-master-246-g193a3f2cb7b8da375da90126ac4757254cdb17fe

Platform (aws|libvirt|openstack):

libvirt

What happened?

  • Installer compiled with libvirt support
  • install-config.yaml content:
apiVersion: v1beta1
baseDomain: ocp4.lan
machines:
- name: master
  platform: {}
  replicas: 1
- name: worker
  platform: {}
  replicas: 1
metadata:
  creationTimestamp: null
  name: minwi
networking:
  clusterNetworks:
  - cidr: 10.128.0.0/14
    hostSubnetLength: 9
  machineCIDR: 192.168.126.0/24
  serviceCIDR: 172.30.0.0/16
  type: OpenshiftSDN
platform:
  libvirt:
    URI: qemu+tcp://192.168.122.1/system
    network:
      if: tt0
pullSecret: '{"auths":{"cloud.openshift.com":{"auth":"x","email":"x"},"quay.io":{"auth":"x","email":"x"}}}'
sshKey: |
  ssh-rsa x [email protected]
  • mkdir assets
  • cp install-config.yaml assets/
  • openshift-install create manifests --dir=./assets/ --log-level=debug
  • Manifests generated:
assets/
assets/.openshift_install.log
assets/.openshift_install_state.json
assets/manifests
assets/manifests/04-openshift-machine-config-operator.yaml
assets/manifests/09-openshift-service-signer-namespace.yaml
assets/manifests/cluster-config.yaml
assets/manifests/cluster-dns-01-crd.yaml
assets/manifests/cluster-dns-02-config.yml
assets/manifests/cluster-infrastructure-01-crd.yaml
assets/manifests/cluster-infrastructure-02-config.yml
assets/manifests/cluster-ingress-01-crd.yaml
assets/manifests/cluster-ingress-02-config.yml
assets/manifests/cluster-network-01-crd.yml
assets/manifests/cluster-network-02-config.yml
assets/manifests/cvo-overrides.yaml
assets/manifests/etcd-service.yaml
assets/manifests/host-etcd-service-endpoints.yaml
assets/manifests/host-etcd-service.yaml
assets/manifests/kube-cloud-config.yaml
assets/manifests/kube-system-configmap-etcd-serving-ca.yaml
assets/manifests/kube-system-configmap-root-ca.yaml
assets/manifests/kube-system-secret-etcd-client.yaml
assets/manifests/machine-config-server-tls-secret.yaml
assets/manifests/openshift-service-signer-secret.yaml
assets/manifests/pull.json
assets/openshift
assets/openshift/99_binding-discovery.yaml
assets/openshift/99_kubeadmin-password-secret.yaml
assets/openshift/99_openshift-cluster-api_cluster.yaml
assets/openshift/99_openshift-cluster-api_master-machines.yaml
assets/openshift/99_openshift-cluster-api_master-user-data-secret.yaml
assets/openshift/99_openshift-cluster-api_worker-machineset.yaml
assets/openshift/99_openshift-cluster-api_worker-user-data-secret.yaml
  • openshift-install create cluster --dir=./assets/ --log-level=debug
    Fails with:
DEBUG   Fetching "Master Ignition Config"...       
DEBUG   Reusing previously-fetched "Master Ignition Config" 
DEBUG   Fetching "Master Machines"...              
DEBUG   Reusing previously-fetched "Master Machines" 
DEBUG Generating "Terraform Variables"...          
panic: interface conversion: runtime.Object is nil, not *v1alpha1.LibvirtMachineProviderConfig

goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/cluster.(*TerraformVariables).Generate(0x8acca90, 0xc420b8b0e0, 0xc420ec79f0, 0x2)
	/home/edu/go/src/github.com/openshift/installer/pkg/asset/cluster/tfvars.go:120 +0x136f
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc420a20e40, 0x53717a0, 0x8acca90, 0x0, 0x0, 0x46633a0, 0x47b48a0)
	/home/edu/go/src/github.com/openshift/installer/pkg/asset/store/store.go:226 +0x7c0
github.com/openshift/installer/pkg/asset/store.(*storeImpl).Fetch(0xc420a20e40, 0x53717a0, 0x8acca90, 0x53717a0, 0x8acca90)
	/home/edu/go/src/github.com/openshift/installer/pkg/asset/store/store.go:76 +0x4b
main.runTargetCmd.func1(0x7fff94670566, 0x9, 0xc420a81f00, 0xc42049fbf8)
	/home/edu/go/src/github.com/openshift/installer/cmd/openshift-install/create.go:157 +0x13f
main.runTargetCmd.func2(0x8986700, 0xc420a81da0, 0x0, 0x2)
	/home/edu/go/src/github.com/openshift/installer/cmd/openshift-install/create.go:182 +0x81
github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).execute(0x8986700, 0xc420a81d60, 0x2, 0x2, 0x8986700, 0xc420a81d60)
	/home/edu/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc420a34780, 0x0, 0xc420a35900, 0xc420a348d0)
	/home/edu/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:852 +0x30a
github.com/openshift/installer/vendor/github.com/spf13/cobra.(*Command).Execute(0xc420a34780, 0xc42049feb8, 0x1)
	/home/edu/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:800 +0x2b
main.installerMain()
	/home/edu/go/src/github.com/openshift/installer/cmd/openshift-install/main.go:56 +0x132
main.main()
	/home/edu/go/src/github.com/openshift/installer/cmd/openshift-install/main.go:40 +0x9b

What you expected to happen?

Create a proper OCP4 cluster on libvirt.

How to reproduce it (as minimally and precisely as possible)?

See before

Anything else we need to know?

Running only create cluster works:

  • Installer compiled with libvirt support
  • install-config.yaml content:
apiVersion: v1beta1
baseDomain: ocp4.lan
machines:
- name: master
  platform: {}
  replicas: 1
- name: worker
  platform: {}
  replicas: 1
metadata:
  creationTimestamp: null
  name: minwi
networking:
  clusterNetworks:
  - cidr: 10.128.0.0/14
    hostSubnetLength: 9
  machineCIDR: 192.168.126.0/24
  serviceCIDR: 172.30.0.0/16
  type: OpenshiftSDN
platform:
  libvirt:
    URI: qemu+tcp://192.168.122.1/system
    network:
      if: tt0
pullSecret: '{"auths":{"cloud.openshift.com":{"auth":"x","email":"x"},"quay.io":{"auth":"x","email":"x"}}}'
sshKey: |
  ssh-rsa x [email protected]
  • mkdir assets
  • cp install-config.yaml assets/
  • openshift-install create cluster --dir=./assets/ --log-level=debug
...
DEBUG                                              
DEBUG State path: /tmp/openshift-install-168351161/terraform.tfstate 
INFO Waiting up to 30m0s for the Kubernetes API... 
...

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions