prjemian / epics-docker

Provide EPICS IOCs in docker images
9 stars 4 forks source link

synApps container reports iocxxx to alive #9

Closed prjemian closed 3 years ago

prjemian commented 4 years ago

The startup of the synApps container should modify the envParams so that it reports the correct IOC name to alive. Here's what it looks like now at APS:

(base) jemian@wow ~ $ ~/bin/start_iocs.sh
starting container iocsky ... e436e6860df2a38b110d121170525131156990d23afae5eadfeaa2c26f051f16
changing xxx: to sky: in iocsky
starting IOC iocsky ... docker exec iocsky iocxxx/softioc/xxx.sh start
Starting xxx
copy IOC iocsky to /tmp/docker_ioc/iocsky
starting container iocadsky ... c39b78b31b023a8902dc2a4c1fcedddf6b96e4e3fea7eebc872d763b68bb6d5e
starting IOC iocadsky ... docker exec iocadsky iocSimDetector/simDetector.sh start
Starting simDetector
copy IOC iocadsky to /tmp/docker_ioc/iocadsky
changing 13SIM1: to adsky: in iocadsky
(base) jemian@wow ~ $ alivedb iocxxx
iocxxx (164.54.104.38) 0 - Up time: 21 sec

Environment Variables
  ARCH = linux-x86_64
  TOP = /opt/synApps/support/xxx-R6-1
  EPICS_BASE = /opt/base
  SUPPORT = /opt/synApps/support
  ENGINEER = engineer
  LOCATION = location
  GROUP = group

Linux Parameters
  user = root
  group = root
  hostname = wow.xray.aps.anl.gov
(base) jemian@wow ~ $ cainfo {sky,xxx}:UPTIME
Channel connect timed out: some PV(s) not found.
sky:UPTIME
    State:            connected
    Host:             wow.xray.aps.anl.gov:5064
    Access:           read, write
    Native data type: DBF_STRING
    Request type:     DBR_STRING
    Element count:    1
xxx:UPTIME
    State:            never connected
    Host:             <disconnected>
    Access:           no read, no write
    Native data type: TYPENOTCONN
    Request type:     DBR_invalid
    Element count:    0
(base) jemian@wow ~ $ caget {sky,xxx}:UPTIME
Channel connect timed out: some PV(s) not found.
sky:UPTIME                     00:00:57
xxx:UPTIME                     *** not connected
(base) jemian@wow ~ $

Thanks to @kmpeters for identifying this!

prjemian commented 4 years ago

@dohnarms : How does alive learn/determine the name of the IOC? Can I override it?

context: I have a docker container that starts an IOC where the IOC prefix can be supplied when the IOC starts. The default is xxx: and it runs from directory iocxxx.

dohnarms commented 4 years ago

Hi Pete,

By default, alive uses what is in the IOC environment variable. You can change the environment variable used by changing the NMVAR record field value from "IOC". You can also directly set the IOC name with the IOCNM record field, which overrides any environment variable (this is probably what you want).

You need at least alive version 1-1-0 for these methods to exist.

Dohn


From: Pete R Jemian notifications@github.com Sent: Saturday, June 6, 2020 10:45 PM To: prjemian/epics-docker epics-docker@noreply.github.com Cc: Arms, Dohn A. dohnarms@anl.gov; Mention mention@noreply.github.com Subject: Re: [prjemian/epics-docker] synApps container reports iocxxx to alive (#9)

@dohnarmshttps://github.com/dohnarms : How does alive learn/determine the name of the IOC? Can I override it?

context: I have a docker container that starts an IOC where the IOC prefix can be supplied when the IOC starts. The default is xxx: and it runs from directory iocxxx.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/prjemian/epics-docker/issues/9#issuecomment-640152500, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC6737N2TANFNONMAWK7UFLRVMENVANCNFSM4MDK6WVQ.

prjemian commented 3 years ago

Will remove ALIVE from the docker image.