bsdci / ioc

libioc command line tool for BSD jail management
Other
16 stars 1 forks source link

ioc clone fails due to non-existant jail #42

Open gronke opened 5 years ago

gronke commented 5 years ago

The ioc clone command is broken because it cannot find the target jail:

# ioc clone ros my-jail
No jail matching 'my-jail' was found
Traceback (most recent call last):
  File "/usr/local/bin/ioc", line 10, in <module>
    sys.dd:exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/ioc_cli/clone.py", line 74, in cli
    host=ctx.parent.host
  File "/usr/local/lib/python3.6/site-packages/libioc/Jail.py", line 355, in __init__
    data["id"] = self._resolve_name(data["id"])
  File "/usr/local/lib/python3.6/site-packages/libioc/Jail.py", line 2194, in _resolve_name
    raise libioc.errors.JailNotFound(text, logger=self.logger)
libioc.errors.JailNotFound: my-jail