[INSTRM-1914] add optional configPath to actor.reloadConfiguration Created: 01/Apr/23  Updated: 25/Jan/24

Status: Open
Project: Instrument control development
Component/s: tron_actorcore
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: arnaud.lefur Assignee: arnaud.lefur
Resolution: Unresolved Votes: 0
Labels: SPS
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-2158 GUI for alert actor thresholds Open
Story Points: 1

 Description   

When we need to edit configuration file and reload, we should be forbidden to edit the installed tagged version of pfs_instdata.
But right now, the other option is to stop the actor, setup another pfs_instdata and start the actor again which is basically overkill.

Just add optional configPath to actor.reloadConfiguration, so that $PFS_INSTDATA_DIR point to another directory, which can be edited in place.



 Comments   
Comment by rhl [ 01/Apr/23 ]

Doesn't this mean that we won't know which exact version we're running? Just how onerous is it to run a setup version (which needn't be tagged if you're trying to circumvent the system?)

Comment by cloomis [ 01/Apr/23 ]

We were thinking that the argument specifying the new pfs_instdata root would in almost all cases be for a different tagged version. In any case the version_pfs_instdata MHS key (and for FITS-writing actors the corresponding card) would change to the git describe --dirty for the new root.

Comment by cloomis [ 01/Apr/23 ]

Some actors are problematic to restart. Specifically, the gatevalve gets closed and the H4 DAQ powered off when the controlling actor for each is stopped. That is a property of the kernel driver along with the polarity of the signal lines.

Comment by rhl [ 01/Apr/23 ]

So you'd reload the new code into a running actor?

Comment by cloomis [ 01/Apr/23 ]

Configuration not code, but yes. Tell a running actor to use pfs_instdata 1.2 version of its configuration instead of the pfs_instdata 1.1 one it was built against. In practice this is mostly sane, since all current actors load a single config file, which boils down to a single python dictionary. The risk is that other parts of the actor's configuration would change but not get "applied".

One alternative was to support some "patching mechanism", where you basically allow an update of that dict.

We don't love these mechanisms, but are scared worse by not having any. I'd like, at the very least, to have a printout of changes when loading a new version.

Comment by cloomis [ 25/Oct/23 ]

Bump. We are and will be testing various ion pump controller configurations on SM3. I made the (very limited) changes to the installed tagged version, but am very unhappy about doing that. Did not want to cycle the gatevalve.

Hmm, thought: we could probably ensure that any new config version is on a git branch based directly off the starting tag. Not sure how, but that feels like something git can let you determine without too much work.

Generated at Sat Feb 10 16:40:58 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.