epics-modules / autosave

APS BCDA synApps module: autosave
https://epics-modules.github.io/autosave/
Other
8 stars 31 forks source link

Failure to reload configuration with configMenu #28

Closed darcato closed 4 years ago

darcato commented 4 years ago

Hello, when using configMenu I can save a configuration, but when I try to reload it I get Failure in the status pv and the following error in the ioc shell:

save_restore:do_manual_restore: ca_search for <END> timeout

Basically the saving procedure is adding a <END> tag at the end of the .cfg file that the loading procedure is not expecting. Apart from this problem all the pvs are correctly loaded.

If I remove manually the <END> tag, I get no error and the status pv shows Success, but the currName pv is stuck on working... instead of showing the name of the current loaded configuration.

I could reproduce these problems both with the last tagged release and with the last commit.

timmmooney commented 4 years ago

I'd like to reproduce this problem to see what is causing it. Can you help me? What versions of autosave and base? Are you using the MEDM (or caQtDM) display to do the saving and reloading? Can I see the autosave-request file and the create_manual_set() command? Also the .cfg file.

The .cfg file is supposed to have the tag, by the way. I don't understand why it's being treated as a PV name.

Tim Mooney (mooney@anl.gov) (630)252-5417 Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab


From: Davide Marcato notifications@github.com Sent: Friday, October 25, 2019 4:45 AM To: epics-modules/autosave autosave@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [epics-modules/autosave] Failure to reload configuration with configMenu (#28)

Hello, when using configMenu I can save a configuration, but when I try to reload it I get Failure in the status pv and the following error in the ioc shell:

save_restore:do_manual_restore: ca_search for timeout

Basically the saving procedure is adding a tag at the end of the .cfg file that the loading procedure is not expecting. A part from this problem all the pvs are correctly loaded.

If I remove manually the tag, I get no error and the status pv shows Success, but the currName pv is stuck on working... instead of showing the name of the current loaded configuration.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/epics-modules/autosave/issues/28?email_source=notifications&email_token=ABT6PF5W6ZULPGRZOLCFHL3QQK527A5CNFSM4JFBCLGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HUK2TPA, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABT6PF54YS2UBEXOGJA7FCLQQK527ANCNFSM4JFBCLGA.

MarkRivers commented 4 years ago

One issue that can cause strange behavior like this is line endings. Is this Windows or Linux, and what are the line endings?

darcato commented 4 years ago

Thanks for your replies! I'm using linux, and the following epics modules:

base = R7.0.3
asyn = R4-37
calc = R3-7-3
autosave = R5-10
busy = R1-7-2

even though I had the same problems with bases from the 3.15.x branch and different versions of the other modules. This is the startup command:

#!../../bin/linux-x86_64/dummy

< envPaths

## Register all support components
dbLoadDatabase("../../dbd/dummy.dbd",0,0)
dummy_registerRecordDeviceDriver(pdbbase) 

set_requestfile_path("${TOP}/iocBoot/${IOC}/autosave")
set_savefile_path("${TOP}/iocBoot/${IOC}/autosave/saved")
save_restoreSet_DatedBackupFiles(1)
save_restoreSet_NumSeqFiles(3)
save_restoreSet_SeqPeriodInSeconds(600)
save_restoreSet_RetrySeconds(60)
save_restoreSet_CAReconnect(1)
save_restoreSet_CallbackTimeout(-1)

## Load record instances
dbLoadRecords("../../db/pvs.db")
dbLoadRecords("../../db/configMenu.db","P=dave:,CONFIG=rf") 

set_pass1_restoreFile("rebootRfConfig.sav")

iocInit()

makeAutosaveFileFromDbInfo("autosave/rebootRfConfig.req", "tobesaved")
create_manual_set("rfMenu.req","P=dave:,CONFIG=rf,CONFIGMENU=1")
create_monitor_set("rebootRfConfig.req", 10)

#<EOF>

The (test) database file is:

record(ai, "pippo") {
    info (tobesaved, "VAL")
    field(DTYP, "Soft Channel")
    field(VAL,  "0")
}

record(ai, "pluto") {
    info (tobesaved, "VAL")
    field(DTYP, "Soft Channel")
    field(VAL,  "0")
}

Thus the generated rebootRfConfig.req file is:

pippo.VAL
pluto.VAL

While inside rfMenu.req I wrote:

file rebootRfConfig.req

to simply use all the pvs in the main configuration. The cfg file is the following:

# autosave R5.3 Automatically generated - DO NOT MODIFY - 191025-135507
pippo.VAL 0
pluto.VAL 0
<END>

As a GUI I am using the attached custom built opi file. main.zip

Let me know if you see something wrong.

timmmooney commented 4 years ago

You need this line: file configMenu.req P=dave:,CONFIG=rf in rfMenu.req.

It looks like autosave has always treated as a PV, but this hasn't caused an error before. I haven't figured out why.

Tim Mooney (mooney@anl.gov) (630)252-5417 Beamline Controls Group (www.aps.anl.gov) Advanced Photon Source, Argonne National Lab


From: Davide Marcato notifications@github.com Sent: Monday, October 28, 2019 9:50 AM To: epics-modules/autosave autosave@noreply.github.com Cc: Mooney, Tim M. mooney@anl.gov; Comment comment@noreply.github.com Subject: Re: [epics-modules/autosave] Failure to reload configuration with configMenu (#28)

Thanks for your replies! I'm using linux, and the following epics modules:

base = R7.0.3 asyn = R4-37 calc = R3-7-3 autosave = R5-10 busy = R1-7-2

even though I had the same problems with bases from the 3.15.x branch and different versions of the other modules. This is the startup command:

!../../bin/linux-x86_64/dummy

< envPaths

Register all support components

dbLoadDatabase("../../dbd/dummy.dbd",0,0) dummy_registerRecordDeviceDriver(pdbbase)

set_requestfile_path("${TOP}/iocBoot/${IOC}/autosave") set_savefile_path("${TOP}/iocBoot/${IOC}/autosave/saved") save_restoreSet_DatedBackupFiles(1) save_restoreSet_NumSeqFiles(3) save_restoreSet_SeqPeriodInSeconds(600) save_restoreSet_RetrySeconds(60) save_restoreSet_CAReconnect(1) save_restoreSet_CallbackTimeout(-1)

Load record instances

dbLoadRecords("../../db/pvs.db") dbLoadRecords("../../db/configMenu.db","P=dave:,CONFIG=rf")

set_pass1_restoreFile("rebootRfConfig.sav")

iocInit()

makeAutosaveFileFromDbInfo("autosave/rebootRfConfig.req", "tobesaved") create_manual_set("rfMenu.req","P=dave:,CONFIG=rf,CONFIGMENU=1") create_monitor_set("rebootRfConfig.req", 10)

The (test) database file is:

record(ai, "pippo") { info (tobesaved, "VAL") field(DTYP, "Soft Channel") field(VAL, "0") }

record(ai, "pluto") { info (tobesaved, "VAL") field(DTYP, "Soft Channel") field(VAL, "0") }

Thus the generated rebootRfConfig.req file is:

pippo.VAL pluto.VAL

While inside rfMenu.req I wrote:

file rebootRfConfig.req

to simply use all the pvs in the main configuration. The cfg file is the following:

autosave R5.3 Automatically generated - DO NOT MODIFY - 191025-135507

pippo.VAL 0 pluto.VAL 0

As a GUI I am using the attached custom built opi file. main.zip Let me know if you see something wrong. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
darcato commented 4 years ago

You need this line: file configMenu.req P=dave:,CONFIG=rf in rfMenu.req.

Thanks, this solved the problem of the status pv not showing the configuration name!

It looks like autosave has always treated as a PV, but this hasn't caused an error before. I haven't figured out why.

Ok, let me know if this can / will be solved.

darcato commented 4 years ago

I just tested the latest commit (1fb6ea5e6255d0215cf9cceec7682f78d8426f47) and the issue is fixed! Thank you! I think this can be closed..