Description of problem: When we use cinder as glance backend, and nfs as cinder backend, Image creation fails because of 500 error while uploading the image content. In glance-api log, we observe that glance tries to perform chown command agaist mounted volume file under /var/lib/cinder, but it fails because the command doesn't match the pattern defined in rootwrap configuration. ~~~ 2020-06-01 11:22:33.000 31 ERROR glance_store._drivers.cinder Command: sudo glance-rootwrap /etc/glance/rootwrap.conf chown 42415 /var/lib/cinder/mnt/bc07aa1376c04aeeac02143dda44b869/volume-c34e75ac-303a-4161-8663-4c979b47f390 2020-06-01 11:22:33.000 31 ERROR glance_store._drivers.cinder Exit code: 99 2020-06-01 11:22:33.000 31 ERROR glance_store._drivers.cinder Stdout: '' 2020-06-01 11:22:33.000 31 ERROR glance_store._drivers.cinder Stderr: '/usr/bin/glance-rootwrap: Unauthorized command: chown 42415 /var/lib/cinder/mnt/bc07aa1376c04aeeac02143dda44b869/volume-c34e75ac-303a-4161-8663-4c979b47f390 (no filter matched)\n' 2020-06-01 11:22:33.000 31 ERROR glance_store._drivers.cinder ~~~ ~~~ [heat-admin@controller-0 ~]$ sudo podman exec -it glance_api cat /etc/glance/rootwrap.d/glance_cinder_store.filters # glance-rootwrap command filters for glance cinder store # This file should be owned by (and only-writable by) the root user [Filters] # cinder store driver disk_chown: RegExpFilter, chown, root, chown, \d+, /dev/(?!.*/\.\.).* # os-brick library commands # os_brick.privileged.run_as_root oslo.privsep context # This line ties the superuser privs with the config files, context name, # and (implicitly) the actual python code invoked. privsep-rootwrap: RegExpFilter, privsep-helper, root, privsep-helper, --config-file, /etc/(?!\.\.).*, --privsep_context, os_brick.privileged.default, --privsep_sock_path, /tmp/.* ~~~ Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Deploy overcloud with glance cinder backend + cinder nfs backend 2. Create an image Actual results: Image creation fails because of 500 error during uploading image file Expected results: Image creation succeeds without any errors Additional info:
The patch you mention is available in python-glance-store 0.23.1-0.20190916165252.cc7ecc1 . This has not been released, but should be part of 13zXX. Have you been able to try the updated rootwrap filters on your installation?
(In reply to Cyril Roelandt from comment #2) > The patch you mention is available in python-glance-store > 0.23.1-0.20190916165252.cc7ecc1 . This has not been released, but should be > part of 13zXX. > > Have you been able to try the updated rootwrap filters on your installation? The issue I reported here is not for OSP13, but OSP16. Is the patch[1] already backported to OSP16 as well ? [1] https://review.opendev.org/#/c/716874/
The fix for this seems to be available, let's hand it to QA :)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Red Hat OpenStack Platform 16.1 bug fix and enhancement advisory), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:4284