Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
f4270862
Commit
f4270862
authored
14 years ago
by
Antoine Millet
Browse files
Options
Downloads
Patches
Plain Diff
Added $HOSTNAME variable on login field of config file.
parent
b4999a38
Loading
Loading
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/cc-node
+4
-2
4 additions, 2 deletions
bin/cc-node
with
4 additions
and
2 deletions
bin/cc-node
+
4
−
2
View file @
f4270862
...
...
@@ -10,6 +10,7 @@ import logging
import
logging.handlers
import
signal
import
threading
import
socket
from
time
import
sleep
try
:
...
...
@@ -24,7 +25,7 @@ DEFAULT_CONFIG_FILE = '/etc/cc-node.conf'
DEFAULT_PID_FILE
=
'
/var/run/cc-node.pid
'
DEFAULT_CONFIGURATION
=
{
'
address
'
:
None
,
'
login
'
:
None
,
'
login
'
:
'
$HOSTNAME
'
,
'
password
'
:
None
,
'
port
'
:
1984
,
'
verbosity
'
:
0
,
...
...
@@ -65,9 +66,10 @@ def run_node(options):
logging
.
info
(
'
Connected to server %s
'
%
options
[
'
address
'
])
def
authentication
():
login
=
options
[
'
login
'
].
replace
(
'
$HOSTNAME
'
,
socket
.
gethostname
())
while
node
.
manager
.
is_running
():
try
:
node
.
authentify
(
options
[
'
login
'
]
,
options
[
'
password
'
])
node
.
authentify
(
login
,
options
[
'
password
'
])
except
RpcError
as
error
:
logging
.
critical
(
'
Authentication error: %s
'
%
error
)
sleep
(
2
)
...
...
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