Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
33ea77a
cloud test setup documentation (#495)
grafnu Jun 24, 2020
048bf20
1.6.0 release
henry54809 Jun 25, 2020
b244709
fix image pull in cmd/build (#503)
henry54809 Jun 25, 2020
588189c
1.6.1 release
henry54809 Jun 25, 2020
ab7eed7
USI (#496)
henry54809 Jun 26, 2020
f211531
Update Minimum Send Test (#498)
noursaidi Jun 29, 2020
4e33982
Minor UDMI updates for pubber keygen
grafnu Jun 30, 2020
970c9d6
add check for git version tag in Travis (#519)
pbatta Jun 30, 2020
70bc4f7
add ssh test
noursaidi Jul 4, 2020
6ad2c1a
add ssh test dockerfile
noursaidi Jul 4, 2020
80c8552
add ssh option to faux, fixes
noursaidi Jul 4, 2020
d29d038
fix ssh test, travis results
noursaidi Jul 5, 2020
18d6b47
Merge branch 'master' into issue-510_ssh_version
noursaidi Jul 6, 2020
83f8375
Add DAQ version to origin summary (#522)
grafnu Jul 7, 2020
06e4660
1.7.0 release
pbatta Jul 7, 2020
499bff9
Feature/usi OVS switch (#521)
henry54809 Jul 7, 2020
79768e4
NTPv4 support (#487)
frgitdaq Jul 8, 2020
fde4289
UDMI registrar error handling updates (#508)
grafnu Jul 9, 2020
7478825
Use trunk rather than stack between switches (#526)
grafnu Jul 9, 2020
a0bc2b7
using usi in daq (#520)
henry54809 Jul 10, 2020
9a95b36
Update troubleshooting doc (#528)
pbatta Jul 10, 2020
02f1fee
Add troubleshooting script (#529)
pbatta Jul 13, 2020
ca5a7f6
Remove deprecated topology files (#530)
grafnu Jul 13, 2020
2361f80
Support for alternate sec switch (not managed by DAQ) (#531)
grafnu Jul 13, 2020
fe0bf8b
Additional DHCP test part 1 (#532)
henry54809 Jul 14, 2020
9f6add8
Refactor ipaddress module (#536)
grafnu Jul 15, 2020
ff20a21
Remove old python2 components (#537)
grafnu Jul 16, 2020
02e4cc8
Additional DHCP test part 2. Multisubnet test (#539)
henry54809 Jul 16, 2020
adb4c25
Use multiple NTP requests and the monitor pcap capture, to reduce fla…
pbatta Jul 17, 2020
b2bfed7
Disable GCP combine check (#542)
grafnu Jul 18, 2020
9848021
Additional DHCP test part 3. Ip change test (#543)
henry54809 Jul 18, 2020
198a130
Add sshv1 to faux, update tests in tests_aux to check
noursaidi Jul 19, 2020
4d14e17
Merge branch 'issue-510_ssh_version' of github.com:noursaidi/daq into…
noursaidi Jul 19, 2020
ad1c141
move test from test_aux to test_modules, add blank line eof
noursaidi Jul 19, 2020
15410e9
remove ssh from test_aux
noursaidi Jul 19, 2020
d5b97ed
make 'make' silent in build, disable ssh in test site
noursaidi Jul 19, 2020
0846d02
Merge branch 'master' into issue-510_ssh_version
noursaidi Jul 19, 2020
4cbd034
fix remove ssh, prevent existing password test from changing
noursaidi Jul 19, 2020
2d9cd2b
fix test_aux
noursaidi Jul 19, 2020
6546e10
Move build scripts into seperate files
noursaidi Jul 20, 2020
a16a1e1
add blank line eof
noursaidi Jul 20, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<module name="LineLength">
<property name="fileExtensions" value="java"/>
<property name="max" value="100"/>
<property name="max" value="120"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>

Expand Down
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ validations/
*.save

# Runtime or sub-module files
inst/
faucet/
forch/
mininet/
local/
local_xxx
local.old
firebase/.firebaserc
firebase/.firebase
firebase/functions/package-lock.json
/inst/
/faucet/
/forch/
/mininet/
/local/
/firebase/.firebaserc
/firebase/.firebase
/firebase/functions/package-lock.json
nohup.out
**/node_modules/
.vscode/
Expand Down
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions bin/alt_faucet
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash -e

ROOT=$(realpath $(dirname $0)/..)
cd $ROOT
source etc/config_base.sh

if [ -z "$switch_setup_ext_br" ]; then
echo switch_setup.ext_br not defined for alternate faucet setup.
false
fi

if [ -z "$switch_setup_alt_port" ]; then
echo switch_setup.alt_port not defined for alternate faucet setup.
false
fi

inst_name=$switch_setup_ext_br

inst_dir=inst/faucet/daq-faucet-$inst_name
mkdir -p $inst_dir
cp config/faucet/faucet_$inst_name.yaml $inst_dir/faucet.yaml
echo Launching alternate faucet install $inst_name on $switch_setup_alt_port
echo DAQ autoclean docker kill daq-faucet-$inst_name
cmd/faucet $inst_name $switch_setup_alt_port
7 changes: 7 additions & 0 deletions bin/build_proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ sha1sum $proto_files > $WEB_ROOT/protos.hash

gen_path=$ROOT/protoc-gen-doc/bin/protoc-gen-doc

if [ -d venv ]; then
echo Entering virtual python environment...
source venv/bin/activate
fi

mkdir -p build/daq/proto build/proto
cp $proto_files build/daq/proto/
proto_files2=
Expand All @@ -56,3 +61,5 @@ mkdir -p libs/proto/
touch libs/proto/__init__.py
cp build/daq/proto/*.py libs/proto/
cp build/protos.html $WEB_ROOT/

python3 -m grpc_tools.protoc -I usi/src/main/proto/ --python_out=libs/proto/ --grpc_python_out=libs/proto/ usi/src/main/proto/usi.proto
9 changes: 7 additions & 2 deletions bin/external_ovs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ source etc/config_base.sh

ext_intf=$switch_setup_data_intf
ext_dpid=$switch_setup_of_dpid
ext_ofpt=$switch_setup_lo_port
ext_brid=$switch_setup_ext_br
ext_brpt=$switch_setup_uplink_port

ext_pri=${ext_intf}
ext_sec=${ext_intf%-pri}-sec

echo ext_dpid is $ext_dpid
if [ -z "$switch_setup_alt_port" ]; then
ext_ofpt=$switch_setup_lo_port
else
ext_ofpt=$switch_setup_alt_port
fi

echo ext_dpid is $ext_dpid on port $ext_ofpt
echo network_config is $network_config

dpid=$(printf %016x $ext_dpid)
Expand Down
2 changes: 1 addition & 1 deletion bin/registrar
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ validator/bin/build > /dev/null

echo Running tools version `git describe`

validator/bin/registrar $project_id $site_path $schema_path $*
validator/bin/registrar $project_id $site_path $schema_path $* 2>&1
9 changes: 3 additions & 6 deletions bin/setup_dev
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ $AG install \
python$PVERSION python3-pkg-resources python3-setuptools \
python$PVERSION-dev python3-pip python emacs-nox python$PVERSION-venv

# Jump through some hoops for mininet, which still has some python2 deps.
$AG install python-pip
python2 -m pip install setuptools

if [ -d mininet ]; then
echo Checking mininet version matches $MININETV...
targetrev=$(cd mininet; git rev-parse $MININETV)
Expand Down Expand Up @@ -137,8 +133,9 @@ $PIP install --upgrade --index-url=https://pypi.python.org/simple Jinja2 \
google-api-core==1.16.0 \
google-cloud-storage==1.16.1 \
google-cloud-firestore==1.6.0 \
google-cloud-logging==1.14.0

google-cloud-logging==1.14.0 \
grpcio-tools==1.30.0

$PIP freeze
echo Resetting .cache directory permissions...
test -n "$USER" && sudo chown $USER -R $HOME/.cache
Expand Down
63 changes: 0 additions & 63 deletions bin/setup_testing

This file was deleted.

10 changes: 10 additions & 0 deletions bin/test_daq
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ echo -n "DAQ version "
git describe --dirty --always
echo

TAGGED_VERSION=`cat etc/docker_images.ver`
if ! git show $TAGGED_VERSION > /dev/null; then
echo
echo Tagged version $TAGGED_VERSION not found.
echo Maybe you need to fetch tags: git fetch --tags.
echo If this is on Travis, ensure tags were pushed to your repo.
echo
false
fi

if [ -d faucet ]; then
echo -n "Last FAUCET commit "
(cd $FAUCET; git log -n 1 --pretty=format:"%h - %an, %ar : %s" || true)
Expand Down
29 changes: 29 additions & 0 deletions bin/troubleshoot
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

ROOT=$(realpath $(dirname $0)/..)
cd $ROOT

if [ ! -d inst ]; then
echo "Error: run this script after a test run completes"
exit 1
fi

# After the system settles (early on some dpid=1 messages are expected) if we see
# unknown dpid in faucet log, dpid might be misconfigured
unknown_dpid=`fgrep 'unknown datapath' inst/faucet.log | wc -l`
if [ "$unknown_dpid" -gt 20 ]; then
echo "Error: Faucet reports unknown datapath DPID:"
fgrep 'unknown datapath' inst/faucet.log | tail -n1
echo "Check if switch_setup:of_dpid in config matches the DPID on the physical switch"
else
echo "Checking DPID misconfig: ok"
fi

# If the switch test failed with a monitoring timeout, switch login info could be wrong
switch_timeout=`fgrep 'Monitoring timeout for switch' inst/cmdrun.log`
if [ -n "$switch_timeout" ]; then
echo "Error: Timeout connecting to physical switch"
echo "Check switch username/password configuration"
else
echo "Checking Switch timeout: ok"
fi
12 changes: 5 additions & 7 deletions bin/validate
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ if [ -z "$schema_path" ]; then
false
fi

validator/bin/build
echo Building validator...
validator/bin/build > /dev/null

unset GOOGLE_CLOUD_PROJECT
export GOOGLE_APPLICATION_CREDENTIALS=$PWD/$gcp_cred
echo Using credentials from $GOOGLE_APPLICATION_CREDENTIALS
echo Configured topic is $gcp_topic
echo Configured schema is $schema_path
if [ -n "$site_path" ]; then
echo Configured site path is $site_path
fi
echo Configured site path is $site_path
echo

echo Running tools version `git describe`

validator/bin/validate $schema_path pubsub:$gcp_topic dev $site_path
5 changes: 3 additions & 2 deletions cmd/build
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ DOCKER_IMAGE_VER=docker_images.ver

cd $ROOT
source etc/config_base.sh
host_tests=$host_tests bin/docker_build_files
echo host_tests=$host_tests
test_targets=$(host_tests=$host_tests bin/docker_build_files)
function pull_images {
TAG=$1
declare -A test_set
for target in $(host_tests=$host_tests bin/docker_build_files); do
for target in $test_targets; do
target=$(echo $target | sed 's|^.*/Dockerfile.||' | echo daqf/$(</dev/stdin))
test_set[$target]=y
done
Expand Down
15 changes: 12 additions & 3 deletions cmd/exrun
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ FAUCET=$(realpath $ROOT/faucet)
FORCH=$(realpath $ROOT/forch)
MININET=$(realpath $ROOT/mininet)
LIBS=$(realpath $ROOT/libs)
PROTO=$(realpath $ROOT/libs/proto)

if [ ! -d $FAUCET ]; then
echo Faucet directory $FAUCET not found, try running bin/setup_dev.
Expand All @@ -66,10 +67,10 @@ if [ "$1" == "-h" ]; then
skip_autostart=y
fi

export PYTHONPATH=$FORCH:$FAUCET:$MININET:$LIBS
export PYTHONPATH=$FORCH:$FAUCET:$MININET:$LIBS:$PROTO

mkdir -p $INSTDIR
rm -f $INSTDIR/faucet* $cleanup_file
rm -rf $INSTDIR/faucet* $cleanup_file

docker ps > /dev/null 2>&1 || service docker start

Expand All @@ -81,7 +82,8 @@ sudo rm -f $cleanup_file
function autostart {
tmp=`mktemp`
echo DAQ autostart $@
eval $@ | tee $tmp
eval $@ > $tmp # Don't use "eval $@ | tee $tmp" here; breaks cmd/usi.
cat $tmp
grep -e '^\s*DAQ autoclean\s' $tmp >> $cleanup_file || true
}

Expand All @@ -99,12 +101,19 @@ if [ -n "$switch_setup_ext_br" ]; then
autostart bin/external_ovs
fi

if [ -n "$switch_setup_alt_port" ]; then
autostart bin/alt_faucet
fi

if [ -n "$switch_setup_model" ]; then
autostart bin/physical_sec
else
echo No external switch model specified.
fi

docker rm -f daq-usi || true
autostart cmd/usi

# Kill any gateways so that they don't prematurely assign an IP address.
gwids=$(docker ps --format '{{ .Image }} {{ .Names }}' | fgrep daqf/networking | awk '{print $2}') || true
for gwid in $gwids; do
Expand Down
18 changes: 18 additions & 0 deletions cmd/usi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -e
TMP_DIR=/tmp/usi

function dump_ovs_interfaces {
while true; do
sudo ovs-ofctl show sec > $TMP_DIR/ovs_output.txt || true
sleep 5
done
}

echo Starting USI
mkdir -p $TMP_DIR
dump_ovs_interfaces &
PID=$!
docker run -d -v /tmp/usi:/ovs --privileged --network=host --name daq-usi daqf/usi

echo DAQ autoclean docker kill daq-usi
echo DAQ autoclean kill $PID
22 changes: 22 additions & 0 deletions config/faucet/faucet_alt-switch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dps:
alt-switch:
dp_id: 2
interfaces:
1:
native_vlan: 1001
2:
native_vlan: 1002
3:
native_vlan: 1003
4:
native_vlan: 1004
5:
native_vlan: 1005
100:
tagged_vlans: [1001, 1002, 1003, 1004, 1005]
vlans:
1001:
1002:
1003:
1004:
1005:
3 changes: 2 additions & 1 deletion config/modules/all.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ include subset/connection/build.conf
include subset/bacnet/build.conf
include subset/security/build.conf
include subset/cloud/build.conf
include subset/manual/build.conf
include subset/manual/build.conf
include subset/ntp/build.conf
Loading