Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
44f4b829
Commit
44f4b829
authored
Apr 15, 2011
by
hanfeng
Browse files
trac[775] fix the bug that if new configure failed, we need notify configure manager
parent
660d7d78
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/main.cc
View file @
44f4b829
...
...
@@ -172,9 +172,15 @@ main(int argc, char* argv[]) {
// all initial configurations, but as a short term workaround we
// handle the traditional "database_file" setup by directly calling
// updateConfig().
// if server load configure failed, we won't exit, give user second chance
// to correct the configure.
auth_server
->
setConfigSession
(
config_session
);
configureAuthServer
(
*
auth_server
,
config_session
->
getFullConfig
());
auth_server
->
updateConfig
(
ElementPtr
());
try
{
configureAuthServer
(
*
auth_server
,
config_session
->
getFullConfig
());
auth_server
->
updateConfig
(
ElementPtr
());
}
catch
(
const
isc
::
Exception
&
ex
)
{
cout
<<
"[bin10-auth] Server load config failed:"
<<
ex
.
what
()
<<
endl
;
}
if
(
uid
!=
NULL
)
{
changeUser
(
uid
);
...
...
src/lib/server_common/portconfig.cc
View file @
44f4b829
...
...
@@ -115,6 +115,9 @@ installListenAddresses(const AddressList& newAddresses,
dlog
(
"Unable to recover from error;"
,
true
);
dlog
(
string
(
"Rollback failed with: "
)
+
e2
.
what
(),
true
);
}
//Anyway the new configure has problem, we need to notify configure
//manager the new configure doesn't work
throw
;
}
}
...
...
src/lib/server_common/tests/portconfig_unittest.cc
View file @
44f4b829
...
...
@@ -175,7 +175,7 @@ TEST_F(InstallListenAddresses, rollback) {
EXPECT_NO_THROW
(
installListenAddresses
(
valid_
,
store_
,
dnss_
));
checkAddresses
(
valid_
,
"Before rollback"
);
// This should not bind them, but should leave the original addresses
EXPECT_
NO_
THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
));
EXPECT_THROW
(
installListenAddresses
(
invalid_
,
store_
,
dnss_
)
,
exception
);
checkAddresses
(
valid_
,
"After rollback"
);
}
...
...
Write
Preview
Supports
Markdown
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