Custom hierdata is not applied to undercloud container registry
Environment
- Red Hat OpenStack Platform 16.1 (RHOSP 16.1)
Issue
- Director custom hierdata is not applied to registry httpd server
- Hieradata parameter
apache::trace_enable
doesn't affect undercloud container registry
Resolution
This problem is being addressed in BZ #2011194
As a work around you can:
- On the undercloud edit /etc/httpd/conf.d/image-serve.conf file
-
Add the httpd directive TraceEnable inside the VirtualHost directive and setting it to off
here follows a snap of the config file edited as example:<VirtualHost undercloud-0.ctlplane.redhat.local:8787> DocumentRoot /var/lib/image-serve ErrorLog "/var/log/httpd/image_serve_error.log" ServerSignature Off CustomLog "/var/log/httpd/image_serve_access.log" combined SetEnvIf X-Forwarded-Proto https HTTPS=1 RedirectMatch ^/$ /v2 TraceEnable off
-
Restart the httpd service
sudo systemctl restart httpd
-
Verify that message
405 Method Not Allowed
it is shown when using http trace:root@undercloud-0 ~]# curl -v -X TRACE http://192.168.24.1:8787/v2 * Trying 192.168.24.1... * TCP_NODELAY set * Connected to 192.168.24.1 (192.168.24.1) port 8787 (#0) > TRACE /v2 HTTP/1.1 > Host: 192.168.24.1:8787 > User-Agent: curl/7.61.1 > Accept: */* > < HTTP/1.1 405 Method Not Allowed < Date: Mon, 27 Sep 2021 14:35:05 GMT < Server: Apache/2.4.37 (Red Hat Enterprise Linux) < Allow: < Content-Length: 225 < Content-Type: text/html; charset=iso-8859-1 < <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>405 Method Not Allowed</title> </head><body> <h1>Method Not Allowed</h1> <p>The requested method TRACE is not allowed for the URL /v2.</p> </body></html> * Connection #0 to host 192.168.24.1 left intact
Root Cause
hieradata apache::trace_enable
doesn't affect httpd server where the undercloud container registry is configured
Diagnostic Steps
When http trace is enabled the following is shown:
[root@undercloud-0 ~]# curl -v -X TRACE http://192.168.24.1:8787/v2
* Trying 192.168.24.1...
* TCP_NODELAY set
* Connected to 192.168.24.1 (192.168.24.1) port 8787 (#0)
> TRACE /v2 HTTP/1.1
> Host: 192.168.24.1:8787
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 27 Sep 2021 14:36:58 GMT
< Server: Apache/2.4.37 (Red Hat Enterprise Linux)
< Transfer-Encoding: chunked
< Content-Type: message/http
<
TRACE /v2 HTTP/1.1
Host: 192.168.24.1:8787
User-Agent: curl/7.61.1
Accept: */*
* Connection #0 to host 192.168.24.1 left intact
When http trace is disabled the 405 Method Not Allowed is shown:
root@undercloud-0 ~]# curl -v -X TRACE http://192.168.24.1:8787/v2
* Trying 192.168.24.1...
* TCP_NODELAY set
* Connected to 192.168.24.1 (192.168.24.1) port 8787 (#0)
> TRACE /v2 HTTP/1.1
> Host: 192.168.24.1:8787
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 405 Method Not Allowed
< Date: Mon, 27 Sep 2021 14:35:05 GMT
< Server: Apache/2.4.37 (Red Hat Enterprise Linux)
< Allow:
< Content-Length: 225
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested method TRACE is not allowed for the URL /v2.</p>
</body></html>
* Connection #0 to host 192.168.24.1 left intact
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments