Commit 82461fad authored by René Nussbaumer's avatar René Nussbaumer

Documentation fix for importing with --src-dir option

Signed-off-by: default avatarAgata Murawska <agatamurawska@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
(cherry picked from commit b7d7876b)

Conflicts:

	lib/cmdlib.py (easily fixed)
parent 8b046709
...@@ -7228,8 +7228,8 @@ class LUInstanceCreate(LogicalUnit): ...@@ -7228,8 +7228,8 @@ class LUInstanceCreate(LogicalUnit):
self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET self.needed_locks[locking.LEVEL_NODE] = locking.ALL_SET
self.op.src_node = None self.op.src_node = None
if os.path.isabs(src_path): if os.path.isabs(src_path):
raise errors.OpPrereqError("Importing an instance from an absolute" raise errors.OpPrereqError("Importing an instance from a path"
" path requires a source node option.", " requires a source node option",
errors.ECODE_INVAL) errors.ECODE_INVAL)
else: else:
self.op.src_node = src_node = _ExpandNodeName(self.cfg, src_node) self.op.src_node = src_node = _ExpandNodeName(self.cfg, src_node)
......
...@@ -179,6 +179,9 @@ instance allocator documentation. ...@@ -179,6 +179,9 @@ instance allocator documentation.
The optional second value of the ``--node`` is used for the drbd The optional second value of the ``--node`` is used for the drbd
template and specifies the remote node. template and specifies the remote node.
The ``--src-dir`` option allows importing instances from a directory
below ``@CUSTOM_EXPORT_DIR@``.
Since many of the parameters are by default read from the exported Since many of the parameters are by default read from the exported
instance information and used as such, the new instance will have instance information and used as such, the new instance will have
all parameters explicitly specified, the opposite of a newly added all parameters explicitly specified, the opposite of a newly added
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment