-
Notifications
You must be signed in to change notification settings - Fork 7
Description
I am seeing some strange behavior with the fauxapi. Since I am using the Python interface, I thought I would start by posting here.
Versions:
I am using the latest from master: https://github.com/ndejong/pfsense_fauxapi_client_python
I followed the installation procedure for pfSense fauxAPI: https://github.com/ndejong/pfsense_fauxapi
pfSense version is:
2.4.5-RELEASE (amd64)
built on Tue Mar 24 15:25:50 EDT 2020
FreeBSD 11.3-STABLE
My python client authenticates with pfSense and seems to be functional. I am setting the configuration with the function call:
result = self.FauxapiLib.config_set(self.system_config)
If I am not manually logged into my pfSense web portal via a web browser the fauxapi reports the following after making the call above:
PfsenseFauxapi.PfsenseFauxapi.PfsenseFauxapiException: ('Unable to complete config_set() request', {'callid': '5f51134ea4d8f', 'action': 'config_set', 'message': 'failed to set new config', 'logs': [{'INFO': '20200903Z100118 :: fauxapi\\v1\\fauxApi::__call', 'DATA': {'user_action': 'config_set', 'callid': '5f51134ea4d8f', 'client_ip': '192.168.1.77'}}, {'ERROR': '20200903Z100222 :: unable confirm config reload before timeout', 'DATA': {'config_cache_filename': '/tmp/config.cache', 'timeout': 60}}, {'WARN': '20200903Z100222 :: attempting to revert config to last known backup', 'DATA': {'last_backup_file': '/cf/conf/backup/config-1599148878.xml'}}, {'INFO': '20200903Z100222 :: config file reverted to last known backup', 'DATA': {'config_file': '/cf/conf/backup/config-1599148878.xml'}}]})
If I am logged into the pfSense web portal via my web browser and make the call to:
result = self.FauxapiLib.config_set(self.system_config)
and then click on any page, for example System->Advanced, then the call goes through perfectly:
{'callid': '5f5115d828cce', 'action': 'send_event', 'message': 'ok'}
It appears as though pfSense needs this 'trigger' to process the fauxapi commands. I thought this was super strange and figured I was missing something entirely that maybe you or someone else would know how to fix.
I have created a video of the issue as it happens, but it contains a lot of identifying information. I can PM you a link if necessary.