MM..

I've looked at the code and I think you may be right. That code was 
changed, not too recently but neither too long ago.
Could you please open an issue 
at https://github.com/openwisp/openwisp-config/issues and explain how to 
reproduce the issue?

I think the solution is to allow the openwisp-update-config lua script to 
take an optional parameter that sets the target configuration to be applied.

@Oliver: another point in favour of rewriting this package using lua 
functions that can be unit tested a lot more easily and in isolation from 
the rest of the loop agent logic.

Fed


On Sunday, November 4, 2018 at 7:33:52 PM UTC+1, BlancLoup wrote:
>
> Hello.
> No, all crash cause we change /etc/config/openwisp and two scripts reload 
> daemon: openwisp-update-config.lua and trigger at 
> /etc/init.d/openwisp_config.
> But we worked around it.
> And have new issue =)
> When testing function get failed test it perform "apply_configuration 
> $CONFIGURATION_BACKUP". But apply_configuration don't use input parameter 
> CONFIGURATION_BACKUP
>
>>
>>
>> *downloaded_conf = tmp_dir .. '/configuration.tar.gz'...os.execute('tar 
>> -zxf '..downloaded_conf..' -C '..check_dir)*
>>
> Result: restore is not working.
> четверг, 18 октября 2018 г., 20:33:09 UTC+5 пользователь Federico Capoano 
> написал:
>>
>>
>>
>> On Monday, October 15, 2018 at 9:37:29 AM UTC+2, BlancLoup wrote:
>>>
>>> Hello.
>>> On server side: controller's GUI allows to create new openwisp config 
>>> that will rewrite /etc/config/openwisp (to replace "option url", "option 
>>> verify_ssl"). With tricks, but it works. In any case, we created additional 
>>> django application that allows it in straightway.
>>> On client side: openwisp_config agent will apply new config, but reload 
>>> own daemon /etc/init.d/openwisp_config reload at the middle of iteration 
>>> that'll crash all logic.
>>>
>>
>> The agent should wait for the update configuration process to finish (but 
>> max 30 seconds) before reloading: 
>> https://github.com/openwisp/openwisp-config/blob/master/openwisp-config/files/openwisp.init#L91-L109
>>
>> Fed
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to