Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyznap send generates warnings; #22

Open
svennd opened this Issue Feb 21, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@svennd
Copy link

svennd commented Feb 21, 2019

Just testing out this tool, nice work. I received some warnings on Centos 7, python 3.6.

pyznap send
Feb 21 10:26:55 INFO: Starting pyznap...
Feb 21 10:26:55 INFO: Sending snapshots...
/usr/lib/python3.6/site-packages/paramiko/ecdsakey.py:164: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.ecdsa_curve.curve_class(), pointinfo
/usr/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:39: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  m.add_string(self.Q_C.public_numbers().encode_point())
/usr/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:96: CryptographyDeprecationWarning: Support for unsafe construction of public numbers from encoded data will be removed in a future version. Please use EllipticCurvePublicKey.from_encoded_point
  self.curve, Q_S_bytes
/usr/lib/python3.6/site-packages/paramiko/kex_ecdh_nist.py:111: CryptographyDeprecationWarning: encode_point has been deprecated on EllipticCurvePublicNumbers and will be removed in a future version. Please use EllipticCurvePublicKey.public_bytes to obtain both compressed and uncompressed point encoding.
  hm.add_string(self.Q_C.public_numbers().encode_point())
Traceback (most recent call last):
  File "/usr/bin/pyznap", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3.6/site-packages/pyznap/main.py", line 120, in main
    return _main()
  File "/usr/lib/python3.6/site-packages/pyznap/main.py", line 103, in _main
    send_config(config)
  File "/usr/lib/python3.6/site-packages/pyznap/send.py", line 215, in send_config
    zfs.open(dest_name, ssh=ssh)
  File "/usr/lib/python3.6/site-packages/pyznap/pyzfs.py", line 85, in open
    type = findprops(name, ssh=ssh, max_depth=0, props=['type'])[name]['type'][0]
KeyError: '/winky/brick1'

Current config for reference :

# default settings parent
[tinky]
        # every $cron runtime (~15 minutes)
        frequent = 2
        hourly = 6
        daily = 3
        weekly = 1
        monthly = 0
        yearly = 0
        # take snapshots ?
        snap = no
        # clean snapshots ?
        clean = no

[tinky/brick1]
        snap = yes
        clean = yes
        dest = ssh:22:root@winky:winky/brick1
        dest_keys = /root/.ssh/id_rsa_winky

(edit) It now works, I was using the path instead of the ZFS fs.

@svennd svennd changed the title pyznap send fails with python errors :) pyznap send generates warnings; Feb 21, 2019

@yboetz

This comment has been minimized.

Copy link
Owner

yboetz commented Feb 21, 2019

I would guess your warnings come from this issue of paramiko. I use paramiko 2.4.2 and don't see any warnings, it seems paramiko 2.5.x will have these warnings.

@svennd

This comment has been minimized.

Copy link
Author

svennd commented Feb 21, 2019

Thanks you are correct; a work around suggested also work :
pip install cryptography==2.4.2
or in my case
pip3.6 install cryptography==2.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.