Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8222d76d9 | ||
|
|
88a3b41135 | ||
|
|
fb7aa9298d | ||
|
|
b79cc948b3 | ||
|
|
e7092612a9 | ||
|
|
15c512388d | ||
|
|
f37377264b | ||
|
|
bd44b20b4a | ||
|
|
e25da3c619 | ||
|
|
3499dbfe09 | ||
|
|
81c4a0ffce | ||
|
|
a0064f7535 | ||
|
|
79c9eff2b9 | ||
|
|
b8bcf0c87d | ||
|
|
179a560e1d | ||
|
|
2245bd25e9 | ||
|
|
c256daceb0 | ||
|
|
73b29050b9 | ||
|
|
162da63522 | ||
|
|
01194ee267 | ||
|
|
d958cff58e |
No files matched your search
@@ -37,7 +37,6 @@ coverage.html
|
||||
prog/weaver/weaver
|
||||
prog/weavedns/weavedns
|
||||
prog/weavehosts/weavehosts
|
||||
prog/weaveproxy/weaveproxy
|
||||
prog/sigproxy/sigproxy
|
||||
prog/weavewait/weavewait
|
||||
prog/weavewait/weavewait_noop
|
||||
@@ -55,7 +54,6 @@ releases
|
||||
weave*.tar.gz
|
||||
prog/weaver/weave
|
||||
prog/weaveexec/weavehosts
|
||||
prog/weaveexec/weaveproxy
|
||||
prog/weaveexec/weavewait
|
||||
prog/weaveexec/weavewait_noop
|
||||
prog/weaveexec/weavewait_nomcast
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
## Release 2.0.1
|
||||
|
||||
Bug fixes and minor improvements
|
||||
|
||||
* Fall back to slower data path (`sleeve`), rather than crashing, when the machine lacks VXLAN support (required for “fast data path”, `fastdp`) #3043
|
||||
* Fix bug in processing of arguments when Docker has TLS enabled, rather than crashing with invalid peers list, e.g. `lookup --tlsverify: no such host` #3039
|
||||
* Add `kube-system` namespace back to `weave-kube`'s YAMLs, preventing omissions leading to errors like `error contacting APIServer: the server does not allow access to the requested resource` #3033,#3042
|
||||
* Fix release script to prevent ARM64 binaries to end up in AMD64 `net-plugin`, leading to `Error response from daemon: dial unix /run/docker/plugins/<id>/weave.sock: connect: no such file or directory` when installing `net-plugin` #3045
|
||||
* `weave reset` and `weave rmpeer` now only contact Weave Cloud when Weave Net is configured with a Weave Cloud token, preventing unnecessary requests and potentially confusing `401 Unauthorized` errors in Weave Net’s logs #3044
|
||||
|
||||
[Full list of changes](https://github.com/weaveworks/weave/milestone/58?closed=1).
|
||||
|
||||
|
||||
## Release 2.0.0
|
||||
|
||||
New Features
|
||||
|
||||
+8
-8
@@ -187,14 +187,14 @@ publish() {
|
||||
fi
|
||||
|
||||
if [ "$RELEASE_TYPE" = 'PRERELEASE' ] ; then
|
||||
echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
|
||||
make UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER publish
|
||||
echo "** Docker images tagged and pushed"
|
||||
|
||||
echo "== Building and pushing plugin"
|
||||
make UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER plugin_publish
|
||||
echo "** Plugin built and pushed"
|
||||
|
||||
echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
|
||||
make UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER publish
|
||||
echo "** Docker images tagged and pushed"
|
||||
|
||||
echo "== Publishing pre-release on GitHub"
|
||||
|
||||
github-release publish \
|
||||
@@ -223,14 +223,14 @@ publish() {
|
||||
fi
|
||||
echo '** Sanity checks OK for publishing tag' $LATEST_TAG as $DOCKERHUB_USER/weave:$VERSION
|
||||
|
||||
echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
|
||||
make PUBLISH_WEAVEDB=$IS_MAINLINE UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER publish
|
||||
echo "** Docker images tagged and pushed"
|
||||
|
||||
echo "== Building and pushing plugin"
|
||||
make UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER plugin_publish
|
||||
echo "** Plugin built and pushed"
|
||||
|
||||
echo "== Tagging and pushing images on docker hub as user $DOCKERHUB_USER"
|
||||
make PUBLISH_WEAVEDB=$IS_MAINLINE UPDATE_LATEST=$IS_MAINLINE SUDO=$SUDO WEAVE_VERSION=$VERSION DOCKERHUB_USER=$DOCKERHUB_USER publish
|
||||
echo "** Docker images tagged and pushed"
|
||||
|
||||
echo "== Publishing release on GitHub"
|
||||
|
||||
github-release publish \
|
||||
|
||||
+12
-6
@@ -62,7 +62,8 @@ type Bridge interface {
|
||||
String() string // human-readable type string
|
||||
}
|
||||
|
||||
var errBridgeFallback = errors.New("special error value used to trigger a fallback to bridge type")
|
||||
// Used to indicate a fallback to the Bridge type
|
||||
var errBridgeNotSupported = errors.New("bridge not supported")
|
||||
|
||||
type bridgeImpl struct{ bridge netlink.Link }
|
||||
type fastdpImpl struct{ datapathName string }
|
||||
@@ -226,7 +227,7 @@ func (config *BridgeConfig) configuredBridgeType() Bridge {
|
||||
}
|
||||
}
|
||||
|
||||
func EnsureBridge(procPath string, config *BridgeConfig) (Bridge, error) {
|
||||
func EnsureBridge(procPath string, config *BridgeConfig, log *logrus.Logger) (Bridge, error) {
|
||||
bridgeType, err := ExistingBridgeType(config.WeaveBridgeName, config.DatapathName)
|
||||
if bridgeType != nil || err != nil {
|
||||
return bridgeType, err
|
||||
@@ -235,7 +236,8 @@ func EnsureBridge(procPath string, config *BridgeConfig) (Bridge, error) {
|
||||
bridgeType = config.configuredBridgeType()
|
||||
for {
|
||||
if err := bridgeType.init(config); err != nil {
|
||||
if err == errBridgeFallback {
|
||||
if errors.Cause(err) == errBridgeNotSupported {
|
||||
log.Warnf("Skipping bridge creation of %q due to: %s", bridgeType, err)
|
||||
bridgeType = bridgeImpl{}
|
||||
continue
|
||||
}
|
||||
@@ -333,12 +335,16 @@ func (b bridgeImpl) init(config *BridgeConfig) error {
|
||||
|
||||
func (f fastdpImpl) init(config *BridgeConfig) error {
|
||||
odpSupported, err := odp.CreateDatapath(f.datapathName)
|
||||
if !odpSupported {
|
||||
msg := ""
|
||||
if err != nil {
|
||||
msg = err.Error()
|
||||
}
|
||||
return errors.Wrap(errBridgeNotSupported, msg)
|
||||
}
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "creating datapath %q", f.datapathName)
|
||||
}
|
||||
if !odpSupported {
|
||||
return errBridgeFallback
|
||||
}
|
||||
datapath, err := netlink.LinkByName(f.datapathName)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "finding datapath %q", f.datapathName)
|
||||
|
||||
@@ -7,6 +7,7 @@ items:
|
||||
name: weave-net
|
||||
labels:
|
||||
name: weave-net
|
||||
namespace: kube-system
|
||||
- apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
@@ -52,6 +53,7 @@ items:
|
||||
name: weave-net
|
||||
labels:
|
||||
name: weave-net
|
||||
namespace: kube-system
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
|
||||
@@ -7,12 +7,14 @@ items:
|
||||
name: weave-net
|
||||
labels:
|
||||
name: weave-net
|
||||
namespace: kube-system
|
||||
- apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: weave-net
|
||||
labels:
|
||||
name: weave-net
|
||||
namespace: kube-system
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
|
||||
@@ -77,7 +77,7 @@ func peerDiscoveryDelete(discoveryEndpoint, token, peername string) error {
|
||||
|
||||
func HandleHTTPPeer(router *mux.Router, alloc *ipam.Allocator, discoveryEndpoint, token, peername string) {
|
||||
router.Methods("DELETE").Path("/peer").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if discoveryEndpoint != "" {
|
||||
if discoveryEndpoint != "" && token != "" {
|
||||
if err := peerDiscoveryDelete(discoveryEndpoint, token, peername); err != nil {
|
||||
Log.Errorf("Error while deleting self from peer discovery: %s", err)
|
||||
}
|
||||
@@ -90,7 +90,7 @@ func HandleHTTPPeer(router *mux.Router, alloc *ipam.Allocator, discoveryEndpoint
|
||||
|
||||
router.Methods("DELETE").Path("/peer/{id}").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ident := mux.Vars(r)["id"]
|
||||
if discoveryEndpoint != "" {
|
||||
if discoveryEndpoint != "" && token != "" {
|
||||
// TODO: deal with this being either a peername or a nickname
|
||||
if err := peerDiscoveryDelete(discoveryEndpoint, token, ident); err != nil {
|
||||
Log.Errorf("Error while deleting self from peer discovery: %s", err)
|
||||
|
||||
+1
-1
@@ -282,7 +282,7 @@ func main() {
|
||||
name := peerName(routerName, bridgeConfig.WeaveBridgeName, dbPrefix, hostRoot)
|
||||
|
||||
bridgeConfig.Mac = name.String()
|
||||
bridgeType, err := weavenet.EnsureBridge(procPath, &bridgeConfig)
|
||||
bridgeType, err := weavenet.EnsureBridge(procPath, &bridgeConfig, Log)
|
||||
checkFatal(err)
|
||||
Log.Println("Bridge type is", bridgeType)
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
)
|
||||
|
||||
func TestMain(t *testing.T) {
|
||||
weavetest.TrimTestArgs()
|
||||
main()
|
||||
if weavetest.TrimTestArgs() {
|
||||
main()
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/weaveworks/weave/common"
|
||||
weavenet "github.com/weaveworks/weave/net"
|
||||
)
|
||||
|
||||
@@ -47,7 +48,7 @@ func createBridge(args []string) error {
|
||||
NPC: args[9] == "--expect-npc",
|
||||
}
|
||||
procPath := args[8]
|
||||
bridgeType, err := weavenet.EnsureBridge(procPath, &config)
|
||||
bridgeType, err := weavenet.EnsureBridge(procPath, &config, common.Log)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
title: Troubleshooting
|
||||
menu_order: 60
|
||||
search_type: Documentation
|
||||
---
|
||||
|
||||
The command
|
||||
|
||||
weave status
|
||||
|
||||
reports on the current status of various Weave Net components, including
|
||||
the proxy, if it is running:
|
||||
|
||||
```
|
||||
...
|
||||
Service: proxy
|
||||
Address: tcp://127.0.0.1:12375
|
||||
...
|
||||
```
|
||||
|
||||
Information on the operation of the proxy can be obtained from the
|
||||
weaveproxy container logs using:
|
||||
|
||||
docker logs weaveproxy
|
||||
|
||||
**See Also**
|
||||
|
||||
* [Troubleshooting Weave](/site/troubleshooting.md)
|
||||
@@ -12,7 +12,7 @@ assert_raises "check_restart $HOST1 weave"
|
||||
# in the old containers being removed and new ones created
|
||||
weave_on $HOST1 stop
|
||||
weave_on $HOST1 launch --no-restart
|
||||
assert "docker_on $HOST1 inspect -f '{{.HostConfig.RestartPolicy.Name}}' weave weaveproxy" "no"
|
||||
assert "docker_on $HOST1 inspect -f '{{.HostConfig.RestartPolicy.Name}}' weave" "no"
|
||||
assert_raises "! check_restart $HOST1 weave"
|
||||
|
||||
# Relaunch to prevent the `weave stop` in `end_suite`
|
||||
|
||||
@@ -108,7 +108,7 @@ $SSH $HOST1<<EOF
|
||||
docker network create --driver="${PLUGIN_NAME}:latest" $NETWORK || true
|
||||
# Otherwise no containers will be scheduled on host2
|
||||
sleep 20
|
||||
docker service create --name=$SERVICE --network=$NETWORK --replicas=2 nginx || true
|
||||
docker service create --name=$SERVICE --network=$NETWORK --replicas=2 weaveworks/network-tester:latest || true
|
||||
journalctl -r -u docker.service -n30
|
||||
EOF
|
||||
|
||||
|
||||
+2
-5
@@ -136,9 +136,7 @@ stop_weave_on() {
|
||||
host=$1
|
||||
weave_on $host stop 1>/dev/null 2>&1 || true
|
||||
if [ -n "$COVERAGE" ]; then
|
||||
for C in weaveplugin weave ; do
|
||||
collect_coverage $host $C
|
||||
done
|
||||
collect_coverage $host weave
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -322,8 +320,7 @@ check_restart() {
|
||||
start_suite() {
|
||||
for host in $HOSTS; do
|
||||
[ -z "$DEBUG" ] || echo "Cleaning up on $host: removing all containers and resetting weave"
|
||||
PLUGIN_FILTER=$(docker_on $host inspect -f 'grep -v {{printf "%.12s" .Id}}' weaveplugin 2>/dev/null) || PLUGIN_FILTER=cat
|
||||
rm_containers $host $(docker_on $host ps -aq 2>/dev/null | $PLUGIN_FILTER)
|
||||
rm_containers $host $(docker_on $host ps -aq 2>/dev/null)
|
||||
weave_on $host reset 2>/dev/null
|
||||
run_on $host sudo rm -f /opt/cni/bin/weave-plugin-latest /opt/cni/bin/weave-net /opt/cni/bin/weave-ipam /etc/cni/net.d/10-weave.conf
|
||||
done
|
||||
|
||||
+1
-1
@@ -23,4 +23,4 @@ if [ -n "$CIRCLECI" -o -n "$PARALLEL" ]; then
|
||||
RUNNER_ARGS="$RUNNER_ARGS -parallel"
|
||||
fi
|
||||
|
||||
HOSTS="$HOSTS" "${DIR}/../tools/runner/runner" $RUNNER_ARGS $TESTS
|
||||
HOSTS="$HOSTS" "${DIR}/../tools/runner/runner" -timeout=240 $RUNNER_ARGS $TESTS
|
||||
+5
-3
@@ -35,8 +35,9 @@ func stackTrace(all bool) string {
|
||||
return string(buf[:stacklen])
|
||||
}
|
||||
|
||||
// TrimTestArgs finds the first -- in os.Args and trim all args before that
|
||||
func TrimTestArgs() {
|
||||
// TrimTestArgs finds the first -- in os.Args and trim all args before
|
||||
// that, returning true when a -- was in fact found.
|
||||
func TrimTestArgs() bool {
|
||||
i, l := 0, len(os.Args)
|
||||
for ; i < l; i++ {
|
||||
if os.Args[i] == "--" {
|
||||
@@ -44,7 +45,8 @@ func TrimTestArgs() {
|
||||
}
|
||||
}
|
||||
if i == l {
|
||||
panic("Specify weave args after --")
|
||||
return false
|
||||
}
|
||||
os.Args = append(os.Args[:1], os.Args[i+1:l]...)
|
||||
return true
|
||||
}
|
||||
+1
-1
Submodule tools updated: 80dd78e6e3...11400eaa2c.
@@ -1059,7 +1059,6 @@ host_arg() {
|
||||
}
|
||||
|
||||
proxy_parse_args() {
|
||||
args=""
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-H)
|
||||
@@ -1098,16 +1097,15 @@ proxy_parse_args() {
|
||||
tls_arg "${1%%=*}" "${1#*=}" key
|
||||
;;
|
||||
*)
|
||||
args="$args $1"
|
||||
REMAINING_ARGS="$REMAINING_ARGS $1"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
# Merge proxy options and other args, keeping $args at the end, as these could contain peers:
|
||||
PROXY_ARGS="$PROXY_ARGS $args"
|
||||
}
|
||||
|
||||
proxy_args() {
|
||||
REMAINING_ARGS=""
|
||||
PROXY_VOLUMES=""
|
||||
PROXY_ARGS=""
|
||||
PROXY_TLS_ENABLED=""
|
||||
@@ -1291,7 +1289,8 @@ launch() {
|
||||
--http-addr $HTTP_ADDR \
|
||||
--status-addr $STATUS_ADDR \
|
||||
--resolv-conf "/var/run/weave/etc/$RESOLV_CONF_BASE" \
|
||||
$PROXY_ARGS)
|
||||
$PROXY_ARGS \
|
||||
$REMAINING_ARGS)
|
||||
wait_for_status $CONTAINER_NAME http_call $HTTP_ADDR
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user