Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
Distributed Computing and Network Fusion System
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
WirelessInformationCollaborate
Distributed Computing and Network Fusion System
Commits
8e2e57da
Commit
8e2e57da
authored
Jun 21, 2020
by
wutu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化异常处理
parent
b5e75882
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
...n/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
+5
-1
No files found.
cnf-utils/src/main/java/top/ninwoo/utils/util/impl/OvsDockerUtilsImpl.java
View file @
8e2e57da
package
top.ninwoo.utils.util.impl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
top.ninwoo.utils.util.LinuxCtlUtils
;
import
top.ninwoo.utils.util.OvsDockerUtils
;
...
...
@@ -12,6 +14,7 @@ import top.ninwoo.utils.util.Utils;
*/
@Utils
public
class
OvsDockerUtilsImpl
implements
OvsDockerUtils
{
private
static
Logger
LOG
=
LoggerFactory
.
getLogger
(
OvsDockerUtilsImpl
.
class
);
@Autowired
LinuxCtlUtils
linuxCtlUtils
;
...
...
@@ -22,7 +25,8 @@ public class OvsDockerUtilsImpl implements OvsDockerUtils {
+
" "
+
devName
+
" "
+
containerId
+
" --ipaddress="
+
ip
;
String
res
=
linuxCtlUtils
.
runCmd
(
cmd
);
if
(
res
.
contains
(
"Error"
))
{
throw
new
RuntimeException
(
res
);
LOG
.
error
(
"创建网络失败"
,
cmd
,
res
);
throw
new
RuntimeException
(
cmd
+
":"
+
res
);
}
// 这里需要给容器设置mtu
String
mtuCmd
=
"docker exec "
+
containerId
+
" ifconfig eth1 mtu 1450"
;
...
...
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