Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Netrino
server
Commits
681ba606
Commit
681ba606
authored
Jul 28, 2021
by
Jono Wenger
Browse files
Options
Downloads
Plain Diff
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
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
node/changeHandlers.go
+32
-7
32 additions, 7 deletions
node/changeHandlers.go
permissioning/authorizer.go
+5
-2
5 additions, 2 deletions
permissioning/authorizer.go
with
37 additions
and
9 deletions
node/changeHandlers.go
+
32
−
7
View file @
681ba606
...
...
@@ -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
)
}
...
...
This diff is collapsed.
Click to expand it.
permissioning/authorizer.go
+
5
−
2
View file @
681ba606
...
...
@@ -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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment