Skip to content

Commit 8276785

Browse files
committed
addressing PR comments
1 parent 07890ec commit 8276785

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

Vagrantfile

+12-10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ require 'fileutils'
77
gopath_folder="/opt/gopath"
88
FileUtils.cp "/etc/resolv.conf", Dir.pwd
99

10+
$cluster_ip_nodes = ""
11+
1012
provision_common = <<SCRIPT
1113
## setup the environment file. Export the env-vars passed as args to 'vagrant up'
1214
echo Args passed: [[ $@ ]]
@@ -24,11 +26,9 @@ echo 'export GOSRC=$GOPATH/src' >> /etc/profile.d/envvar.sh
2426
echo 'export PATH=$PATH:/usr/local/go/bin:$GOBIN' >> /etc/profile.d/envvar.sh
2527
echo "export http_proxy='$4'" >> /etc/profile.d/envvar.sh
2628
echo "export https_proxy='$5'" >> /etc/profile.d/envvar.sh
27-
echo "export no_proxy=192.168.2.10,192.168.2.11,127.0.0.1,localhost,netmaster,192.168.2.12" >> /etc/profile.d/envvar.sh
28-
echo "export CLUSTER_NODE_IPS=192.168.2.10,192.168.2.11,192.168.2.12" >> /etc/profile.d/envvar.sh
2929
echo "export USE_RELEASE=$6" >> /etc/profile.d/envvar.sh
30-
31-
30+
echo "export no_proxy=$7,127.0.0.1,localhost,netmaster" >> /etc/profile.d/envvar.sh
31+
echo "export CLUSTER_NODE_IPS=$7" >> /etc/profile.d/envvar.sh
3232
source /etc/profile.d/envvar.sh
3333
3434
mv /etc/resolv.conf /etc/resolv.conf.bak
@@ -43,14 +43,14 @@ systemctl enable docker-tcp.socket
4343
4444
mkdir /etc/systemd/system/docker.service.d
4545
echo "[Service]" | sudo tee -a /etc/systemd/system/docker.service.d/http-proxy.conf
46-
echo "Environment=\\\"no_proxy=192.168.2.10,192.168.2.11,192.168.2.12,127.0.0.1,localhost,netmaster\\\" \\\"http_proxy=$http_proxy\\\" \\\"https_proxy=$https_proxy\\\"" | sudo tee -a /etc/systemd/system/docker.service.d/http-proxy.conf
46+
echo "Environment=\\\"no_proxy=$7,127.0.0.1,localhost,netmaster\\\" \\\"http_proxy=$http_proxy\\\" \\\"https_proxy=$https_proxy\\\"" | sudo tee -a /etc/systemd/system/docker.service.d/http-proxy.conf
4747
sudo systemctl daemon-reload
4848
sudo systemctl stop docker
4949
systemctl start docker-tcp.socket
5050
sudo systemctl start docker
5151
52-
if [ $# -gt 6 ]; then
53-
shift; shift; shift; shift; shift; shift
52+
if [ $# -gt 7 ]; then
53+
shift; shift; shift; shift; shift; shifti; shift
5454
echo "export $@" >> /etc/profile.d/envvar.sh
5555
fi
5656
@@ -90,6 +90,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
9090
end
9191
base_ip = "192.168.2."
9292
node_ips = num_nodes.times.collect { |n| base_ip + "#{n+10}" }
93+
$cluster_ip_nodes = node_ips.join(",")
94+
9395
node_names = num_nodes.times.collect { |n| "netplugin-node#{n+1}" }
9496
node_peers = []
9597
if ENV['CONTIV_L3'] then
@@ -130,8 +132,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
130132
end
131133
end
132134
end
133-
134-
num_nodes.times do |n|
135+
136+
num_nodes.times do |n|
135137
node_name = node_names[n]
136138
node_addr = node_ips[n]
137139
node_peers += ["#{node_name}=http://#{node_addr}:2380,#{node_name}=http://#{node_addr}:7001"]
@@ -195,7 +197,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
195197
end
196198
node.vm.provision "shell" do |s|
197199
s.inline = provision_common
198-
s.args = [node_name, ENV["CONTIV_NODE_OS"] || "", node_addr, ENV["http_proxy"] || "", ENV["https_proxy"] || "", ENV["USE_RELEASE"] || "", *ENV['CONTIV_ENV']]
200+
s.args = [node_name, ENV["CONTIV_NODE_OS"] || "", node_addr, ENV["http_proxy"] || "", ENV["https_proxy"] || "", ENV["USE_RELEASE"] || "", *ENV['CONTIV_ENV'],$cluster_ip_nodes]
199201
end
200202
provision_node = <<SCRIPT
201203
## start etcd with generated config

systemtests/basic_test.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ func (s *systemtestSuite) TestBasicStartRemoveContainerVLAN(c *C) {
2525
func (s *systemtestSuite) testBasicStartRemoveContainer(c *C, encap string) {
2626

2727
if s.fwdMode == "routing" && encap == "vlan" {
28-
c.Skip("Skipping test")
28+
s.SetupBgp(c, false)
29+
s.CheckBgpConnection(c)
2930
}
3031
c.Assert(s.cli.NetworkPost(&client.Network{
3132
PktTag: 1001,
@@ -56,7 +57,9 @@ func (s *systemtestSuite) TestBasicStartStopContainerVLAN(c *C) {
5657

5758
func (s *systemtestSuite) testBasicStartStopContainer(c *C, encap string) {
5859
if s.fwdMode == "routing" && encap == "vlan" {
59-
c.Skip("Skipping test")
60+
61+
s.SetupBgp(c, false)
62+
s.CheckBgpConnection(c)
6063
}
6164
c.Assert(s.cli.NetworkPost(&client.Network{
6265
PktTag: 1001,

0 commit comments

Comments
 (0)