Open Matteo04052017 opened 5 years ago
Hi @Matteo04052017, My understanding of your questions are inline as comments:
Why did you add an executable file into the repository? Where is the code of it?
tmc-prototype
is in Python while the AlarmHandler code was in C++ which adds complexity to use C++ TANGO docker image. If we use source file, it adds extra compiling steps in the pipeline every time unless we create a docker image which we already did. I believe we can keep it as it is for now. If any of these approaches need improvements, one can take it up in the upcoming PIs if any additional value is generated.Why did you create another docker image?
Since AlarmHandler was perceived as a probable solution to implement SKAAlarmHandler, we thought that it will be useful to create a docker image of it so that other Agile teams can also benefit them for their own Alarm handling purpose.
What happen if the device "ska_mid/tm_alarmhandler/tmalarmhandler" is not online when you run the configuration script?
It was the issue when we were using the custom scripts. Once tmc-prototype
started using dsconfig, I don't think this is an issue anymore. The configuration can be added into the database even if the tmalarmhandler
is not running.
Why didn't you consider to add a sleep time like in the configuration of the database (https://github.com/ska-telescope/tmc-prototype/blob/master/tmcprototype/addDevicesAndProperties.py)?
I don't think this is an issue anymore after using dsconfig tool.
Consider also that the alarm configuration script if an alarm already exists.
Since dsconfig is idempotent, even if the alarm configuration exists already it won't result in any issue or exception as shared in the post.
Let me know if you have any comments/suggestions. We don't have any outstanding items/issues for now related to AlarmHandler, so are we good to close this issue?
What is related to the configuration is solved with the dsconfig.
But you cannot keep a binary file into the repository. Since there is a repository, you could generate the docker image for it and put it into nexus. Once is there, you can just use it. This is what I did for the dsconfig. What do you think?
Yeah, I will let @adityadangeska to take this forward. I think now that we have a TMAlarmHandler image already on Nexus, the binary and other stuffs for TMAlarmHandler from the tmc-prototype
repository can be removed. One can simply use the image to spawn TMAlarmHandler container. (Unless Nexus repo doesn't crash and all images are lost, then we may have to build and push again. :rofl: )
The issue concerns this folder: https://github.com/ska-telescope/tmc-prototype/tree/master/tmcprototype/TMAlarmHandler
Why did you add an executable file into the repository? Where is the code of it? Why did you create another docker image? What happen if the device "ska_mid/tm_alarmhandler/tmalarmhandler" is not online when you run the configuration script? Why didn't you consider to add a sleep time like in the configuration of the database (https://github.com/ska-telescope/tmc-prototype/blob/master/tmcprototype/addDevicesAndProperties.py)?
Consider also that the alarm configuration script if an alarm already exists.
Traceback (most recent call last): File "/app/tmcprototype/TMAlarmHandler/configure_alarms.py", line 21, in
alarmHandler_proxy.command_inout("Load", alarm["input_string"])
File "/venv/lib/python3.5/site-packages/tango/green.py", line 195, in greener
return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
File "/venv/lib/python3.5/site-packages/tango/green.py", line 109, in run
return fn(*args, *kwargs)
File "/venv/lib/python3.5/site-packages/tango/connection.py", line 104, in Connectioncommand_inout
r = Connection.command_inout_raw(self, name, args, **kwds)
File "/venv/lib/python3.5/site-packages/tango/connection.py", line 133, in Connectioncommand_inout_raw
return self.__command_inout(cmd_name, param)
PyTango.DevFailed: DevFailed[
DevError[
desc = error loading alarm=alertdish1windspeed , AlarmHandler::load_alarm(): alarm 'alertdish1windspeed' already exist
origin = AlarmHandler::load()
reason = AlarmHandler::load()
severity = ERR]
DevError[ desc = Failed to execute command_inout on device ska_mid/tm_alarmhandler/tmalarmhandler, command Load origin = Connection::command_inout() reason = API_CommandFailed severity = ERR] ]
Please let me know if you have any doubts.