Revision ef127bec
b/doc/rapi.rst | ||
---|---|---|
947 | 947 |
effects. But whether it make sense to retry depends on the error |
948 | 948 |
classification: |
949 | 949 |
|
950 |
``resolver_error`` |
|
950 |
.. pyassert:: |
|
951 |
|
|
952 |
errors.ECODE_ALL == set([errors.ECODE_RESOLVER, errors.ECODE_NORES, |
|
953 |
errors.ECODE_INVAL, errors.ECODE_STATE, errors.ECODE_NOENT, |
|
954 |
errors.ECODE_EXISTS, errors.ECODE_NOTUNIQUE, errors.ECODE_FAULT, |
|
955 |
errors.ECODE_ENVIRON]) |
|
956 |
|
|
957 |
:pyeval:`errors.ECODE_RESOLVER` |
|
951 | 958 |
Resolver errors. This usually means that a name doesn't exist in DNS, |
952 | 959 |
so if it's a case of slow DNS propagation the operation can be retried |
953 | 960 |
later. |
954 | 961 |
|
955 |
``insufficient_resources``
|
|
962 |
:pyeval:`errors.ECODE_NORES`
|
|
956 | 963 |
Not enough resources (iallocator failure, disk space, memory, |
957 | 964 |
etc.). If the resources on the cluster increase, the operation might |
958 | 965 |
succeed. |
959 | 966 |
|
960 |
``wrong_input``
|
|
967 |
:pyeval:`errors.ECODE_INVAL`
|
|
961 | 968 |
Wrong arguments (at syntax level). The operation will not ever be |
962 | 969 |
accepted unless the arguments change. |
963 | 970 |
|
964 |
``wrong_state``
|
|
971 |
:pyeval:`errors.ECODE_STATE`
|
|
965 | 972 |
Wrong entity state. For example, live migration has been requested for |
966 | 973 |
a down instance, or instance creation on an offline node. The |
967 | 974 |
operation can be retried once the resource has changed state. |
968 | 975 |
|
969 |
``unknown_entity``
|
|
976 |
:pyeval:`errors.ECODE_NOENT`
|
|
970 | 977 |
Entity not found. For example, information has been requested for an |
971 | 978 |
unknown instance. |
972 | 979 |
|
973 |
``already_exists``
|
|
980 |
:pyeval:`errors.ECODE_EXISTS`
|
|
974 | 981 |
Entity already exists. For example, instance creation has been |
975 | 982 |
requested for an already-existing instance. |
976 | 983 |
|
977 |
``resource_not_unique``
|
|
984 |
:pyeval:`errors.ECODE_NOTUNIQUE`
|
|
978 | 985 |
Resource not unique (e.g. MAC or IP duplication). |
979 | 986 |
|
980 |
``internal_error``
|
|
987 |
:pyeval:`errors.ECODE_FAULT`
|
|
981 | 988 |
Internal cluster error. For example, a node is unreachable but not set |
982 | 989 |
offline, or the ganeti node daemons are not working, etc. A |
983 | 990 |
``gnt-cluster verify`` should be run. |
984 | 991 |
|
985 |
``environment_error``
|
|
992 |
:pyeval:`errors.ECODE_ENVIRON`
|
|
986 | 993 |
Environment error (e.g. node disk error). A ``gnt-cluster verify`` |
987 | 994 |
should be run. |
988 | 995 |
|
... | ... | |
1166 | 1173 |
``GET`` |
1167 | 1174 |
~~~~~~~ |
1168 | 1175 |
|
1176 |
.. pyassert:: |
|
1177 |
|
|
1178 |
constants.VALID_STORAGE_TYPES == set([constants.ST_FILE, |
|
1179 |
constants.ST_LVM_PV, |
|
1180 |
constants.ST_LVM_VG]) |
|
1181 |
|
|
1169 | 1182 |
Requests a list of storage units on a node. Requires the parameters |
1170 |
``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``) and |
|
1183 |
``storage_type`` (one of :pyeval:`constants.ST_FILE`, |
|
1184 |
:pyeval:`constants.ST_LVM_PV` or :pyeval:`constants.ST_LVM_VG`) and |
|
1171 | 1185 |
``output_fields``. The result will be a job id, using which the result |
1172 | 1186 |
can be retrieved. |
1173 | 1187 |
|
... | ... | |
1180 | 1194 |
~~~~~~~ |
1181 | 1195 |
|
1182 | 1196 |
Modifies parameters of storage units on the node. Requires the |
1183 |
parameters ``storage_type`` (one of ``file``, ``lvm-pv`` or ``lvm-vg``) |
|
1197 |
parameters ``storage_type`` (one of :pyeval:`constants.ST_FILE`, |
|
1198 |
:pyeval:`constants.ST_LVM_PV` or :pyeval:`constants.ST_LVM_VG`) |
|
1184 | 1199 |
and ``name`` (name of the storage unit). Parameters can be passed |
1185 |
additionally. Currently only ``allocatable`` (bool) is supported. The
|
|
1186 |
result will be a job id. |
|
1200 |
additionally. Currently only :pyeval:`constants.SF_ALLOCATABLE` (bool)
|
|
1201 |
is supported. The result will be a job id.
|
|
1187 | 1202 |
|
1188 | 1203 |
``/2/nodes/[node_name]/storage/repair`` |
1189 | 1204 |
+++++++++++++++++++++++++++++++++++++++ |
... | ... | |
1193 | 1208 |
``PUT`` |
1194 | 1209 |
~~~~~~~ |
1195 | 1210 |
|
1211 |
.. pyassert:: |
|
1212 |
|
|
1213 |
constants.VALID_STORAGE_OPERATIONS == { |
|
1214 |
constants.ST_LVM_VG: set([constants.SO_FIX_CONSISTENCY]), |
|
1215 |
} |
|
1216 |
|
|
1196 | 1217 |
Repairs a storage unit on the node. Requires the parameters |
1197 |
``storage_type`` (currently only ``lvm-vg`` can be repaired) and |
|
1198 |
``name`` (name of the storage unit). The result will be a job id. |
|
1218 |
``storage_type`` (currently only :pyeval:`constants.ST_LVM_VG` can be |
|
1219 |
repaired) and ``name`` (name of the storage unit). The result will be a |
|
1220 |
job id. |
|
1199 | 1221 |
|
1200 | 1222 |
``/2/nodes/[node_name]/tags`` |
1201 | 1223 |
+++++++++++++++++++++++++++++ |
Also available in: Unified diff