Commit 5a7f322d authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Merge remote-tracking branch 'grnet/master' into develop

Conflicts:
	Changelog
	snf-stats-app/synnefo_stats/grapher.py
	version
parents dca14cfc d4fffe49
......@@ -83,8 +83,30 @@ Astakos
members.
.. _Changelog-0.15.2:
v0.15.2
=======
Released: Tue May 27 13:50:31 EEST 2014
Cyclades
--------
* Fix minor problem in network stats plugin of collectd
* Fix small issue in the 'stats-cyclades' command arising when Ganeti cannot
communicate with a node.
* Check max size of server metadata
* Add support for Ganeti 2.10
Cyclades UI
-----------
* Fix oraclelinux icon name
.. _Changelog-0.15.1:
v0.15.1
=======
......
......@@ -5,6 +5,14 @@ Unified NEWS file for Synnefo versions >= 0.13
Since v0.13 all Synnefo components have been merged into a single repository.
.. _NEWS-0.15.2:
v0.15.2
=======
Released: Tue May 27 13:50:31 EEST 2014
* Bug fix version
.. _NEWS-0.15.1:
......
......@@ -2701,6 +2701,7 @@ Changelog, NEWS
===============
* v0.15.2 :ref:`Changelog <Changelog-0.15.1>`, :ref:`NEWS <NEWS-0.15.2>`
* v0.15.1 :ref:`Changelog <Changelog-0.15.1>`, :ref:`NEWS <NEWS-0.15.1>`
* v0.15 :ref:`Changelog <Changelog-0.15>`, :ref:`NEWS <NEWS-0.15>`
* v0.14.10 :ref:`Changelog <Changelog-0.14.10>`, :ref:`NEWS <NEWS-0.14.10>`
......
......@@ -40,6 +40,9 @@ In case you choose to follow a private installation you will need to
set up a private dns server, using dnsmasq for example. See node1 below for
more information on how to do so.
You should also disable ``SELinux``, until you get familiar with the Synnefo
stack and its dependencies.
General Prerequisites
=====================
......@@ -127,8 +130,8 @@ Now run:
# service postgresql-9.3 initdb
# chkconfig postgresql-9.3 on
For more information on install postgresql on CentOS, please see `this
https://wiki.postgresql.org/wiki/YUM_Installation`_.
For more information on how to install postgresql on CentOS, please see `this
<https://wiki.postgresql.org/wiki/YUM_Installation>`_.
To install gunicorn and gevent, run:
......@@ -1380,6 +1383,11 @@ Let's briefly explain each patch set:
* Change IP pool to support NAT instances
* Change RAPI to accept depends body argument and shutdown_timeout
.. note::
At the moment of writing this, the qemu package provided by CentOS
is ``0.12.1.2``. To use hotplug capabilities, qemu >= 1.0 is required.
To install Ganeti run:
.. code-block:: console
......@@ -2255,7 +2263,7 @@ skipped.
.. code-block:: console
node1 # snf-manage quota --sync
node1 # snf-manage quota-verify --sync
node1 # snf-manage reconcile-resources-astakos --fix
node2 # snf-manage reconcile-resources-pithos --fix
node1 # snf-manage reconcile-resources-cyclades --fix
......
......@@ -2291,7 +2291,7 @@ skipped.
.. code-block:: console
node1 # snf-manage quota --sync
node1 # snf-manage quota-verify --sync
node1 # snf-manage reconcile-resources-astakos --fix
node2 # snf-manage reconcile-resources-pithos --fix
node1 # snf-manage reconcile-resources-cyclades --fix
......
......@@ -64,7 +64,9 @@ class Command(ListCommand):
action='append',
dest='groups',
default=None,
help="Only show users that belong to the specified goups"),
metavar="GROUP",
help="Only show users that belong to the specified"
" group. Can be used multiple times."),
make_option('--active',
action='store_true',
dest='active',
......@@ -98,6 +100,9 @@ class Command(ListCommand):
if options['pending_verification']:
self.filters['email_verified'] = False
if options['groups']:
self.filters['groups__name__in'] = options['groups']
if options['auth_providers']:
self.fields.extend(['providers'])
......
......@@ -70,7 +70,7 @@ def _get_cluster_stats(bend):
"offline": node["offline"],
"vm_capable": node["vm_capable"],
"instances": node["pinst_cnt"],
"cpu": node["ctotal"],
"cpu": (node["ctotal"] or 0),
"ram": {
"total": (node["mtotal"] or 0) << 20,
"free": (node["mfree"] or 0) << 20
......
......@@ -45,7 +45,8 @@ def demux(request):
elif request.method == 'POST':
return create_port(request)
else:
return api.api_method_not_allowed(request)
return api.api_method_not_allowed(request, allowed_methods=['GET',
'POST'])
def port_demux(request, port_id):
......@@ -57,7 +58,9 @@ def port_demux(request, port_id):
elif request.method == 'PUT':
return update_port(request, port_id)
else:
return api.api_method_not_allowed(request)
return api.api_method_not_allowed(request, allowed_methods=['GET',
'DELETE',
'PUT'])
@api.api_method(http_method='GET', user_required=True, logger=log)
......
......@@ -44,7 +44,8 @@ def demux(request):
elif request.method == 'POST':
return create_subnet(request)
else:
return api.api_method_not_allowed(request)
return api.api_method_not_allowed(request, allowed_methods=['GET',
'POST'])
def subnet_demux(request, sub_id):
......@@ -55,7 +56,9 @@ def subnet_demux(request, sub_id):
elif request.method == 'PUT':
return update_subnet(request, sub_id)
else:
return api.api_method_not_allowed(request)
return api.api_method_not_allowed(request, allowed_methods=['GET',
'DELETE',
'PUT'])
@api.api_method(http_method='GET', user_required=True, logger=log)
......
......@@ -60,6 +60,8 @@ def handle_vm_quotas(vm, job_id, job_opcode, job_status, job_fields):
"""
if job_status not in rapi.JOB_STATUS_FINALIZED:
return vm
print vm
print vm
# Check successful completion of a job will trigger any quotable change in
# the VM state.
......
......@@ -232,7 +232,6 @@ def pprint_clusters(clusters, stdout, detail=True):
"CPUs", "RAM (used/total)", "Disk (used/total)")
pprint_table(stdout, node_table, headers, separator=" | ",
title="Statistics per node for backend %s" % cluster_name)
stdout.write("\n")
total_table = (
("Backend", t_backend_cnt),
......@@ -261,8 +260,11 @@ def pprint_clusters(clusters, stdout, detail=True):
("V/P total disk", ("%.2f%%" % (100 * t_vdisk / t_dtotal)
if t_dtotal != 0 else "-")),
)
pprint_table(stdout, total_table, headers=None, separator=" | ",
title="Statistics for all backends")
if len(clusters) > 1:
stdout.write("\n")
pprint_table(stdout, total_table, headers=None, separator=" | ",
title="Statistics for all backends")
def pprint_servers(servers, stdout):
......
......@@ -6,27 +6,27 @@ import collectd
from glob import glob
def read_int(file):
f = open(file, "r")
try:
val = int(f.read())
except ValueError:
val = None
finally:
f.close()
def read_int(filename):
with open(filename, "r") as f:
try:
val = int(f.read())
except ValueError:
val = None
return val
def netstats(data=None):
for dir in glob("/var/run/ganeti/kvm-hypervisor/nic/*"):
if not os.path.isdir(dir):
for dirname in glob("/var/run/ganeti/kvm-hypervisor/nic/*"):
if not os.path.isdir(dirname):
continue
hostname = os.path.basename(dir)
hostname = os.path.basename(dirname)
for nic in glob(os.path.join(dir, "*")):
idx = int(os.path.basename(nic))
for nic in glob(os.path.join(dirname, "*")):
try:
idx = int(os.path.basename(nic))
except ValueError:
continue
with open(nic) as nicfile:
try:
iface = nicfile.readline().strip()
......
......@@ -38,7 +38,9 @@ def public_demux(request, v_public):
elif request.method == 'GET':
return public_read(request, v_public)
else:
return api.api_method_not_allowed(request)
return api.api_method_not_allowed(request,
allowed_methods=['HEAD',
'GET'])
@api_method(http_method="HEAD", token_required=False, user_required=False,
......
......@@ -55,6 +55,26 @@ class TestPublic(PithosAPITest):
p = re.compile('(attachment|inline); filename="(.+)"')
r = self.delete(public)
self.assertEqual(r.status_code, 405)
self.assertEqual(sorted(r['Allow'].split(',')), ['GET', 'HEAD'])
r = self.post(public)
self.assertEqual(r.status_code, 405)
self.assertEqual(sorted(r['Allow'].split(',')), ['GET', 'HEAD'])
r = self.put(public)
self.assertEqual(r.status_code, 405)
self.assertEqual(sorted(r['Allow'].split(',')), ['GET', 'HEAD'])
r = self.copy(public)
self.assertEqual(r.status_code, 405)
self.assertEqual(sorted(r['Allow'].split(',')), ['GET', 'HEAD'])
r = self.move(public)
self.assertEqual(r.status_code, 405)
self.assertEqual(sorted(r['Allow'].split(',')), ['GET', 'HEAD'])
r = self.get(public, user='user2', token=None)
self.assertEqual(r.status_code, 200)
self.assertTrue('X-Object-Public' not in r)
......
......@@ -234,7 +234,10 @@ available_graph_types = {'cpu-bar': draw_cpu_bar,
@api_method(http_method='GET', token_required=False, user_required=False,
format_allowed=False, logger=log)
def grapher(request, graph_type, hostname):
hostname = decrypt(smart_str(hostname))
try:
hostname = decrypt(smart_str(hostname))
except (ValueError, TypeError):
raise faults.BadRequest("Invalid encrypted virtual server name")
fname = smart_str(os.path.join(settings.RRD_PREFIX, hostname))
if not os.path.isdir(fname):
raise faults.ItemNotFound('No such instance')
......
# This is a comment!
0.15.1next
0.15.2next
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