Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
itminedu
snf-ganeti
Commits
e09fdcfa
Commit
e09fdcfa
authored
16 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
Fix some pylint-detected issues
Two bad indentation cases and a missing variable. Reviewed-by: imsnah
parent
5b099da9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
daemons/ganeti-masterd
+3
-3
3 additions, 3 deletions
daemons/ganeti-masterd
daemons/ganeti-rapi
+1
-0
1 addition, 0 deletions
daemons/ganeti-rapi
lib/http/auth.py
+4
-4
4 additions, 4 deletions
lib/http/auth.py
lib/hypervisor/hv_xen.py
+4
-4
4 additions, 4 deletions
lib/hypervisor/hv_xen.py
with
12 additions
and
11 deletions
daemons/ganeti-masterd
+
3
−
3
View file @
e09fdcfa
...
...
@@ -402,9 +402,9 @@ def CheckAgreement():
continue
break
if
retries
==
0
:
logging
.
critical
(
"
Cluster inconsistent, most of the nodes didn
'
t answer
"
"
after multiple retries. Aborting startup
"
)
return
False
logging
.
critical
(
"
Cluster inconsistent, most of the nodes didn
'
t answer
"
"
after multiple retries. Aborting startup
"
)
return
False
# here a real node is at the top of the list
all_votes
=
sum
(
item
[
1
]
for
item
in
votes
)
top_node
,
top_votes
=
votes
[
0
]
...
...
This diff is collapsed.
Click to expand it.
daemons/ganeti-rapi
+
1
−
0
View file @
e09fdcfa
...
...
@@ -134,6 +134,7 @@ class RemoteApiHttpServer(http.auth.HttpServerRequestAuthentication,
if
sn
:
req
.
response_headers
[
http
.
HTTP_ETAG
]
=
str
(
sn
)
except
:
method
=
req
.
request_method
.
upper
()
logging
.
exception
(
"
Error while handling the %s request
"
,
method
)
raise
...
...
This diff is collapsed.
Click to expand it.
lib/http/auth.py
+
4
−
4
View file @
e09fdcfa
...
...
@@ -166,19 +166,19 @@ class HttpServerRequestAuthentication(object):
# Unsupported authentication scheme
return
False
def
_CheckBasicAuthorization
(
self
,
req
,
in
put
):
def
_CheckBasicAuthorization
(
self
,
req
,
in
_data
):
"""
Checks credentials sent for basic authentication.
@type req: L{http.server._HttpServerRequest}
@param req: HTTP request context
@type in
put
: str
@param in
put
: Username and password encoded as Base64
@type in
_data
: str
@param in
_data
: Username and password encoded as Base64
@rtype: bool
@return: Whether user is allowed to execute request
"""
try
:
creds
=
base64
.
b64decode
(
in
put
.
encode
(
'
ascii
'
)).
decode
(
'
ascii
'
)
creds
=
base64
.
b64decode
(
in
_data
.
encode
(
'
ascii
'
)).
decode
(
'
ascii
'
)
except
(
TypeError
,
binascii
.
Error
,
UnicodeError
):
logging
.
exception
(
"
Error when decoding Basic authentication credentials
"
)
return
False
...
...
This diff is collapsed.
Click to expand it.
lib/hypervisor/hv_xen.py
+
4
−
4
View file @
e09fdcfa
...
...
@@ -461,10 +461,10 @@ class XenHvmHypervisor(XenHypervisor):
# hvm_cdrom_image_path verification
iso_path
=
hvparams
[
constants
.
HV_CDROM_IMAGE_PATH
]
if
iso_path
and
not
os
.
path
.
isfile
(
iso_path
):
raise
errors
.
HypervisorError
(
"
The HVM CDROM image must either be a
"
"
regular file or a symlink pointing to
"
"
an existing regular file, not %s
"
%
iso_path
)
raise
errors
.
HypervisorError
(
"
The HVM CDROM image must either be a
"
"
regular file or a symlink pointing to
"
"
an existing regular file, not %s
"
%
iso_path
)
@classmethod
def
_WriteConfigFile
(
cls
,
instance
,
block_devices
,
extra_args
):
...
...
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