DUNE-DAQ / minidaqapp

0 stars 1 forks source link

Reverse polarity of TRACE enable in mdapp generator scripts. Add help… #41

Closed eflumerf closed 3 years ago

eflumerf commented 3 years ago

… text to explain what option is not doing.

eflumerf commented 3 years ago

I just got an error from nanorc when TRACE_FILE is not set...I wonder if there is some way to default it...

ron003 commented 3 years ago

Please provide additional info on the error received from nanorc

eflumerf commented 3 years ago

I think there must be changes in nanorc ( DUNE-DAQ/nanorc#8 ) before this PR is viable.

eflumerf commented 3 years ago
[09:59:07] ERROR    Failed to build NanoRC                                                                                                                                                                                                                                        nanorc.py:83
                    ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮             
                    │ /home/eflumerf/Desktop/dune-v2.4.0-base/dev-v2.4.0/nanorc/nanorc.py:81 in cli                                                                                                                                                                             │             
                    │                                                                                                                                                                                                                                                           │             
                    │    78 │   │   │   handler.setLevel(level)                                                                                                                                                                                                                 │             
                    │    79 │                                                                                                                                                                                                                                                   │             
                    │    80 │   try:                                                                                                                                                                                                                                            │             
                    │ ❱  81 │   │   rc = NanoRC(console, cfg_dir)                                                                                                                                                                                                               │             
                    │    82 │   except Exception as e:                                                                                                                                                                                                                          │             
                    │    83 │   │   logging.getLogger("rich").exception("Failed to build NanoRC")                                                                                                                                                                               │             
                    │    84 │   │   raise click.Abort()                                                                                                                                                                                                                         │             
                    │                                                                                                                                                                                                                                                           │             
                    │ /home/eflumerf/Desktop/dune-v2.4.0-base/dev-v2.4.0/nanorc/nanorc/core.py:21 in __init__                                                                                                                                                                   │             
                    │                                                                                                                                                                                                                                                           │             
                    │    18 │   │   super(NanoRC, self).__init__()                                                                                                                                                                                                              │             
                    │    19 │   │   self.log = logging.getLogger(self.__class__.__name__)                                                                                                                                                                                       │             
                    │    20 │   │   self.console = console                                                                                                                                                                                                                      │             
                    │ ❱  21 │   │   self.cfg = ConfigManager(cfg_dir)                                                                                                                                                                                                           │             
                    │    22 │   │                                                                                                                                                                                                                                               │             
                    │    23 │   │   self.pm = SSHProcessManager(console)                                                                                                                                                                                                        │             
                    │    24 │   │   self.apps = None                                                                                                                                                                                                                            │             
                    │                                                                                                                                                                                                                                                           │             
                    │ /home/eflumerf/Desktop/dune-v2.4.0-base/dev-v2.4.0/nanorc/nanorc/cfgmgr.py:37 in __init__                                                                                                                                                                 │             
                    │                                                                                                                                                                                                                                                           │             
                    │    34 │   │   super(ConfigManager, self).__init__()                                                                                                                                                                                                       │             
                    │    35 │   │   self.cfg_dir = cfg_dir                                                                                                                                                                                                                      │             
                    │    36 │   │                                                                                                                                                                                                                                               │             
                    │ ❱  37 │   │   self._load()                                                                                                                                                                                                                                │             
                    │    38 │                                                                                                                                                                                                                                                   │             
                    │    39 │   def _import_cmd_data(self, cmd: str, cfg: dict) -> None:                                                                                                                                                                                        │             
                    │    40 │   │   data = {}                                                                                                                                                                                                                                   │             
                    │                                                                                                                                                                                                                                                           │             
                    │ /home/eflumerf/Desktop/dune-v2.4.0-base/dev-v2.4.0/nanorc/nanorc/cfgmgr.py:93 in _load                                                                                                                                                                    │             
                    │                                                                                                                                                                                                                                                           │             
                    │    90 │   │   }                                                                                                                                                                                                                                           │             
                    │    91 │   │                                                                                                                                                                                                                                               │             
                    │    92 │   │   for exec_spec in self.boot["exec"].values():                                                                                                                                                                                                │             
                    │ ❱  93 │   │   │   exec_spec["env"] = {                                                                                                                                                                                                                    │             
                    │    94 │   │   │   │   k: (os.environ[k] if v == "getenv" else v) for k, v in                                                                                                                                                                              │             
                    │       exec_spec["env"].items()                                                                                                                                                                                                                            │             
                    │    95 │   │   │   }                                                                                                                                                                                                                                       │             
                    │    96 │   │   # Conf:                                                                                                                                                                                                                                     │             
                    │                                                                                                                                                                                                                                                           │             
                    │ /home/eflumerf/Desktop/dune-v2.4.0-base/dev-v2.4.0/nanorc/nanorc/cfgmgr.py:94 in <dictcomp>                                                                                                                                                               │             
                    │                                                                                                                                                                                                                                                           │             
                    │    91 │   │                                                                                                                                                                                                                                               │             
                    │    92 │   │   for exec_spec in self.boot["exec"].values():                                                                                                                                                                                                │             
                    │    93 │   │   │   exec_spec["env"] = {                                                                                                                                                                                                                    │             
                    │ ❱  94 │   │   │   │   k: (os.environ[k] if v == "getenv" else v) for k, v in                                                                                                                                                                              │             
                    │       exec_spec["env"].items()                                                                                                                                                                                                                            │             
                    │    95 │   │   │   }                                                                                                                                                                                                                                       │             
                    │    96 │   │   # Conf:                                                                                                                                                                                                                                     │             
                    │    97 │   │   ips = {n: socket.gethostbyname(h) for n, h in self.boot["hosts"].items()}                                                                                                                                                                   │             
                    │                                                                                                                                                                                                                                                           │             
                    │ /cvmfs/dune.opensciencegrid.org/dunedaq/DUNE/releases/dunedaq-v2.4.0/externals/python/v3_8_3b/Linux64bit+3.10-2.17/lib/python3.8/os.py:675 in __getitem__                                                                                                 │             
                    │                                                                                                                                                                                                                                                           │             
                    │    672 │   │   │   value = self._data[self.encodekey(key)]                                                                                                                                                                                                │             
                    │    673 │   │   except KeyError:                                                                                                                                                                                                                           │             
                    │    674 │   │   │   # raise KeyError with the original key value                                                                                                                                                                                           │             
                    │ ❱  675 │   │   │   raise KeyError(key) from None                                                                                                                                                                                                          │             
                    │    676 │   │   return self.decodevalue(value)                                                                                                                                                                                                             │             
                    │    677 │                                                                                                                                                                                                                                                  │             
                    │    678 │   def __setitem__(self, key, value):                                                                                                                                                                                                             │             
                    ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯             
                    KeyError: 'TRACE_FILE'                                                                                                                                                                                                                                                    
Aborted!
ron003 commented 3 years ago

I see the error also -- when I don't have TRACE_FILE defined.