Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: common/tsmon/target/flags.go

Issue 2225933003: tsmon: read hostname and region from config file (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« common/tsmon/iface.go ('K') | « common/tsmon/iface_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/tsmon/target/flags.go
diff --git a/common/tsmon/target/flags.go b/common/tsmon/target/flags.go
index b98b771fdbade92462547c0a51e1c0f1632b9593..2b89dfc468f04140a827014f7edd3604ab5e5e99 100644
--- a/common/tsmon/target/flags.go
+++ b/common/tsmon/target/flags.go
@@ -66,9 +66,6 @@ func (fl *Flags) SetDefaultsFromHostname() {
network := getNetwork(fl.SysInfo.Hostname)
hostname := fl.SysInfo.Hostname
- if fl.AutoGenHostname {
- hostname = "autogen:" + hostname
- }
if fl.DeviceHostname == "" {
fl.DeviceHostname = hostname
}
@@ -84,6 +81,10 @@ func (fl *Flags) SetDefaultsFromHostname() {
if fl.TaskHostname == "" {
fl.TaskHostname = hostname
}
+ if fl.AutoGenHostname {
+ fl.DeviceHostname = "autogen:" + fl.DeviceHostname
+ fl.TaskHostname = "autogen:" + fl.TaskHostname
+ }
}
// Register adds tsmon target related flags to a FlagSet.
« common/tsmon/iface.go ('K') | « common/tsmon/iface_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698