Skip to content
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

fcos_extraction_location is not created before extracting into it #37

Open
djuber opened this issue Aug 20, 2021 · 3 comments
Open

fcos_extraction_location is not created before extracting into it #37

djuber opened this issue Aug 20, 2021 · 3 comments

Comments

@djuber
Copy link
Contributor

djuber commented Aug 20, 2021

Describe the bug

When installing for QEMU/libvirt on linux.

The fcos_extraction_location defaults to "$HOME/.local/share/libvirt/images".

If this directory does not exist, the "Stat FCOS extract file" step does not fail (shows ok: [forem]), the Extract FCOS image with xz setup fails (because nothing creates the location if it does not exist)

TASK [fcos : Extract FCOS file to $HOME/.local/share/libvirt/images with xz] ****************************
fatal: [forem]: FAILED! => changed=true 
  cmd: xz --decompress -k /home/djuber/src/selfhost/playbooks/providers/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2.xz -c > $HOME/.local/share/libvirt/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2
  delta: '0:00:00.001628'
  end: '2021-08-20 11:05:44.692859'
  msg: non-zero return code
  rc: 2
  start: '2021-08-20 11:05:44.691231'
  stderr: '/bin/sh: 1: cannot create /home/djuber/.local/share/libvirt/images/fedora-coreos-34.20210725.3.0-qemu.x86_64.qcow2: Directory nonexistent'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

To Reproduce
Steps to reproduce the behavior:

  1. rm -rf $HOME/.local/share/libvirt/images - if there is anything you care about in there, maybe mv instead of rm :)
  2. run the qemu install playbook ansible-playbook -i inventory/forem/setup.yml playbooks/providers/qemu.yml
  3. observe the failure on the above step

Expected behavior

The fcos_extract_location directory is checked for existence, and either an earlier error with instructions to create the directory, or automatic directory creation occurs when it's not there.

Screenshots
If applicable, add screenshots to help explain your problem.

OS (please complete the following information):

  • Linux

Cloud Provider (please complete the following information):

  • Other: QEMU/libvirt
@ghost

This comment was marked as spam.

@ghost

This comment was marked as spam.

@0xSaltyHash
Copy link

Yep I can confirm that this happened to me on Ubuntu 22.04 LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants