Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
strudel2_backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
hpc-team
strudel2_backend
Commits
8af65d3c
Commit
8af65d3c
authored
4 years ago
by
Chris Hines
Browse files
Options
Downloads
Patches
Plain Diff
remove some extra debug messages
parent
ac7b82ac
No related branches found
No related tags found
3 merge requests
!77
Revert "disable agressive kill and restart"
,
!64
Test
,
!63
Dev
Pipeline
#16418
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
twsproxy/__init__.py
+3
-6
3 additions, 6 deletions
twsproxy/__init__.py
with
3 additions
and
6 deletions
twsproxy/__init__.py
+
3
−
6
View file @
8af65d3c
...
...
@@ -50,7 +50,6 @@ class TWSProxy(threading.Thread):
keepreading
=
False
if
port
is
not
None
:
logger
.
debug
(
'
Found the correct SSH Port
'
)
self
.
ssock
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
self
.
ssock
.
setblocking
(
True
)
try
:
...
...
@@ -98,8 +97,9 @@ class TWSProxy(threading.Thread):
@staticmethod
def
verifyauth
(
header
):
# We are looking for either
# 1. An Authentication header that we can map to an ssh session
# 2. A cookie called twsproxyauth that we can make to an ssh sesssion
# 1. An Authentication: token ... header that we can map to an ssh session
# 2. the string token=.... (usually appearing as a url query parameter)
# 3. A cookie called twsproxyauth that we can make to an ssh sesssion
import
re
import
requests
logger
=
logging
.
getLogger
()
...
...
@@ -110,7 +110,6 @@ class TWSProxy(threading.Thread):
authtok
=
m
.
groupdict
()[
'
authtok
'
].
rstrip
()
s
=
requests
.
Session
()
url
=
TES
+
'
tunnelstat/
'
+
authtok
.
decode
()
logger
.
debug
(
'
will query {}
'
.
format
(
url
))
try
:
r
=
s
.
get
(
url
)
port
=
r
.
json
()
...
...
@@ -130,7 +129,6 @@ class TWSProxy(threading.Thread):
authtok
=
m
.
groupdict
()[
'
authtok
'
].
rstrip
()
s
=
requests
.
Session
()
url
=
TES
+
'
tunnelstat/
'
+
authtok
.
decode
()
logger
.
debug
(
'
will query {}
'
.
format
(
url
))
try
:
r
=
s
.
get
(
url
)
port
=
r
.
json
()
...
...
@@ -155,7 +153,6 @@ class TWSProxy(threading.Thread):
except
:
raise
Exception
(
'
unable to get a port number for the authtok {}
'
.
format
(
r
.
text
))
return
port
logger
.
debug
(
'
no token yet {} {}
'
.
format
(
header
,
token
))
return
None
# if m:
# print('match verify!',m.group(0))
...
...
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