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
61788084
Commit
61788084
authored
Nov 11, 2019
by
wutu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发现几处代码错误
parent
86a5047d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
bishe-edge-center/src/main/java/top/ninwoo/edgecenter/service/impl/TopologyServiceImpl.java
...p/ninwoo/edgecenter/service/impl/TopologyServiceImpl.java
+2
-2
bishe-utils/src/main/java/top/ninwoo/utils/service/impl/OVSServiceImpl.java
...in/java/top/ninwoo/utils/service/impl/OVSServiceImpl.java
+6
-0
No files found.
bishe-edge-center/src/main/java/top/ninwoo/edgecenter/service/impl/TopologyServiceImpl.java
View file @
61788084
...
...
@@ -87,7 +87,7 @@ public class TopologyServiceImpl implements TopologyService {
if
(
appName2
.
startsWith
(
"br:"
))
{
flag
++;
// 创建对应的虚拟交换机
if
(!
ovsService
.
isBridge
(
appName2
))
{
if
(!
ovsService
.
isBridge
(
appName2
.
substring
(
3
)
))
{
LOG
.
info
(
"Create Ovs Bridge!"
);
ovsService
.
addBridge
(
appName2
.
substring
(
3
));
}
...
...
@@ -135,7 +135,7 @@ public class TopologyServiceImpl implements TopologyService {
// 如果其中一个是虚拟交换机,则创建虚拟交换机到容器的连接
else
if
(
flag
==
1
)
{
String
ovsName
=
appName1
.
startsWith
(
"br:"
)
?
appName1
.
substring
(
3
)
:
appName2
.
substring
(
3
);
String
containerName
=
appName1
.
startsWith
(
"br:"
)
?
appName2
:
appName
2
;
String
containerName
=
appName1
.
startsWith
(
"br:"
)
?
appName2
:
appName
1
;
// 使用ovsDocker接口创建连接
// 获取全部的APP容器id
...
...
bishe-utils/src/main/java/top/ninwoo/utils/service/impl/OVSServiceImpl.java
View file @
61788084
...
...
@@ -144,6 +144,12 @@ public class OVSServiceImpl implements OVSService, InitializingBean {
public
void
addBridge
(
String
bridgeName
)
{
// TODO: 优化下返回值
ovsUtils
.
addBridge
(
bridgeName
);
// 这里增加一个时延,防止后端ovs检测不到br
try
{
Thread
.
sleep
(
500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
/**
...
...
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