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

flockerctl unusable #73

Closed
lmeyemezu opened this issue Nov 21, 2016 · 3 comments
Closed

flockerctl unusable #73

lmeyemezu opened this issue Nov 21, 2016 · 3 comments

Comments

@lmeyemezu
Copy link

lmeyemezu commented Nov 21, 2016

Hi,
I'm trying to use flockerctl as described in https://flocker-docs.clusterhq.com/en/latest/flocker-features/flockerctl.html
Message error is below

/usr/local/bin/flockerctl: 3: read: Illegal option -d
Unhandled Error
Traceback (most recent call last):
  File "/opt/flocker/bin/flockerctl", line 9, in <module>
    load_entry_point('UnofficialFlockerTools==0.6', 'console_scripts', 'flockerctl')()
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 381, in _main
    react(main, sys.argv[1:])
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/task.py", line 882, in react
    finished = main(_reactor, *argv)
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 361, in main
    d = defer.maybeDeferred(base.subOptions.run)
--- <exception caught here> ---
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
    result = f(*args, **kw)
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 96, in run
    self.client = get_client(self.parent)
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 57, in get_client
    target_hostname=control_service,
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/txflocker/client.py", line 172, in get_client
    user_crt, cluster_crt, user_key, target_hostname))
exceptions.Exception: Not enough information to construct TLS context: user_crt: FilePath('/pwd/user.crt'), cluster_crt: FilePath('/pwd/cluster.crt'), user_key: FilePath('/pwd/user.key'), target_hostname: 192.168.106.7

main function encountered error
Traceback (most recent call last):
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/task.py", line 882, in react
    finished = main(_reactor, *argv)
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 372, in main
    d.addErrback(err)
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 328, in addErrback
    errbackKeywords=kw)
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 306, in addCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 588, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/opt/flocker/local/lib/python2.7/site-packages/unofficial_flocker_tools/flocker_volumes.py", line 371, in err
    reactor.stop()
  File "/opt/flocker/local/lib/python2.7/site-packages/twisted/internet/base.py", line 581, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.

I'm using docker swarm mode Version: 1.12.3

Any idea ?

@wallrj
Copy link
Contributor

wallrj commented Nov 25, 2016

Hey @lmeyemezu

Thanks for the bug report.

The first error message /usr/local/bin/flockerctl: 3: read: Illegal option -d can be ignored.
The script uses read -d which is a bash specific extension, but the script interpreter is #!/bin/sh which on Ubuntu is dash shell. I've created a Jira issue for this problem:

The next error seems to be because you're not pointing flockerctl at your Flocker certificates directory.

Here's how I run flockerctl:

flockerctl --control-service $FLOCKER_CONTROL_NODE  --certs-path $FLOCKER_API_CERTIFICATES_PATH list 

Where FLOCKER_API_CERTIFICATES_PATH=/etc/flocker (or a directory where you ran flocker-ca to generate the certificates.)

We should make the error message clearer though.

@wallrj
Copy link
Contributor

wallrj commented Nov 25, 2016

@lmeyemezu I put a branch up for review which fixes the read -d warning.
Let me know if that works for you.

Also beware of another known issue with flockerctl in a docker-swarm environment.

@lmeyemezu
Copy link
Author

Hi @wallrj ,
thanks for replying.
you're right ; flocker-api-certificates was wrong.
Regards

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