minishift-up-role icon indicating copy to clipboard operation
minishift-up-role copied to clipboard

On Ubuntu 16.04 you have to manually start the Libvirt default network.

Open jerrac opened this issue 7 years ago • 1 comments

The playbook kept failing on me for some reason.

TASK [chouseknecht.minishift-up-role : Set latest_version] ************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: No last item, sequence was empty.\n\nThe error appears to have been in '/home/username/.ansible/roles/chouseknecht.minishift-up-role/tasks/copy_oc_client.yml': line 11, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Set latest_version\n  ^ here\n\nexception type: <class 'ansible.errors.AnsibleUndefinedVariable'>\nexception: No last item, sequence was empty."}
    to retry, use: --limit @/home/username/minishiftup.retry

PLAY RECAP ************************************************************************************************************************************************
localhost                  : ok=39   changed=13   unreachable=0    failed=1 

After a bit of digging around, I figured out that minishift was failing to start due to the Libvirt default network also not being started.

minishift start                                                   
-- Starting profile 'minishift'
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK
-- Checking if KVM driver is installed ... 
   Driver is available at /usr/local/bin/docker-machine-driver-kvm ... 
   Checking driver binary is executable ... OK
-- Checking if Libvirt is installed ... OK
-- Checking if Libvirt default network is present ... FAIL
   See the 'Setting Up the Driver Plug-in' topic (https://docs.openshift.org/latest/minishift/getting-started/setting-up-driver-plugin.html) for more information

That caused the set latest_version task to fail since the $HOME/.minishift/cache/oc path was empty.

After I manually ran sudo virsh net-start default and minishift start, the playbook started working.

I have not tested this on any other system, nor am I positive it is repeatable. I just wanted to leave this topic out there in case someone else has a similar issue.

jerrac avatar Feb 17 '18 20:02 jerrac

Issue occurs on Ubuntu 18.04 LTS as well. Confirmed that following instructions https://docs.okd.io/latest/minishift/getting-started/setting-up-virtualization-environment.html#setting-up-kvm-driver solved the issue.

030 avatar Jan 06 '20 09:01 030