Compare commits

..

6 Commits

Author SHA1 Message Date
Christian Schwarz 84eefa57bc rpc/grpcclientidentity: remove hard-coded deadline in listener adatper causing crash
Verified once again that grpc.DialContext is indeed non-blocking.
However, it checks in a defer stmt that the passed dial is not ctx.Done().
That is highly unusual if the dial is non-blocking.
But it might still happen, maybe because of machine suspend during the function call and before the defer stmt is executed.

panic:
context deadline exceeded
goroutine 49 [running]:
github.com/zrepl/zrepl/rpc/grpcclientidentity/grpchelper.ClientConn(0x1906ea0, 0xc0003ea1e0, 0x1921620, 0xc0002da660, 0x0)
        /gopath/src/github.com/zrepl/zrepl/rpc/grpcclientidentity/grpchelper/authlistener_grpc_adaptor_wrapper.go:49 +0x38c
github.com/zrepl/zrepl/rpc.NewClient(0x1906f00, 0xc0002d60f0, 0x1921620, 0xc0002da640, 0x1921620, 0xc0002da660, 0x1921620, 0xc0002da6a0, 0x1921620)
        /gopath/src/github.com/zrepl/zrepl/rpc/rpc_client.go:53 +0x199
github.com/zrepl/zrepl/daemon/job.(*modePush).ConnectEndpoints(0xc0000d1e90, 0x1921620, 0xc0002da640, 0x1921620, 0xc0002da660, 0x1921620, 0xc0002da6a0, 0x1906f00, 0xc0002d60f0)
        /gopath/src/github.com/zrepl/zrepl/daemon/job/active.go:105 +0x15d
github.com/zrepl/zrepl/daemon/job.(*ActiveSide).do(0xc0000d6120, 0x1918720, 0xc00020f170)
        /gopath/src/github.com/zrepl/zrepl/daemon/job/active.go:356 +0x236
github.com/zrepl/zrepl/daemon/job.(*ActiveSide).Run(0xc0000d6120, 0x1918720, 0xc00009c660)
        /gopath/src/github.com/zrepl/zrepl/daemon/job/active.go:347 +0x289
github.com/zrepl/zrepl/daemon.(*jobs).start.func1(0xc0000fc880, 0x1921620, 0xc0002da120, 0x191a320, 0xc0000d6120, 0x1918720, 0xc0002d6a80)
2019-10-10 14:02:12 +02:00
Juergen Hoetzel ad77371e38 docs: include Arch Linux installation 2019-10-06 20:38:00 +02:00
Juergen Hoetzel c524acb2df Fix invalid comment syntax 2019-10-06 16:23:20 +02:00
Christian Schwarz 3edfe535c6 docs: fix typo on index page 2019-10-05 14:59:51 +02:00
Juergen Hoetzel d3b99e8e39 Fix typo 2019-10-05 14:58:49 +02:00
Christian Schwarz 3c03f21419 docs: SEPA hint, supporters, fix publish script 2019-10-03 11:57:19 +02:00
8 changed files with 16 additions and 11 deletions
+4 -2
View File
@@ -21,8 +21,10 @@ RestrictRealtime=yes
SystemCallArchitectures=native SystemCallArchitectures=native
# BEGIN ProtectHome # BEGIN ProtectHome
ProtectHome=read-only # DEBIAN STRETCH # DEBIAN STRETCH
# ProtectHome=tmpfs # FEDORA 28 / 29 ProtectHome=read-only
# FEDORA 28 / 29
# ProtectHome=tmpfs
# END ProtectHome # END ProtectHome
# BEGIN SystemCallFilter # BEGIN SystemCallFilter
+2 -1
View File
@@ -56,7 +56,8 @@ We use the following annotations for classifying changes:
| zrepl is a spare-time project primarily developed by `Christian Schwarz <https://cschwarz.com>`_. | zrepl is a spare-time project primarily developed by `Christian Schwarz <https://cschwarz.com>`_.
| You can support maintenance and feature development through one of the following services: | You can support maintenance and feature development through one of the following services:
| |Donate via Patreon| |Donate via Liberapay| |Donate via PayPal| | |Donate via Patreon| |Donate via Liberapay| |Donate via PayPal|
| For commerical support, please `contact Christian directly <https://cschwarz.com>`_. | Note that PayPal processing fees are relatively high for small donations.
| For SEPA wire transfer and **commerical support**, please `contact Christian directly <https://cschwarz.com>`_.
0.1.1 0.1.1
+1 -1
View File
@@ -52,7 +52,7 @@ Main Features
* **Filesystem replication** * **Filesystem replication**
* [x] Pull & Push mode * [x] Pull & Push mode
* [x] Multiple transport :ref:`transports <transport>`: TCP, TCP + TLS client auth, SSH * [x] Multiple :ref:`transport modes <transport>`: TCP, TCP + TLS client auth, SSH
* Advanced replication features * Advanced replication features
+3
View File
@@ -37,6 +37,9 @@ The following list may be incomplete, feel free to submit a PR with an update:
* - MacOS * - MacOS
- ``brew install zrepl`` - ``brew install zrepl``
- Available on `homebrew <https://brew.sh>`_ - Available on `homebrew <https://brew.sh>`_
* - Arch Linux
- ``yay install zrepl-bin``
- Available on `AUR <https://aur.archlinux.org/packages/zrepl-bin>`_
* - Others * - Others
- -
- Use `binary releases`_ or build from source. - Use `binary releases`_ or build from source.
+2 -2
View File
@@ -55,8 +55,8 @@ set -e
sphinx-versioning build \ sphinx-versioning build \
--show-banner \ --show-banner \
--whitelist-branches '^master$' \ --whitelist-branches '^master$' \
--whitelist-tags '(v)?\d+\.\d+\.\d+$' \ --whitelist-tags '(v)?\d+\.[1-9][0-9]*.\d+$' \
--whitelist-tags '(v)?0.1.0-rc(3|4)$' \ --whitelist-tags '(v)?0.2.0-rc.*$' \
docs ./public_git \ docs ./public_git \
-- -c sphinxconf # older conf.py throw errors because they used -- -c sphinxconf # older conf.py throw errors because they used
# version = subprocess.show_output(["git", "describe"]) # version = subprocess.show_output(["git", "describe"])
+2 -1
View File
@@ -6,7 +6,7 @@
zrepl is a spare-time project primarily developed by `Christian Schwarz <https://cschwarz.com>`_. zrepl is a spare-time project primarily developed by `Christian Schwarz <https://cschwarz.com>`_.
You can support maintenance and feature development through one of the services listed above. You can support maintenance and feature development through one of the services listed above.
For commerical support, please `contact Christian directly <https://cschwarz.com>`_. For SEPA wire transfer and **commerical support**, please `contact Christian directly <https://cschwarz.com>`_.
**Thanks for your support!** **Thanks for your support!**
@@ -20,6 +20,7 @@ Supporters
We would like to thank the following people / organizations for supporting zrepl through monetary and other means: We would like to thank the following people / organizations for supporting zrepl through monetary and other means:
* `Marshall Clyburn <https://github.com/mdclyburn>`_
* `Ross Williams <https://github.com/overhacked>`_ * `Ross Williams <https://github.com/overhacked>`_
* Mike T. * Mike T.
* `Justin Scholz <https://github.com/JMoVS>`_ * `Justin Scholz <https://github.com/JMoVS>`_
+1 -1
View File
@@ -96,7 +96,7 @@ We define a **push job** named ``prod_to_backups`` in ``/etc/zrepl/zrepl.yml`` o
key: /etc/zrepl/prod.key key: /etc/zrepl/prod.key
server_cn: "backups" server_cn: "backups"
filesystems: { filesystems: {
"zroot/var/db:": true, "zroot/var/db": true,
"zroot/usr/home<": true, "zroot/usr/home<": true,
"zroot/usr/home/paranoid": false "zroot/usr/home/paranoid": false
} }
@@ -36,9 +36,7 @@ func ClientConn(cn transport.Connecter, log Logger) *grpc.ClientConn {
}) })
dialerOption := grpc.WithDialer(grpcclientidentity.NewDialer(log, cn)) dialerOption := grpc.WithDialer(grpcclientidentity.NewDialer(log, cn))
cred := grpc.WithTransportCredentials(grpcclientidentity.NewTransportCredentials(log)) cred := grpc.WithTransportCredentials(grpcclientidentity.NewTransportCredentials(log))
ctx, cancel := context.WithTimeout(context.TODO(), 5*time.Second) // FIXME constant cc, err := grpc.DialContext(context.Background(), "doesn't matter done by dialer", dialerOption, cred, ka)
defer cancel()
cc, err := grpc.DialContext(ctx, "doesn't matter done by dialer", dialerOption, cred, ka)
if err != nil { if err != nil {
log.WithError(err).Error("cannot create gRPC client conn (non-blocking)") log.WithError(err).Error("cannot create gRPC client conn (non-blocking)")
// It's ok to panic here: the we call grpc.DialContext without the // It's ok to panic here: the we call grpc.DialContext without the