Note: When go-grpc-prometheus was in the main $gopath (even at this
version) and everyone else was where they always were in vendor/ this
didn't build! It gave errors like:
have SendHeader("github.com/purpleidea/mgmt/vendor/google.golang.org/grpc/metadata".MD) error
want SendHeader("google.golang.org/grpc/metadata".MD) error
and I got frustrated. Putting it "next" to the other vendored deps seems
to have fixed this. Where are the golang docs that explain this
phenomenon?
This also requires golang 1.8+ as that is a requirement for etcd. It's
probably a reasonable thing for us too.
Note the older versions of etcd had some bugs with the concurrency
package and other things, so this is a necessary bump.
25 lines
490 B
Bash
Executable File
25 lines
490 B
Bash
Executable File
#!/bin/bash -e
|
|
# vim: noet:ts=8:sts=8:sw=8
|
|
|
|
set -x
|
|
|
|
if ! timeout 1s sudo -A true; then
|
|
echo "sudo disabled: not checking file owner and group"
|
|
exit
|
|
fi
|
|
|
|
# run till completion
|
|
timeout --kill-after=30s 25s sudo -A ./mgmt run --yaml file-owner.yaml --converged-timeout=5 --no-watch --tmp-prefix &
|
|
pid=$!
|
|
wait $pid # get exit status
|
|
e=$?
|
|
|
|
ls -l /tmp/mgmt
|
|
|
|
test -e /tmp/mgmt/f1
|
|
test -e /tmp/mgmt/f2
|
|
test $(stat -c%U:%G /tmp/mgmt/f1) = root:root
|
|
test $(stat -c%u:%g /tmp/mgmt/f2) = 1:2
|
|
|
|
exit $e
|