Commit c4918c9
authored
Use updated version of m-lab/go/host, which supports service names (#117)
* Uses m-lab/go/host package to determine hostname
Virtual machines that are part of a managed instance group will have
hostnames/machinenames that have a random suffix, and many of mlab's
tools expect hostnames without this suffix. This commit uses the
hostname as parsed by the `host` package rather than the raw node Name
passed in through the environment. This should result in a valid
hostname that does not include any random suffixes.
* Uses m-lab/go/host v0.1.58 to preserve service name
In the case of virtual nodes that are part of a managed instane group,
the node name and hostname will have a random 4 char suffix. This suffix
isn't wanted by heartbeat or Locate. This commit updates the included
version of m-lab/go to bring in changes to the host package, which adds
new functions for returning the hostname with or without service names
and suffixes.
* Fixes unit test for location.go which uses package1 parent f5db798 commit c4918c9
File tree
5 files changed
+17
-6
lines changed- cmd/heartbeat
- heartbeat
5 files changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
529 | 530 | | |
530 | 531 | | |
531 | 532 | | |
532 | 533 | | |
| 534 | + | |
533 | 535 | | |
534 | 536 | | |
535 | 537 | | |
| |||
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| 550 | + | |
548 | 551 | | |
549 | 552 | | |
550 | 553 | | |
551 | 554 | | |
| 555 | + | |
552 | 556 | | |
553 | 557 | | |
554 | 558 | | |
| |||
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
589 | | - | |
| 593 | + | |
590 | 594 | | |
591 | 595 | | |
592 | 596 | | |
| |||
0 commit comments