76
General Discussion / Re: Bug in HAProxy "Save & Test syntax"?
« on: April 06, 2021, 09:00:09 am »
I noticed that too. See this thread that I created a week or so ago: https://forum.opnsense.org/index.php?topic=22304.msg105819#msg105819
I think there was a feature that was added wherein the HAProxy config file is renamed to *.staging.conf when the plugin is disabled. During the rename it also adds the comment which comments out the global keyword. I thought my config was wrong for quite a few hours before I realized that the haproxy.conf file was created only after enabling the service and I noticed it only after I ssh'ed into the firewall and was actively monitoring the changes in the filesystem with every change I made in the WebUI.
It is definitely not intuitive -- as initially I thought that Test Syntax would be a good way to make sure everything is correct before enabling the service and I kept hitting Test Syntax and it kept failing and I kept re-doing the configuration from scratch thrice.
Maybe you can create a CR/enhancement request to change the behavior such that Test Syntax would work even when the HAProxy service was disabled.
I think there was a feature that was added wherein the HAProxy config file is renamed to *.staging.conf when the plugin is disabled. During the rename it also adds the comment which comments out the global keyword. I thought my config was wrong for quite a few hours before I realized that the haproxy.conf file was created only after enabling the service and I noticed it only after I ssh'ed into the firewall and was actively monitoring the changes in the filesystem with every change I made in the WebUI.
It is definitely not intuitive -- as initially I thought that Test Syntax would be a good way to make sure everything is correct before enabling the service and I kept hitting Test Syntax and it kept failing and I kept re-doing the configuration from scratch thrice.
Maybe you can create a CR/enhancement request to change the behavior such that Test Syntax would work even when the HAProxy service was disabled.

