Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
synnefo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
synnefo
Commits
697a4963
Commit
697a4963
authored
Dec 13, 2012
by
Christos Stavrakakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc minor bug fixes
parent
46098a3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
snf-cyclades-app/synnefo/logic/backend.py
snf-cyclades-app/synnefo/logic/backend.py
+1
-3
snf-cyclades-app/synnefo/logic/callbacks.py
snf-cyclades-app/synnefo/logic/callbacks.py
+5
-1
snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py
...pp/synnefo/logic/management/commands/reconcile-servers.py
+1
-1
No files found.
snf-cyclades-app/synnefo/logic/backend.py
View file @
697a4963
...
...
@@ -220,7 +220,7 @@ def process_network_status(back_network, etime, jobid, opcode, status, logmsg):
if
status
==
'success'
and
state_for_success
is
not
None
:
back_network
.
operstate
=
state_for_success
if
status
in
(
'canceled'
,
'error'
)
and
opcode
==
'OP_NETWORK_
CREATE
'
:
if
status
in
(
'canceled'
,
'error'
)
and
opcode
==
'OP_NETWORK_
ADD
'
:
utils
.
update_state
(
back_network
,
'ERROR'
)
back_network
.
backendtime
=
etime
...
...
@@ -250,7 +250,6 @@ def update_network_state(serials, network):
all_equal
=
len
(
set
(
backend_states
))
<=
1
network
.
state
=
all_equal
and
backend_states
[
0
]
or
'PENDING'
# Release the resources on the deletion of the Network
if
old_state
!=
'DELETED'
and
network
.
state
==
'DELETED'
:
log
.
info
(
"Network %r deleted. Releasing link %r mac_prefix %r"
,
...
...
@@ -270,7 +269,6 @@ def update_network_state(serials, network):
network
.
serial
=
serial
serial
.
accepted
=
True
serial
.
save
()
network
.
save
()
...
...
snf-cyclades-app/synnefo/logic/callbacks.py
View file @
697a4963
...
...
@@ -51,6 +51,7 @@ def handle_message_delivery(func):
@
wraps
(
func
)
def
wrapper
(
client
,
message
,
*
args
,
**
kwargs
):
try
:
msg
=
None
msg
=
json
.
loads
(
message
[
'body'
])
func
(
msg
)
client
.
basic_ack
(
message
)
...
...
@@ -62,7 +63,10 @@ def handle_message_delivery(func):
e
,
message
)
client
.
basic_nack
(
message
)
except
Exception
as
e
:
log
.
exception
(
"Unexpected error: %s, msg: %s"
,
e
,
msg
)
if
msg
:
log
.
exception
(
"Unexpected error: %s, msg: %s"
,
e
,
msg
)
else
:
log
.
exception
(
"Unexpected error: %s"
,
e
)
client
.
basic_reject
(
message
)
return
wrapper
...
...
snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py
View file @
697a4963
...
...
@@ -177,7 +177,7 @@ class Command(BaseCommand):
unsynced_nics
=
reconciliation
.
unsynced_nics
(
DBNics
,
GNics
)
if
len
(
unsynced_nics
)
>
0
:
print
>>
sys
.
stderr
,
"The NICs of servers with the folloing IDs "
\
print
>>
sys
.
stderr
,
"The NICs of servers with the follo
w
ing IDs "
\
"are unsynced:"
for
id
,
nics
in
unsynced_nics
.
items
():
print
''
.
ljust
(
2
)
+
'%6d:'
%
id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment