Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cardano-node/src/Cardano/Node/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ handleSimpleNode runP p2pMode tracers nc onKernel = do
, srnMaybeMempoolCapacityOverride = ncMaybeMempoolCapacityOverride nc
}
DisabledP2PMode -> do
#ifdef UNIX
_ <- Signals.installHandler
Signals.sigHUP
(Signals.Catch $ do
traceWith (startupTracer tracers) NetworkConfigUpdateUnsupported
)
Nothing
#endif
eitherTopology <- TopologyNonP2P.readTopologyFile nc
nt <- either (\err -> panic $ "Cardano.Node.Run.handleSimpleNodeNonP2P.readTopologyFile: " <> err) pure eitherTopology
let (ipProducerAddrs, dnsProducerAddrs) = producerAddressesNonP2P nt
Expand Down
4 changes: 4 additions & 0 deletions cardano-node/src/Cardano/Node/Startup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ data StartupTrace blk =
--
| NetworkConfigUpdate

-- | Re-configuration of network config is not supported.
--
| NetworkConfigUpdateUnsupported

-- | Log network configuration update error.
--
| NetworkConfigUpdateError Text
Expand Down
8 changes: 7 additions & 1 deletion cardano-node/src/Cardano/Node/Tracing/Tracers/Startup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ namesStartupInfo = \case
StartupSocketConfigError {} -> ["StartupSocketConfigError"]
StartupDBValidation {} -> ["StartupDBValidation"]
NetworkConfigUpdate {} -> ["NetworkConfigUpdate"]
NetworkConfigUpdateUnsupported -> ["NetworkConfigUpdateUnsupported"]
NetworkConfigUpdateError {} -> ["NetworkConfigUpdateError"]
NetworkConfig {} -> ["NetworkConfig"]
P2PWarning {} -> ["P2PWarning"]
Expand Down Expand Up @@ -198,7 +199,10 @@ instance ( Show (BlockNodeToNodeVersion blk)
, "message" .= String "start db validation" ]
forMachine _dtal NetworkConfigUpdate =
mconcat [ "kind" .= String "NetworkConfigUpdate"
, "message" .= String "ntework configuration update" ]
, "message" .= String "network configuration update" ]
forMachine _dtal NetworkConfigUpdateUnsupported =
mconcat [ "kind" .= String "NetworkConfigUpdate"
, "message" .= String "network topology reconfiguration is not supported in non-p2p mode" ]
forMachine _dtal (NetworkConfigUpdateError err) =
mconcat [ "kind" .= String "NetworkConfigUpdateError"
, "error" .= String err ]
Expand Down Expand Up @@ -299,6 +303,8 @@ ppStartupInfoTrace (StartupSocketConfigError err) =
ppStartupInfoTrace StartupDBValidation = "Performing DB validation"

ppStartupInfoTrace NetworkConfigUpdate = "Performing topology configuration update"
ppStartupInfoTrace NetworkConfigUpdateUnsupported =
"Network topology reconfiguration is not supported in non-p2p mode"
ppStartupInfoTrace (NetworkConfigUpdateError err) = err
ppStartupInfoTrace (NetworkConfig localRoots publicRoots useLedgerAfter) =
pack
Expand Down
1 change: 1 addition & 0 deletions cardano-node/src/Cardano/Tracing/Startup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import Ouroboros.Consensus.Node.NetworkProtocolVersion
instance HasSeverityAnnotation (StartupTrace blk) where
getSeverityAnnotation (StartupSocketConfigError _) = Error
getSeverityAnnotation (NetworkConfigUpdateError _) = Error
getSeverityAnnotation NetworkConfigUpdateUnsupported = Warning
getSeverityAnnotation P2PWarning = Warning
getSeverityAnnotation P2PWarningDevelopementNetworkProtocols = Warning
getSeverityAnnotation WarningDevelopmentNetworkProtocols {} = Warning
Expand Down