Revision 38969795 lib/client/gnt_cluster.py
b/lib/client/gnt_cluster.py | ||
---|---|---|
114 | 114 |
""" |
115 | 115 |
drbd_enabled = constants.DT_DRBD8 in enabled_disk_templates |
116 | 116 |
|
117 |
# This raises an exception due to historical reasons, one might consider |
|
118 |
# letting the user set a helper without having DRBD enabled. |
|
119 |
if not drbd_enabled and opts.drbd_helper: |
|
120 |
raise errors.OpPrereqError( |
|
121 |
"Enabling the DRBD disk template and setting a drbd usermode helper" |
|
122 |
" with --drbd-usermode-helper conflict.") |
|
117 |
if not drbd_enabled and opts.drbd_helper is not None: |
|
118 |
ToStdout("Note: You specified a DRBD usermode helper, while DRBD storage" |
|
119 |
" is not enabled.") |
|
123 | 120 |
|
124 | 121 |
if drbd_enabled: |
125 | 122 |
if opts.drbd_helper is None: |
... | ... | |
1044 | 1041 |
drbd_helper = opts.drbd_helper |
1045 | 1042 |
if enabled_disk_templates: |
1046 | 1043 |
drbd_enabled = constants.DT_DRBD8 in enabled_disk_templates |
1047 |
# This raises an exception for historic reasons. It might be a good idea |
|
1048 |
# to allow users to set a DRBD helper when DRBD storage is not enabled. |
|
1049 | 1044 |
if not drbd_enabled and opts.drbd_helper: |
1050 |
raise errors.OpPrereqError( |
|
1051 |
"Setting a DRBD usermode helper when DRBD is not enabled is" |
|
1052 |
" not allowed.") |
|
1045 |
ToStdout("You specified a DRBD usermode helper with " |
|
1046 |
" --drbd-usermode-helper while DRBD is not enabled.") |
|
1053 | 1047 |
return drbd_helper |
1054 | 1048 |
|
1055 | 1049 |
|
Also available in: Unified diff