Hello,
I am having an issue adding a health-check job for a device-type using the API. I have tried doing so using both lavacli and through a python script using the xml-rpc client, but both times I get the following error:
With lavacli: Unable to call 'device-types.health-check': <Fault 400: 'Unable to write health-check: Permission denied'>
With the python script: Traceback (most recent call last): File "./API.py", line 9, in <module> server.scheduler.device_types.set_health_check("r8a7743-iwg20d-q7-dbcm-ca","r8a7743-iwg20d-q7-dbcm-ca.yaml") File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request verbose=self.__verbose File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.5/xmlrpc/client.py", line 1150, in single_request return self.parse_response(resp) File "/usr/lib/python3.5/xmlrpc/client.py", line 1322, in parse_response return u.close() File "/usr/lib/python3.5/xmlrpc/client.py", line 655, in close raise Fault(**self._stack[0]) xmlrpc.client.Fault: <Fault 400: 'Unable to write health-check: Permission denied'>
The user I use to authenticate the xml-rpc client has superuser privileges and I have tried using a number of different API functions (including ones which require superuser privileges like device-types add and devices add), all of which have worked with both lavacli and the python script. I have also made sure that the name of the healthcheck file matches the device-type.
Has anyone else encountered this issue?
Thanks,
Patryk
Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
On Mon, 29 Oct 2018 at 14:35, Patryk Mungai Ndungu patryk.mungai-ndungu.kx@renesas.com wrote:
Hello,
I am having an issue adding a health-check job for a device-type using the API. I have tried doing so using both lavacli and through a python script using the xml-rpc client, but both times I get the following error:
What version of LAVA are you running?
What do you get, on your master, for:
ls /etc/lava-server/dispatcher-config/ -l
You may need to chown ls /etc/lava-server/dispatcher-config/health-checks/ to lavaserver:lavaserver
What version of LAVA are you running?
I am running LAVA 2018.7
The health-checks directory was owned by root. I ran chown to lavaserver:lavaserver, but I still get the same issue when trying to add the healthcheck using lavacli.
Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
On Mon, 29 Oct 2018 at 15:03, Patryk Mungai Ndungu patryk.mungai-ndungu.kx@renesas.com wrote:
You're trying to update an existing health check - so you will also need to chown the files in the directory. Depending on your configuration management, you may need to update that so that the ownership is retained when you next update the instance.
Thanks for reporting this. This is in fact an issues with LAVA packaging script.
Neil fixed it in https://git.lavasoftware.org/lava/lava/merge_requests/140
Le lun. 29 oct. 2018 à 16:17, Patryk Mungai Ndungu < patryk.mungai-ndungu.kx@renesas.com> a écrit :
lava-users@lists.lavasoftware.org