diff --git a/cardano-node/src/Cardano/Node/Startup.hs b/cardano-node/src/Cardano/Node/Startup.hs index 0e820aef149..5d56414a80e 100644 --- a/cardano-node/src/Cardano/Node/Startup.hs +++ b/cardano-node/src/Cardano/Node/Startup.hs @@ -250,9 +250,16 @@ prepareNodeInfo nc (SomeConsensusProtocol whichP pForInfo) tc nodeStartTime = do -- In this case we should form node's name as "host_port", -- where 'host' is the machine's host name and 'port' is taken -- from the '--port' CLI-parameter. - let SocketConfig{ncNodePortNumber = port} = ncSocketConfig nc + + let suffix :: Text + suffix + | SocketConfig{ncNodePortNumber = Last (Just port)} <- ncSocketConfig nc + = "_" <> show port + | otherwise + = "" + hostName <- getHostName - return . pack $ hostName <> "_" <> show (getLast port) + return (pack (hostName <> suffix)) -- | This information is taken from 'BasicInfoShelleyBased'. It is required for -- 'cardano-tracer' service (particularly, for RTView). diff --git a/cardano-testnet/src/Testnet/Start/Cardano.hs b/cardano-testnet/src/Testnet/Start/Cardano.hs index 3c3f6080130..13d375cd1c8 100644 --- a/cardano-testnet/src/Testnet/Start/Cardano.hs +++ b/cardano-testnet/src/Testnet/Start/Cardano.hs @@ -275,6 +275,10 @@ cardanoTestnet -- Add Byron, Shelley and Alonzo genesis hashes to node configuration config <- createConfigJson (TmpAbsolutePath tmpAbsPath) sbe H.evalIO $ LBS.writeFile (unFile configurationFile) config + execCli_ + [ "debug", "check-node-configuration" + , "--node-configuration-file", unFile configurationFile + ] portNumbersWithNodeOptions <- forM cardanoNodes $ \nodeOption -> (nodeOption,) <$> H.randomPort testnetDefaultIpv4Address let portNumbers = snd <$> portNumbersWithNodeOptions diff --git a/cardano-tracer/src/Cardano/Tracer/Handlers/Metrics/Utils.hs b/cardano-tracer/src/Cardano/Tracer/Handlers/Metrics/Utils.hs index a1cf8466065..6e966e0a130 100644 --- a/cardano-tracer/src/Cardano/Tracer/Handlers/Metrics/Utils.hs +++ b/cardano-tracer/src/Cardano/Tracer/Handlers/Metrics/Utils.hs @@ -84,7 +84,6 @@ computeRoutes TracerEnv{teConnectedNodesNames, teAcceptedMetrics} = atomically d pure (RouteDictionary routes) - contentHdrJSON, contentHdrOpenMetrics, contentHdrUtf8Html, contentHdrUtf8Text :: ResponseHeaders contentHdrJSON = [(hContentType, "application/json")] contentHdrOpenMetrics = [(hContentType, "application/openmetrics-text; version=1.0.0; charset=utf-8")]