Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes to the logbook configuration (doesn't actually use the ~/.nanor… #260

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

plasorak
Copy link
Contributor

…c.json?!?!)

@plasorak plasorak added the bug Something isn't working label Mar 27, 2024
@bieryAtFnal bieryAtFnal added the miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable label Mar 27, 2024
Copy link
Contributor

@TiagoTAlves TiagoTAlves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing this I got an error saying that couldn't find np04_hd in dotnanorc:

(dbt) [np04daq@np04-srv-024 dunedaq-NFD_PROD4_240328-dev]$ rc04 global_configs/np04_WIB_100mHz.json titavare
Launching 'nano04rc --partition-number 5 --timeout 120 global_configs/np04_WIB_100mHz.json titavare np04hddev'
╭──────────────────────────────────────────────────────────────────────────╮
│                             Shonky Nano04RC                              │
│  This is an admittedly shonky nano RC to control DUNE-DAQ applications.  │
│    Give it a command and it will do your biddings,                       │
│    but trust it and it will betray you!                                  │
│  Use it with care, user!                                                 │
╰──────────────────────────────────────────────────────────────────────────╯
Loading /nfs/home/np04daq/.nanorc.json
[19:33:37] INFO     RunDB socket http://np04-srv-017.cern.ch:30016                                                                                                                                                      __main_np04__.py:102
           INFO     RunRegistryDB socket http://np04-srv-017.cern.ch:30015                                                                                                                                              __main_np04__.py:103
           ERROR    Can't find apparatus 'np04_hd' in dotnanorc, reverting to file logbook!                                                                                                                             __main_np04__.py:118
           INFO     nano-conf-svc Flask lives on PID: 122282                                                                                                                                                                     utils.py:57
FSM available states: ['none', 'booted', 'initial', 'configured', 'ready', 'running', 'paused', 'dataflow_drained', 'trigger_sources_stopped', 'error']
FSM available transitions: {'enable_triggers', 'stop', 'terminate', 'boot', 'start', 'stop_trigger_sources', 'abort', 'conf', 'drain_dataflow', 'scrap', 'disable_triggers'}
Extra commands are []
[19:33:53] INFO     Using filelogbook                                                                                                                                                                                            core.py:112
Running on the apparatus np04_hd:
╭─────────────────╮
│ np04_hd         │
│ ├── np04_wib    │
│ ├── np04_hermes │
│ └── np04_daq    │
╰─────────────────╯
titavare@np04rc> exit
[19:34:37] INFO     nano-conf-svc-flaskmanager terminated

Maybe we should consider reviewing

@plasorak
Copy link
Contributor Author

Do you have a np04_hd in the ~/.nanorc.json?

@wesketchum
Copy link
Contributor

I got the same error when I tried (thanks @TiagoTAlves for reporting it here).

Here's the .nanorc.json file. So, there is a np04_hd in the elisa_configuration block, but I'm not sure if that's the right level that the code is expecting? Haven't have time to try to follow that through.

[wketchum@np04-srv-024 ~]$ cat ~np04daq/.nanorc.json
{
    "cern": {
        "elisa_configuration":{
            "np02_coldbox": {
                "connection": "https://np-vd-coldbox-elog.app.cern.ch/elisa/api/np-vd-coldbox-elog/",
                "website": "https://np-vd-coldbox-elog.app.cern.ch/",
                "attributes": {
                    "start": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"SoR"
                        }
                    },
                    "stop": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"EoR"
                        }
                    },
                    "message": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"Alarm"
                        }
                    }
                }
            },
            "np02_pds": {
                "connection": "https://np-vd-coldbox-elog.app.cern.ch/elisa/api/np-vd-coldbox-elog/",
                "website": "https://np-vd-coldbox-elog.app.cern.ch/",
                "attributes": {
                    "start": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"SoR"
                        }
                    },
                    "stop": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"EoR"
                        }
                    },
                    "message": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"Automatic"
                        },
                        "Automatic_Message_Type": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"Alarm"
                        }
                    }
                }
            },
            "np04_coldbox": {
                "connection": "https://pdsp-elog.app.cern.ch/elisa/api/ProtoDUNE-SP/",
                "website": "https://pdsp-elog.app.cern.ch",
                "attributes": {
                    "start": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    },
                    "stop": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    },
                    "message": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    }
                }
            },
            "np04_hd": {
                "connection": "https://pdsp-elog.app.cern.ch/elisa/api/ProtoDUNE-SP/",
                "website": "https://pdsp-elog.app.cern.ch",
                "attributes": {
                    "start": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    },
                    "stop": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    },
                    "message": {
                        "type": {
                            "set_on_reply": false,
                            "set_on_new_thread": true,
                            "value":"RunControl Message"
                        },
                        "RunControl_MessageType": {
                            "set_on_reply": true,
                            "set_on_new_thread": true,
                            "value":"status"
                        }
                    }
                }
            }
        },
        "run_registry_configuration":{
            "socket": "http://np04-srv-017.cern.ch:30015"
        },
        "run_number_configuration":{
            "socket": "http://np04-srv-017.cern.ch:30016"
        },
        "authentication": {
            "run_registry": {
                "user": "fooUsr",
                "password": "barPass",
                "type": "simple"
            },
            "run_number": {
                "user": "fooUsr",
                "password": "barPass",
                "type": "simple"
            },
            "elisa": {
                "user": "rcpd",
                "type": "service-account",
                "realm": "CERN.CH"
            }
        }
    }
}

@plasorak
Copy link
Contributor Author

plasorak commented Apr 3, 2024

@wesketchum, @TiagoTAlves I've corrected the logic.

@bieryAtFnal bieryAtFnal changed the base branch from production/v4 to prep-release/fddaq-v4.4.0 April 3, 2024 11:23
@bieryAtFnal
Copy link
Contributor

Changed the target merge branch to prep-release/fddaq-v4.4.0 now that the first release candidate has been built.

@plasorak plasorak merged commit 8bfad81 into prep-release/fddaq-v4.4.0 Apr 9, 2024
@plasorak plasorak deleted the plasorak/fix-logbook-conf branch April 9, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants