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

QCOW image format not accepted by certain OpenStack providers #357

Open
stephenmoloney opened this issue Apr 1, 2018 · 11 comments
Open

Comments

@stephenmoloney
Copy link
Contributor

stephenmoloney commented Apr 1, 2018

Issue

Some cloud providers do not accept qcow2 image format

Error message:

Unable to set 'disk_format' to 'qcow2'. Reason: u'qcow2' is not one of [None, u'raw']

Failed validating u'enum' in schema[u'properties'][u'disk_format']:
    {u'description': u'Format of the disk',
     u'enum': [None, u'raw'],
     u'type': [u'null', u'string']}

On instance[u'disk_format']:
    u'qcow2'

Potential solution(s)

  • (1) release multiple image formats and make downloadable format configurable

  • (2) let the client download the .qcow2 image format and do any conversions necessary prior to upload to the cloud provider

relates to #356

@mcapuccini mcapuccini changed the title image formats OCOW image format not accepted by certain cloud providers Apr 3, 2018
@mcapuccini
Copy link
Member

Hi @stephenmoloney! Thanks for testing KubeNow, and for opening this issue. I assume we are talking about OpenStack here.

Releasing raw images would be a bit harder IMO. First, it's more expensive, and second it's slower to save on the backend storage. Since we are using the free version of Travis, builds need to be faster or they will be killed. Therefore, I'd be more keen to solution 2.

I know that @andersla and @sneumann had this problem with image format in the past and they have found a workaround with it. Maybe it's time to merge efforts and get the logic officially supported.

@sneumann
Copy link
Contributor

sneumann commented Apr 3, 2018

Hi, I didn't have a proper solution, and manually converted the image following
https://docs.openstack.org/image-guide/convert-images.html
and manually uploaded to the images available. Yours, Steffen

@mcapuccini mcapuccini changed the title OCOW image format not accepted by certain cloud providers QCOW image format not accepted by certain cloud providers Apr 3, 2018
@mcapuccini mcapuccini changed the title QCOW image format not accepted by certain cloud providers QCOW image format not accepted by certain OpenStack providers Apr 3, 2018
@stephenmoloney
Copy link
Contributor Author

stephenmoloney commented Apr 3, 2018

@mcapuccini I'm not entirely satisfied that manual intervention is a good thing... As I suppose KubeNow is aiming to be it just works solution. If the client does the conversion, then perhaps it should be supported in some sort of script in the code to do the conversion prior to upload (with a prompt maybe). The conversion takes a long time too though so I'm not sure about this either.

@sneumann Do you know what size that upload was?

@mcapuccini
Copy link
Member

@stephenmoloney agreed, it should be automatic. Pinging @andersla for any thoughts on this.

@andersla
Copy link
Member

andersla commented Apr 3, 2018

Yes I think it would be possible to quite easily download the qcow2 image into the user temp dir (as is don now already) and there convert it into raw and then continue with then upload.

@mcapuccini
Copy link
Member

@stephenmoloney if you have slow connection, you could start an instance in OpenStack so you can do the first deployment from the tenancy. In this way download/upload of the image should be way faster. I like the idea of converting the image prior upload.

@stephenmoloney
Copy link
Contributor Author

@mcapuccini That's sounds like a good idea, effectively, I take it you mean run kn apply inside a running instance in the opencloud stack. Beats waiting hours/days for an upload.

So in that case, I'll make some changes to do a local conversion where the disc_format raw is specified in the terraform variables file.

It might be a few days before I get a chance. I'll ping back when the PR is looking a bit more ready.

@mcapuccini
Copy link
Member

Sure, no worries! Just let us know when it's ready 🙂

@kunalrdeshmukh
Copy link

Same error. Could you please let me know if you have fixed it? or else, how can i convert file to iso? i cant see it under tmp even after the download.

@mcapuccini
Copy link
Member

I think @andersla has a solution for this. You could also try this: https://docs.openstack.org/image-guide/convert-images.html

@kunalrdeshmukh
Copy link

Thanks. So trick was to add qemu-img convert -f qcow2 -O <desired_file_format> $filename <output file name> command on line 70 of bin/image-create-openstack.sh file.

bin folder is inside my_deployment folder which is created as a result of kn init openstack my_deployment command.

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

No branches or pull requests

6 participants