Skip to content

Commit 7ac3866

Browse files
committed
feat(dataplane): set name from arg or hostname()
Signed-off-by: Fredi Raspall <[email protected]>
1 parent e3d02cc commit 7ac3866

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

dataplane/src/main.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,9 @@ fn main() {
156156
let pipeline_factory = setup.pipeline;
157157

158158
/* start management */
159-
let hostname = nix::unistd::gethostname()
160-
.expect("Failed to get hostname")
161-
.to_str()
162-
.expect("hostname is not valid unicode")
163-
.to_string();
164-
165159
start_mgmt(MgmtParams {
166160
grpc_addr,
167-
hostname,
161+
hostname: get_gw_name().unwrap_or_else(|| unreachable!()).to_owned(),
168162
processor_params: ConfigProcessorParams {
169163
router_ctl: setup.router.get_ctl_tx(),
170164
vpcmapw: setup.vpcmapw,

0 commit comments

Comments
 (0)