Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
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
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
0355bddc
Commit
0355bddc
authored
Apr 05, 2011
by
Naoki Kambe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'trac698'
Conflicts: ChangeLog
parents
62a61edf
dec73bbd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
2 deletions
+28
-2
ChangeLog
ChangeLog
+5
-0
src/lib/python/isc/config/ccsession.py
src/lib/python/isc/config/ccsession.py
+3
-0
src/lib/python/isc/config/tests/ccsession_test.py
src/lib/python/isc/config/tests/ccsession_test.py
+12
-1
src/lib/python/isc/config/tests/unittest_fakesession.py
src/lib/python/isc/config/tests/unittest_fakesession.py
+8
-1
No files found.
ChangeLog
View file @
0355bddc
212. [bug] naokikambe
Fixed that the ModuleCCSession object may group_unsubscribe in the
closed CC session in being deleted.
(Trac #698, git tbdtbdtbdtbdtbdtbdtbdtbdtbdtbdtbdtbdttbd)
211. [func] shane
Implement "--brittle" option, which causes the server to exit
if any of BIND 10's processes dies.
...
...
src/lib/python/isc/config/ccsession.py
View file @
0355bddc
...
...
@@ -151,6 +151,9 @@ class ModuleCCSession(ConfigData):
self
.
_remote_module_configs
=
{}
def
__del__
(
self
):
# If the CC Session obejct has been closed, it returns
# immediately.
if
self
.
_session
.
_closed
:
return
self
.
_session
.
group_unsubscribe
(
self
.
_module_name
,
"*"
)
for
module_name
in
self
.
_remote_module_configs
:
self
.
_session
.
group_unsubscribe
(
module_name
)
...
...
src/lib/python/isc/config/tests/ccsession_test.py
View file @
0355bddc
...
...
@@ -234,7 +234,18 @@ class TestModuleCCSession(unittest.TestCase):
fake_session
=
FakeModuleCCSession
()
mccs
=
self
.
create_session
(
"spec1.spec"
,
None
,
None
,
fake_session
)
mccs
.
close
()
self
.
assertEqual
(
"closed"
,
fake_session
.
_socket
)
self
.
assertEqual
(
None
,
fake_session
.
_socket
)
def
test_del_opened
(
self
):
fake_session
=
FakeModuleCCSession
()
mccs
=
self
.
create_session
(
"spec1.spec"
,
None
,
None
,
fake_session
)
mccs
.
__del__
()
# with opened fake_session
def
test_del_closed
(
self
):
fake_session
=
FakeModuleCCSession
()
mccs
=
self
.
create_session
(
"spec1.spec"
,
None
,
None
,
fake_session
)
fake_session
.
close
()
mccs
.
__del__
()
# with closed fake_session
def
my_config_handler_ok
(
self
,
new_config
):
return
isc
.
config
.
ccsession
.
create_answer
(
0
)
...
...
src/lib/python/isc/config/tests/unittest_fakesession.py
View file @
0355bddc
...
...
@@ -35,6 +35,7 @@ class FakeModuleCCSession:
# the message_queue is empty when receive is called, throw
# a SessionTimeout
self
.
_timeout
=
0
self
.
_closed
=
False
def
group_subscribe
(
self
,
group_name
,
instance_name
=
None
):
if
not
group_name
in
self
.
subscriptions
:
...
...
@@ -43,6 +44,11 @@ class FakeModuleCCSession:
self
.
subscriptions
[
group_name
].
append
(
instance_name
)
def
group_unsubscribe
(
self
,
group_name
,
instance_name
=
None
):
# raises SessionError if the session has been already closed.
if
self
.
_closed
:
raise
isc
.
cc
.
SessionError
(
"Session has been closed."
)
if
group_name
in
self
.
subscriptions
:
if
instance_name
:
if
len
(
self
.
subscriptions
[
group_name
])
>
1
:
...
...
@@ -94,7 +100,8 @@ class FakeModuleCCSession:
def
close
(
self
):
# need to pass along somehow that this function has been called,
self
.
_socket
=
"closed"
self
.
_socket
=
None
self
.
_closed
=
True
def
set_timeout
(
self
,
timeout
):
self
.
_timeout
=
timeout
...
...
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