mirror of https://github.com/perkeep/perkeep.git
For GCE, don't send and ignore a 'localhost' hostname.
Change-Id: I329e86783c4b14deb9b8dfcb6ac827e3436d5faa
This commit is contained in:
parent
c7213346d0
commit
58ec210183
|
@ -384,7 +384,7 @@ func (d *Deployer) createInstance(computeService *compute.Service, ctx *context.
|
|||
},
|
||||
},
|
||||
}
|
||||
if d.Conf.Hostname != "" {
|
||||
if d.Conf.Hostname != "" && d.Conf.Hostname != "localhost" {
|
||||
instance.Metadata.Items = append(instance.Metadata.Items, &compute.MetadataItems{
|
||||
Key: "camlistore-hostname",
|
||||
Value: d.Conf.Hostname,
|
||||
|
|
|
@ -59,7 +59,7 @@ func DefaultEnvConfig() (*Config, error) {
|
|||
|
||||
ipOrHost, _ := metadata.ExternalIP()
|
||||
host, _ := metadata.InstanceAttributeValue("camlistore-hostname")
|
||||
if host != "" {
|
||||
if host != "" && host != "localhost" {
|
||||
ipOrHost = host
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue