create image not cirros

Bug #1868503 reported by Riccardo Magrini
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MicroStack
Fix Released
High
Unassigned

Bug Description

why I receive this issue when I try to create a new image with ubuntu image?

<html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.13.0</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->

in attached you find the screen, thanks

Revision history for this message
Riccardo Magrini (riccardo-magrini) wrote :
Revision history for this message
Pen Gale (pengale) wrote :

I believe that this is a limitation of horizon.

You can create an image with the openstack command line tools. For example:

    microstack.openstack image create \
      --public --container-format=bare --disk-format=qcow2 \
      -f value -c id <name of the image> <path to some image>.img

Revision history for this message
Riccardo Magrini (riccardo-magrini) wrote :

I'd to run that:

   $: wget http://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img

then the command you suggested me:

   $: microstack.openstack image create --public --container-format=bare --disk-format=qcow2 -f value -c id u1804
      bionic-server-cloudimg-amd64.img

but its output was that:

   The request you have made requires authentication. (HTTP 401) (Request-ID: req-13ed35a5-9a20-4cdb-ae84-82450c83f97b)

Revision history for this message
Pen Gale (pengale) wrote :

Have you changed the password, by any chance? If so, you might have uncovered a bug with the way that the microstack.rc file gets written. Possibly related: https://bugs.launchpad.net/microstack/+bug/1863137

Revision history for this message
Riccardo Magrini (riccardo-magrini) wrote :

now it works....
I think that solution should be present or indicate in official guide, because it's necessary to know it.
Thanks a lot for your help me.

Revision history for this message
David Field (mightywomble) wrote :

If anyone wants to get the Horizon upload working then you need to edit

/var/snap/microstack/common/etc/nginx/snap/nginx.conf

and add the line

client_max_body_size 2G;

in the HTTP section as such

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        client_max_body_size 2G;
        types_hash_max_size 2048;

then restart the snaps microservices

sudo systemctl restart snap.microstack.*

On stock Horizon, this works out of the box and is not a limitation of Horizon, I've just checked.

Revision history for this message
Pen Gale (pengale) wrote :

@mightywomble: thank you for the correction and pointer to the necessary nginx config. That's something that probably got overlooked when merging configs from the various microservices together into one snap. It definitely points out a bias for cli tools on the part of the MicroStack developers :-)

(Anyone beating me to the punch on pushing a fix will want to look in snap-overlay/templates/nginx.conf.j2, or snap-overlay/templates/horzion-snap.conf.j2 in the source.)

Changed in microstack:
status: New → Confirmed
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
Billy Olsen (billy-olsen) wrote :

fwiw, all that's necessary after changing the config file is:

sudo systemctl restart snap.microstack.nginx

Changed in microstack:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to microstack (master)

Reviewed: https://review.opendev.org/c/x/microstack/+/783983
Committed: https://opendev.org/x/microstack/commit/727c562f2d5a964fb0f3a9f5ff037279ec705eed
Submitter: "Zuul (22348)"
Branch: master

commit 727c562f2d5a964fb0f3a9f5ff037279ec705eed
Author: Billy Olsen <email address hidden>
Date: Tue Mar 30 10:31:17 2021 -0700

    Disable client_max_body_size checks in nginx

    By default, nginx has a small (1MB) limit on the size of uploads,
    which prevents using horizon interface to upload an image. Disabling
    the client_max_body_size check allows for the glance configuration
    to govern the maximum size image that should be accepted. This change
    also disables proxy_buffering and proxy_request_buffering in order
    to reduce buffering latency.

    Closes-Bug: #1868503
    Change-Id: I0a89e0845d6c7d2805556f87685d280b4e72122a

Changed in microstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.