Revision 0a3027c3

b/docs/admin-guide.rst
987 987
locally administered MAC addresses, so many of these prefixes will be
988 988
externally reserved, to exclude from allocation.
989 989

  
990
Pool reconciliation
991
*******************
990
Quotas
991
~~~~~~
992

  
993
Handling of quotas for Cyclades resources is powered by Astakos quota
994
mechanism. During registration of Cyclades service to Astakos, the Cyclades
995
resources are also imported to Astakos for accounting and presentation.
996

  
997
Upon a request that will result in a resource creation or removal, Cyclades
998
will communicate with Astakos to ensure that user quotas are within limits and
999
update the corresponding usage. If a limit is reached, the request will be
1000
denied with an `overLimit(413)` fault.
992 1001

  
993
The management command `snf-manage reconcile-pools` can be used that all the
994
above mentioned pools are consistent and that all values that come from the
995
pool are not used more than once.
1002
The resources that are exported by Cyclades are the following:
996 1003

  
1004
* `cyclades.vm`: Number of virtual machines
1005
* `cyclades.total_cpu`: Number of virtual machine processors
1006
* `cyclades.cpu`: Number of virtual machine processors of running VMs
1007
* `cyclades.total_ram`: Virtual machine memory size
1008
* `cyclades.ram`: Virtual machine memory size of running VMs
1009
* `cyclades.disk`: Virtual machine disk size
1010
* `cyclades.floating_ip`: Number of floating IP addresses
1011
* `cyclades.network.private`: Number of private virtual networks
997 1012

  
998 1013
Cyclades advanced operations
999 1014
----------------------------
1000 1015

  
1016
Reconciliation mechanism
1017
~~~~~~~~~~~~~~~~~~~~~~~~
1018

  
1019
Cyclades - Ganeti reconciliation
1020
````````````````````````````````
1021

  
1022
On certain occasions, such as a Ganeti or RabbitMQ failure, the state of
1023
Cyclades database may differ from the real state of VMs and networks in the
1024
Ganeti backends. The reconciliation process is designed to synchronize the
1025
state of the Cyclades DB with Ganeti. There are two management commands for
1026
reconciling VMs and Networks that will detect stale, orphans and out-of-sync
1027
VMs and networks. To fix detected inconsistencies, use the `--fix-all`.
1028

  
1029
.. code-block:: console
1030

  
1031
  $ snf-manage reconcile-servers
1032
  $ snf-manage reconcile-servers --fix-all
1033

  
1034
  $ snf-manage reconcile-networks
1035
  $ snf-manage reconcile-networks --fix-all
1036

  
1037
Please see ``snf-manage reconcile-servers --help`` and ``snf-manage
1038
reconcile--networks --help`` for all the details.
1039

  
1040

  
1041
Cyclades - Astakos reconciliation
1042
`````````````````````````````````
1043

  
1044
As already mentioned, Cyclades communicates with Astakos for resource
1045
accounting and quota enforcement. In rare cases, e.g. unexpected
1046
failures, the two services may get unsynchronized. For this reason there
1047
are the `reconcile-commissions-cyclades` and `reconcile-resources-cyclades`
1048
command that will synchronize the state of the two services. The first
1049
command will detect any pending commissions, while the second command will
1050
detect that the usage that is reported by Astakos is correct.
1051
To fix detected inconsistencies, use the `--fix` option.
1052

  
1053
.. code-block:: console
1054

  
1055
  $ snf-manage reconcile-commissions-cyclades
1056
  $ snf-manage reconcile-commissions-cyclades --fix
1057

  
1058
  $ snf-manage reconcile-resources-cyclades
1059
  $ snf-manage reconcile-resources-cyclades --fix
1060

  
1061

  
1062
Cyclades resources reconciliation
1063
`````````````````````````````````
1064

  
1065
Reconciliation of pools will check the consistency of available pools by
1066
checking that the values from each pool are not used more than once, and also
1067
that the only reserved values in a pool are the ones used. Pool reconciliation
1068
will check pools of bridges, MAC prefixes, and IPv4 addresses for all networks.
1069
To fix detected inconsistencies, use the `--fix` option.
1070

  
1071

  
1072
.. code-block:: console
1073

  
1074
  $ snf-manage reconcile-pools
1075
  $ snf-manage reconcile-pools --fix
1076

  
1001 1077
.. _admin-guide-stats:
1002 1078

  
1003 1079
VM stats collecting
......
1154 1230
Cyclades will pass these URLs to the Cyclades UI and the user's browser will
1155 1231
fetch them when needed.
1156 1232

  
1157
Reconciliation mechanism
1158
~~~~~~~~~~~~~~~~~~~~~~~~
1159

  
1160
On certain occasions, such as a Ganeti or RabbitMQ failure, the state of
1161
Cyclades database may differ from the real state of VMs and networks in the
1162
Ganeti backends. The reconciliation process is designed to synchronize
1163
the state of the Cyclades DB with Ganeti. There are two management commands
1164
for reconciling VMs and Networks
1165

  
1166
Reconciling Virtual Machines
1167
````````````````````````````
1168

  
1169
Reconciliation of VMs detects the following conditions:
1170

  
1171
 * Stale DB servers without corresponding Ganeti instances
1172
 * Orphan Ganeti instances, without corresponding DB entries
1173
 * Out-of-sync state for DB entries wrt to Ganeti instances
1174

  
1175
To detect all inconsistencies you can just run:
1176

  
1177
.. code-block:: console
1178

  
1179
  $ snf-manage reconcile-servers
1180

  
1181
Adding the `--fix-all` option, will do the actual synchronization:
1182

  
1183
.. code-block:: console
1184

  
1185
  $ snf-manage reconcile-servers --fix-all
1186

  
1187
Please see ``snf-manage reconcile-servers --help`` for all the details.
1188

  
1189
Reconciling Networks
1190
````````````````````
1191

  
1192
Reconciliation of Networks detects the following conditions:
1193

  
1194
  * Stale DB networks without corresponding Ganeti networks
1195
  * Orphan Ganeti networks, without corresponding DB entries
1196
  * Private networks that are not created to all Ganeti backends
1197

  
1198
To detect all inconsistencies you can just run:
1199

  
1200
.. code-block:: console
1201

  
1202
  $ snf-manage reconcile-networks
1203

  
1204
Adding the `--fix-all` option, will do the actual synchronization:
1205

  
1206
.. code-block:: console
1207

  
1208
  $ snf-manage reconcile-networks --fix-all
1209

  
1210
Please see ``snf-manage reconcile-networks --help`` for all the details.
1211

  
1212
Reconciling Pools
1213
`````````````````
1214

  
1215
Reconciliation of pools will check the consistency of available pools by
1216
checking that the values from each pool are not used more than once, and also
1217
that the only reserved values in a pool are the ones used. Pool reconciliation
1218
will check pools of bridges, MAC prefixes, and IPv4 addresses for all networks.
1219

  
1220
.. code-block:: console
1221

  
1222
  $ snf-manage reconcile-pools
1223
  $ snf-manage reconcile-pools --fix
1224 1233

  
1225 1234
Helpdesk
1226 1235
--------

Also available in: Unified diff