-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libvirt: can't create workers with non-default storage path #308
Comments
I hit this too, and am trying to track down where the $ sudo ls /var/lib/libvirt/images/
$ virsh -c qemu+tcp://192.168.122.1/system pool-list
Name State Autostart
-------------------------------------------
default active yes
$ virsh -c qemu+tcp://192.168.122.1/system pool-dumpxml default
<pool type='dir'>
<name>default</name>
<uuid>c20a2154-aa60-44cf-bf37-cd8b7818a4e4</uuid>
<capacity unit='bytes'>105554829312</capacity>
<allocation unit='bytes'>44038131712</allocation>
<available unit='bytes'>61516697600</available>
<source>
</source>
<target>
<path>/home/trking/VirtualMachines</path>
<permissions>
<mode>0777</mode>
<owner>114032</owner>
<group>114032</group>
<label>system_u:object_r:virt_image_t:s0</label>
</permissions>
</target>
</pool>
$ ls /home/trking/VirtualMachines/
bootstrap bootstrap.ign coreos_base master0 master-0.ign worker.ign In the installer, we have settings for the pool and volume, which we currently hard-code to Then the chain of custody gets fuzzy for me. On the other end, the From your logged:
we see that by the time we got here, we had $ virsh -c qemu+tcp://192.168.122.1/system vol-info --vol coreos_base --pool default
Name: coreos_base
Type: file
Capacity: 16.00 GiB
Allocation: 1.55 GiB
The issue is probably the fact that that lookup also works when you happen to use the correct full path: $ virsh -c qemu+tcp://192.168.122.1/system vol-info --vol /home/trking/VirtualMachines/coreos_base --pool default
Name: coreos_base
Type: file
Capacity: 16.00 GiB
Allocation: 1.55 GiB
So can we connect the dots between our config and the busted |
Possible fix in openshift/machine-api-operator#70. |
I ran into the similar issue with v0.9.1. For an experiment, I replaced the following hardcoded path "/var/lib/libvirt/images" with my storage path (/home/VMpool). Then, my worker node image and its ignition file are placed in the storage path.
But the worker node failed to start with this error: Obviously, it expects to see the worker node image ntest0-worker-0-4vlw2 in /var/lib/libvirt/images instead of my storage path /home/VMpool... But I cannot find the place /var/lib/libvirt/images is hardcoded or expected as a default path in the installer. Do you have any idea how I can workaround this issue? Thanks! |
openshift/cluster-api-provider-libvirt#45 (the successor to openshift/machine-api-operator#70 linked above). |
Thank you, @wking. I hope openshift/cluster-api-provider-libvirt#45 is going to be merged and cluster-api-provider-libvirt will be rebuilt soon... |
This is still an outstanding issue. I'm using #1371 to bootstrap on libvirt and just hit this storage issue, |
Looks like this is the issue: https://github.com/openshift/installer/blob/master/pkg/asset/machines/libvirt/machines.go#L71
i.e. when the installer generating the provider spec for machines, it guesses what the volume ID generated by libvirt for the base image will be The base image is created here https://github.com/openshift/installer/blob/master/data/data/libvirt/main.tf#L5
and the volume id is referenced as Probably the easiest solution is to allow configuring the volume in the provider spec with a name rather than volume id i.e. right now we require:
but there's no reason to require the volume key if we just have the pool and the volume name. This should be sufficient:
Of course, the actuator needs a patch to do |
Correct. This was done in openshift/cluster-api-provider-libvirt#45 which I've finally rebased and reworked a bit. I'm going to test it today and create a new PR. |
Looks like the fix is now in openshift/cluster-api-provider-libvirt#144 |
@steven-ellis the libvirt actuator bit, yes but the Installer part is still not merged due to CI being flaky: #1628 |
If your libvirt default storage pool is not /var/lib/libvirt/images then the libvirt-machine-controller fails to create the workers:
I worked around it with a bind mount. If it's not configurable then it would be handy if it was.
(also, there's a typo "Coud" in the error message)
The text was updated successfully, but these errors were encountered: