puppetlabs-apache icon indicating copy to clipboard operation
puppetlabs-apache copied to clipboard

Apache:Balancermember configured data type no longer allows previously valid settings

Open canth1 opened this issue 3 years ago • 2 comments

Describe the Bug

Before v8.0.0, the Apache module would allow me to configure an apache::balancermember with URLs other than http://. For example the URL fcgi:// or unix:/ are both valid previously. However with commit https://github.com/puppetlabs/puppetlabs-apache/commit/f41251e336fa3e7c31c19968ccee74121cf71e47 the data type changed from string to Stdlib::HTTPUrl, which doesn't consider the previously mentioned URLs as valid.

Expected Behavior

URLs such as fcgi:// and/or unix:/ are also valid, and should be allowed.

Steps to Reproduce

  1. Install v8.0.0 of the apache module
  2. Configure a balancermember with the following settings:

apache::balancermember { 'FCGI': balancer_cluster => 'fcgi', url => 'fcgi://127.0.0.1:9001/', }

or

apache::balancermember { 'UNIX': balancer_cluster => 'unix', url => "unix:/run/some_socket.sock|fcgi://run/some_socket.sock", }

Environment

  • Version 8.0.0
  • Platform Ubuntu 20.04

canth1 avatar Aug 09 '22 20:08 canth1

Could you come up with a patch to change it to String[1] instead? Unless you can come up with a better pattern of course.

ekohl avatar Aug 10 '22 10:08 ekohl

Could you come up with a patch to change it to String[1] instead? Unless you can come up with a better pattern of course.

Certainly, I'll see if I can come up with a good selection of matches, and looking at the docs, there will be several:

https://httpd.apache.org/docs/trunk/mod/mod_proxy.html

AJP13 (Apache JServe Protocol version 1.3) - ajp:// CONNECT (for SSL) - https:// FastCGI - fcgi:// ftp - ftp:// HTTP/0.9, HTTP/1.0, and HTTP/1.1 - http:// or https:// HTTP/2.0 - h2:// or h2c:// SCGI - scgi:// UWSGI - uwsgi:// WS and WSS (Web-sockets) - ws:// or wss://

And of course unix:/

I'm thinking the Pattern data type would be a good fit for this?

canth1 avatar Aug 10 '22 15:08 canth1