Skip to content

Race during libvirt network creation #138

Closed

Description

@jlebon

Following https://github.com/openshift/installer/blob/master/Documentation/dev/libvirt-howto.md targeting RHCOS, on the first run of tectonic install --dir=test1, I always hit:

libvirt_network.tectonic_net: Creating...
  addresses.#:             "" => "1"
  addresses.0:             "" => "192.168.124.0/24"
  bridge:                  "" => "tt0"
  dns_forwarder.#:         "" => "1"
  dns_forwarder.0.address: "" => "8.8.8.8"
  domain:                  "" => "mco.testing"
  mode:                    "" => "nat"
  name:                    "" => "tectonic"
null_resource.console_dns: Creating...
null_resource.console_dns: Provisioning with 'local-exec'...
null_resource.console_dns (local-exec): Executing: ["/bin/sh" "-c" "virsh -c qemu:///system net-update tectonic add dns-host \"<host ip='192.168.124.50'><hostname>test1</hostname></host>\" --live --config"]
null_resource.console_dns (local-exec): error: failed to get network 'tectonic'
null_resource.console_dns (local-exec): error: Network not found: no network with matching name 'tectonic'

libvirt_network.tectonic_net: Creation complete after 6s (ID: e16cd2a2-111a-4d9c-8ebb-679185c98b0a)
module.libvirt_base_volume.libvirt_volume.coreos_base: Still creating... (10s elapsed)
null_resource.console_dns: Still creating... (10s elapsed)
module.libvirt_base_volume.libvirt_volume.coreos_base: Still creating... (20s elapsed)
null_resource.console_dns: Still creating... (20s elapsed)
module.libvirt_base_volume.libvirt_volume.coreos_base: Creation complete after 28s (ID: /var/lib/libvirt/images/coreos_base)

Error: Error applying plan:

1 error(s) occurred:

* null_resource.console_dns: Error running command 'virsh -c qemu:///system net-update tectonic add dns-host "<host ip='192.168.124.50'><hostname>test1</hostname></host>" --live --config': exit status 1. Output: error: failed to get network 'tectonic'
error: Network not found: no network with matching name 'tectonic'

Then rerunning tectonic install --dir=test1 works and completes the installation.

Looks like a race between network creation and calling virsh -c qemu:///system net-update?

Activity

  1. added
    kind/bug
    and removed on Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions