Skip to content
Snippets Groups Projects
Commit 681ba606 authored by Jono Wenger's avatar Jono Wenger
Browse files

Merge branch 'release' of gitlab.com:elixxir/server into jono/yaml

parents 073897b3 3e74b513
Branches jono/yaml
No related tags found
No related merge requests found
......@@ -70,11 +70,23 @@ func NotStarted(instance *internal.Instance) error {
// Connect to the Permissioning Server without authentication
params = connect.GetDefaultHostParams()
params.AuthEnabled = false
permHost, err := network.AddHost(&id.Permissioning,
var permHost *connect.Host
if instance.GetDefinition().DevMode { // If we are running/testing a local network,
// no prepending is necessary. It is assumed the configurations are properly
// and explicitly set.
permHost, err = network.AddHost(&id.Permissioning,
// instance.GetPermissioningAddress,
ourDef.Network.Address,
ourDef.Network.TlsCert,
params)
} else { // This is for live network execution, in which prepending the network address
// with a specific string allows you to communicate with the network
permHost, err = network.AddHost(&id.Permissioning,
// instance.GetPermissioningAddress,
permissioningIp+ourDef.Network.Address,
ourDef.Network.TlsCert,
params)
}
if err != nil {
return errors.Errorf("Unable to connect to registration server: %+v", err)
......@@ -121,8 +133,21 @@ func NotStarted(instance *internal.Instance) error {
// ready for servers to connect to it
params = connect.GetDefaultHostParams()
params.MaxRetries = 0
if instance.GetDefinition().DevMode { // If we are running/testing a local network,
// no prepending is necessary. It is assumed the configurations are properly
// and explicitly set.
permHost, err = network.AddHost(&id.Permissioning,
ourDef.Network.Address,
ourDef.Network.TlsCert,
params)
} else { // This is for live network execution, in which prepending the network address
// with a specific string allows you to communicate with the network
permHost, err = network.AddHost(&id.Permissioning,
permissioningIp+ourDef.Network.Address, ourDef.Network.TlsCert, params)
// instance.GetPermissioningAddress,
permissioningIp+ourDef.Network.Address,
ourDef.Network.TlsCert,
params)
}
if err != nil {
return errors.Errorf("Unable to connect to registration server: %+v", err)
}
......
......@@ -81,7 +81,10 @@ func Send(sendFunc SendFunc, instance *internal.Instance) (response interface{},
retries++
}
// If we had to authorize, retry the comm again
// now that authorization was successful
if retries != 0 {
response, err = sendFunc(permHost)
}
return response, err
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment