[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

z3 restore fails when using HOST= config option #30

Open
jgartrel opened this issue Mar 17, 2019 · 3 comments
Open

z3 restore fails when using HOST= config option #30

jgartrel opened this issue Mar 17, 2019 · 3 comments

Comments

@jgartrel
Copy link
Contributor

When using HOST=s3.us-west-2.amazonaws.com in the configuration file, z3 restore fails.

# z3 restore  zfs-auto-snap:daily
Traceback (most recent call last):
  File "/usr/local/bin/z3_get", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/z3/get.py", line 25, in main
    s3 = boto3.client('s3', aws_access_key_id=cfg['S3_KEY_ID'], aws_secret_access_key=cfg['S3_SECRET'], **extra_config)
  File "/usr/local/lib/python2.7/dist-packages/boto3/__init__.py", line 91, in client
    return _get_default_session().client(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 838, in create_client
    client_config=config, api_version=api_version)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 86, in create_client
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 328, in _get_client_args
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "/usr/local/lib/python2.7/dist-packages/botocore/args.py", line 85, in get_client_args
    client_cert=new_config.client_cert)
  File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 261, in create_endpoint
    raise ValueError("Invalid endpoint: %s" % endpoint_url)
ValueError: Invalid endpoint: s3.us-west-2.amazonaws.com

This appears to be an issue with using boto for backup vs. using boto3 for restore:

z3/z3/get.py

Lines 21 to 22 in afbd1d9

if 'HOST' in cfg:
extra_config['endpoint_url'] = cfg['HOST']

Specifically, I think the expectation for HOST= is a hostname, not a url and is ultimately confusing for the user.

@jgartrel
Copy link
Contributor Author

@DR3EVR8u8c , Any thoughts on this issue?

@jgartrel
Copy link
Contributor Author

Removing HOST= from the config file temporarily resolves this issue. However, then I stumble over issue #13.

@SitWatchCloudRise
Copy link
Contributor

@jgartrel I did not use HOST option. so I could not give any suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants