Closed jianzhangbjz closed 5 years ago
I think I found the root cause, like below. So I start and delete them.
[jzhang@dhcp-140-18 installer]$ sudo virsh list --all
setlocale: No such file or directory
Id Name State
----------------------------------------------------
- bootstrap shut off
- master0 shut off
[jzhang@dhcp-140-18 installer]$ sudo virsh start bootstrap
[jzhang@dhcp-140-18 installer]$ sudo virsh start master0
[jzhang@dhcp-140-18 installer]$ openshift-install destroy cluster --dir 09 --log-level=debug
DEBUG Deleting libvirt network
DEBUG Deleting libvirt domains
DEBUG Deleting libvirt volumes
INFO Deleted volume volume=master.ign
INFO Deleted volume volume=coreos_base
INFO Deleted volume volume=master0
INFO Deleted domain domain=master0
INFO Deleted network network=demo
DEBUG Exiting deleting libvirt network
DEBUG goroutine deleteNetwork complete
INFO Deleted volume volume=worker.ign
INFO Deleted volume volume=bootstrap.ign
INFO Deleted domain domain=bootstrap
DEBUG Exiting deleting libvirt domains
DEBUG goroutine deleteDomains complete
INFO Deleted volume volume=bootstrap
DEBUG Exiting deleting libvirt volumes
DEBUG goroutine deleteVolumes complete
DEBUG Purging asset "Terraform Variables" from disk
DEBUG Purging asset "Kubeconfig Admin" from disk
[jzhang@dhcp-140-18 installer]$ sudo virsh list --all
setlocale: No such file or directory
Id Name State
----------------------------------------------------
And, I reset the cluster name to demo4
, and rebuild the OCP 4.0 cluster.
[jzhang@dhcp-140-18 installer]$ env | grep -i cluster_name
OPENSHIFT_INSTALL_CLUSTER_NAME=demo4
But, I got below errors. I don't understand why it still connects to demo3
. Seems like the OPENSHIFT_INSTALL_CLUSTER_NAME=demo4
did not work. How can I solve it?
module.bootstrap.libvirt_domain.bootstrap: Creating...
arch: "" => "<computed>"
console.#: "" => "1"
console.0.target_port: "" => "0"
console.0.type: "" => "pty"
coreos_ignition: "" => "/var/lib/libvirt/images/bootstrap.ign;5be44d97-6836-10e1-c0f7-a00d51877a43"
disk.#: "" => "1"
disk.0.scsi: "" => "false"
disk.0.volume_id: "" => "/var/lib/libvirt/images/bootstrap"
emulator: "" => "<computed>"
machine: "" => "<computed>"
memory: "" => "2048"
name: "" => "bootstrap"
network_interface.#: "" => "1"
network_interface.0.addresses.#: "" => "1"
network_interface.0.addresses.0: "" => "192.168.126.10"
network_interface.0.hostname: "" => "demo3-bootstrap"
network_interface.0.mac: "" => "<computed>"
network_interface.0.network_id: "" => "2040b681-cc05-4bf6-8f23-a564c922e43e"
network_interface.0.network_name: "" => "<computed>"
qemu_agent: "" => "false"
running: "" => "true"
vcpu: "" => "2"
INFO Waiting for bootstrap completion...
DEBUG API not up yet: Get https://demo3-api.tt.testing:6443/version?timeout=32s: dial tcp 192.168.126.10:6443: connect: no route to host
I don't understand why it still connects to demo3. Seems like the OPENSHIFT_INSTALL_CLUSTER_NAME=demo4 did not work. How can I solve it?
If you are using the same directory as the previous invocation, the installer will use all of the state from the previous run. You need to destroy the cluster before you create a new one or move to a different directory.
@crawford Thanks! But, as I mentioned in above, I already destroy it before I rebuild it.
But, as I mentioned in above, I already destroy it before I rebuild it.
If you have leftovers in libvirt from a previous run, you need to clean up those as well. If you don't have anything in libvirt that you need to keep, you can use scripts/maintenance/virsh-cleanup.sh
for that. Otherwise you'll need to cleanup cluster domains, volumes, and networks on your own. Do you still see this issue with a clean libvirt environment and a fresh installer --dir
?
No, thanks! It works well with a fresh directory. Close it.
Version
Platform (aws|libvirt|openstack):
libvirt
What happened?
Got the below errors when building the OCP 4.0.
What you expected to happen?
Create the OCP 4.0 cluster successfully.
How to reproduce it (as minimally and precisely as possible)?
1, Create the OCP 4.0 failed, so destroy it as below:
2, Rebuild with another dir, like below:
Anything else we need to know?
References