Git Product home page Git Product logo

ganetimgr's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ganetimgr's Issues

Table not resizing in VM listing page

The table in the VM listing page get its dimension on load time and will not follow browser resizing despite ample space being available. A refresh will redraw the table along the new browser window size resolving the problem but still...

LANGUAGE_CODE = 'ru-RU' returns AttributeError: 'NoneType' object has no attribute '_info'

Dear devs,

Testing v1.6.0 with localization to Russian.
Changing settings.py
LANGUAGE_CODE = 'ru-Ru'
returns an AttributeError: 'NoneType' object has no attribute '_info'

The issue #51 seems to related to this one.

I found one solution which is specific to Django Version 1.4.5:
https://code.djangoproject.com/ticket/18192
where one has to fix the file
ganetimgr/lib/python2.7/site-packages/django/utils/translation/trans_real.py
like this:

def _translation(path):
            try:
                t = gettext_module.translation('django', path, [loc], DjangoTranslation)
                t.set_language(lang)
                return t
            except IOError:
                return None

        res = _translation(globalpath)

        ### salsa: THIS CODE I have to add before running syncdb
        if res is None:
            return gettext_module.NullTranslations()

        # We want to ensure that, for example,  "en-gb" and "en-us" don't share
        # the same translation object (thus, merging en-us with a local update
        # doesn't affect en-gb), even though they will both use the core "en"
        # translation. So we have to subvert Python's internal gettext caching.
        base_lang = lambda x: x.split('-', 1)[0]
        if base_lang(lang) in [base_lang(trans) for trans in _translations]:
            res._info = res._info.copy()   ### salsa: HERE it throws AttributeError 
            res._catalog = res._catalog.copy()

unable to deploy mysql database

following the instruction in the manual will result in an uncompleat database


root@precise64:/srv/www/ganetimgr# python manage.py syncdb --noinput
Syncing...
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_flatpage_sites
Creating table django_flatpage
Creating table django_admin_log
Creating table south_migrationhistory
Creating table registration_registrationprofile
Installing custom SQL ...
Installing indexes ...
No fixtures found.

Synced:

django.contrib.auth
django.contrib.contenttypes
django.contrib.sessions
django.contrib.sites
django.contrib.flatpages
django.contrib.messages
django.contrib.admin
django.contrib.staticfiles
south
registration

Not synced (use migrations):

  • ganetimgr.accounts
  • ganetimgr.ganeti
  • ganetimgr.apply
    (use ./manage.py migrate to migrate these)
    root@precise64:/srv/www/ganetimgr# python manage.py migrate --fake
    Running migrations for accounts:
  • Migrating forwards to 0002_auto__add_field_userprofile_force_logout_date.

    accounts:0001_initial
    (faked)
    accounts:0002_auto__add_field_userprofile_force_logout_date
    (faked)
    Adding permission 'accounts | user profile | Can add user profile'
    Adding permission 'accounts | user profile | Can change user profile'
    Adding permission 'accounts | user profile | Can delete user profile'
    Running migrations for ganeti:

  • Migrating forwards to 0012_auto__add_field_cluster_disable_instance_creation.

    ganeti:0001_initial
    (faked)
    ganeti:0002_add_fast_create_field
    (faked)
    ganeti:0003_add_network_model
    (faked)
    ganeti:0004_add_default_disk_template_field
    (faked)
    ganeti:0005_view_instances
    (faked)
    ganeti:0006_auto__add_instanceaction
    (faked)
    ganeti:0007_auto__add_field_instanceaction_action_value
    (faked)
    ganeti:0008_auto__add_field_network_ipv6_prefix
    (faked)
    ganeti:0009_auto__chg_field_network_ipv6_prefix
    (faked)
    ganeti:0010_auto__chg_field_instanceaction_cluster__chg_field_instanceaction_insta
    (faked)
    ganeti:0011_auto__add_field_cluster_use_gnt_network
    (faked)
    ganeti:0012_auto__add_field_cluster_disable_instance_creation
    (faked)
    Adding permission 'ganeti | cluster | Can add cluster'
    Adding permission 'ganeti | cluster | Can change cluster'
    Adding permission 'ganeti | cluster | Can delete cluster'
    Adding permission 'ganeti | cluster | Can view all instances'
    Adding permission 'ganeti | network | Can add network'
    Adding permission 'ganeti | network | Can change network'
    Adding permission 'ganeti | network | Can delete network'
    Adding permission 'ganeti | instance action | Can add instance action'
    Adding permission 'ganeti | instance action | Can change instance action'
    Adding permission 'ganeti | instance action | Can delete instance action'
    Running migrations for apply:

  • Migrating forwards to 0008_add_organization_tag_and_email.

    apply:0001_initial
    (faked)
    apply:0002_add_ssh_public_key_model
    (faked)
    apply:0003_add_ssh_key_fingerprint
    (faked)
    apply:0004_add_application_cookie
    (faked)
    apply:0005_add_application_network_field
    (faked)
    apply:0006_remove_application_cluster_field
    (faked)
    apply:0007_add_admin_comments
    (faked)
    apply:0008_add_organization_tag_and_email
    (faked)
    Adding permission 'apply | organization | Can add organization'
    Adding permission 'apply | organization | Can change organization'
    Adding permission 'apply | organization | Can delete organization'
    Adding permission 'apply | instance application | Can add instance application'
    Adding permission 'apply | instance application | Can change instance application'
    Adding permission 'apply | instance application | Can delete instance application'
    Adding permission 'apply | instance application | Can view all applications'
    Adding permission 'apply | ssh public key | Can add ssh public key'
    Adding permission 'apply | ssh public key | Can change ssh public key'
    Adding permission 'apply | ssh public key | Can delete ssh public key'


display instance disk-template type

Hi,
In the details page of an instance, could you please add a field displaying the disk-template type (plain, drbd...) of an instance ?
Right now, it seems that there's no way to get that information within ganetimgr

Thanks !

Java console - missing proxy instructions?

ganetimgr supports two console types: java and novnc. Once novnc is setup the web interface has two buttons: Console (WebSock) and Console (Java)

The Java console button can't be disabled, so I tried to set it up, but I can't find instructions on this.

It initially fails with "No such file or directory":

/srv/www/ganetimgr/util/vapclient.py in request_forwarding
    ctrl.connect(CTRL_SOCKET) ...
▶ Local vars
/usr/lib/pymodules/python2.7/gevent/socket.py in connect
                    raise error(result, strerror(result)) 

But if I start a twisted vncap on that unix socket using

twistd --pidfile=/tmp/proxy.pid -n vncap -c unix:/var/run/vncauthproxy/vncproxy.sock

then it just hangs waiting for a response from http://<host>/cluster/<cluster>/<instance>/vnc

I notice the request format in request_forwarding() uses a different format than request_novnc_forwarding():

    req = {
        "source_port": int(sport),
        "destination_address": daddr,
        "destination_port": int(dport),
        "password": password
    }

vs.

        request = {
            "daddr": daddr,
            "dport": dport,
            "password": password,
            "ws": True,
            "tls": tls,
        }

So does it require a different VNC proxy, and if so, what is it?

settings.py.dist points to "image+default" instead of "snf-image+default"

settings.py.dist contains examples like this:

OPERATING_SYSTEMS = {
    "debian-wheezy": {
        "description": "Debian Wheezy 64 bit",
        "provider": "image+default",
        "osparams": {
            "img_id": "debian-wheezy",
            "img_format": "tarball",
        },
        "ssh_key_param": "img_ssh_key_url",
    },

The use of "image+default" suggests that these are for ganeti-instance-image. However the img_id and img_format parameters belong to snf-image.

It would be clearer if the examples were changed to:

        "provider": "snf-image+default",

Migration Error

Hi,
I had a problem in migrate process, while the dbsync is OK.
The returned error was:
Running migrations for accounts:

  • Migrating forwards to 0002_auto__add_field_userprofile_force_logout_date.

    accounts:0001_initial
    accounts:0002_auto__add_field_userprofile_force_logout_date

  • Loading initial data for accounts.
    No fixtures found.
    Running migrations for ganeti:

  • Migrating forwards to 0012_auto__add_field_cluster_disable_instance_creation.

    ganeti:0001_initial
    ganeti:0002_add_fast_create_field
    ganeti:0003_add_network_model
    ganeti:0004_add_default_disk_template_field
    ganeti:0005_view_instances

  • Migration 'ganeti:0005_view_instances' is marked for no-dry-run.

    ganeti:0006_auto__add_instanceaction
    ganeti:0007_auto__add_field_instanceaction_action_value
    ganeti:0008_auto__add_field_network_ipv6_prefix
    ganeti:0009_auto__chg_field_network_ipv6_prefix
    ganeti:0010_auto__chg_field_instanceaction_cluster__chg_field_instanceaction_insta
    ! Error found during real run of migration! Aborting.

    ! Since you have a database that does not support running
    ! schema-altering statements in transactions, we have had
    ! to leave it in an interim state between migrations.

! You might be able to recover with:
! The South developers regret this has happened, and would
! like to gently persuade you to consider a slightly
! easier-to-deal-with DBMS.
! NOTE: The error which caused the migration to fail is further up.
Traceback (most recent call last):
File "./manage.py", line 29, in
execute_manager(settings)
File "/usr/lib/python2.7/dist-packages/django/core/management/init.py", line 438, in execute_manager
utility.execute()
File "/usr/lib/python2.7/dist-packages/django/core/management/init.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(_args, *_options.dict)
File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 220, in execute
output = self.handle(_args, *_options)
File "/usr/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 105, in handle
ignore_ghosts = ignore_ghosts,
File "/usr/lib/python2.7/dist-packages/south/migration/init.py", line 191, in migrate_app
success = migrator.migrate_many(target, workplan, database)
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 221, in migrate_many
result = migrator.class.migrate_many(migrator, target, migrations, database)
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 292, in migrate_many
result = self.migrate(migration, database)
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 125, in migrate
result = self.run(migration)
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 99, in run
return self.run_migration(migration)
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration
migration_function()
File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in
return (lambda: direction(orm))
File "/srv/www/ganetimgr/../ganetimgr/ganeti/migrations/0010_auto__chg_field_instanceaction_cluster__chg_field_instanceaction_insta.py", line 12, in forwards
db.alter_column('ganeti_instanceaction', 'cluster_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['ganeti.Cluster'], null=True, blank=True))
File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 397, in alter_column
field.rel.to._meta.get_field(field.rel.field_name).column
File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 150, in execute
cursor.execute(sql, params)
File "/usr/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 86, in execute
return self.cursor.execute(query, args)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1005, "Can't create table 'ganetimgr.#sql-60c_80' (errno: 121)")
r
I really appreciate if you can walk me to resolve this.

Thanks,
Andi

"Δεν βρέθηκε το λειτουργικό που ζητηθηκε: debian_base-7.0-x86_64" error when "img_id" of the OS definition in settings.py contains dots and underscores

Hi!

I've been trying your Stable/Master/Dev versions of ganetimgr for snf-image OS provider and always get the same error on application/$id/review page just under the "Operating System" with text in red saying
"Δεν βρέθηκε το λειτουργικό που ζητηθηκε: debian_base-7.0-x86_64"
when submiting the Application I get (in v1.5.5 of ganetimgr) the TypeError in "/srv/www/ganetimgr/apply/models.py in submit, line 196" of "
'NoneType' object has no attribute 'getitem'".
This is coded in

operatingSystemsInput.parent().append('<div style="color: #b94a48;">Δεν βρέθηκε το λειτουργικό που ζητηθηκε: ' + selected + '</div>')

It is ok when I use just "img_id": "debian-base" for ex. in settings.py for snf-image+default provider.

Could you please have a look at it?
I would appreciate solving this issue as soon as possible because it stops me from going further in deploying a testbed Ganeti cluster.

Thanks! Serge

Integration of snf-vncauthproxy v1.6: add TCP control socket

Hi, devs!

Code in util/vapclient.py of the master branch says we must use the snf-vncauthproxy of the version prior to 1.5 when Unix domain control sockets were replaced with TCP control sockets:
CTRL_SOCKET = "/var/run/vncauthproxy/vncproxy.sock"

Right now I'm deploying GanetiMGR (master branch) with https://github.com/grnet/snf-vncauthproxy (master, v1.6). And I'm working towards rewriting some code to support that.

Is there any specific reason for using Unix domain control socket?

What is used to generate collectd graphs?

I can't find any documentation of what COLLECTD_URL is supposed to point to. I poked around at some of the collectd frontends I could find and none seem to have a matching URL format to what ganetimgr generates.

Watcher does not log errors

From /var/log/ganeti/watcher.log

...
05/25/2014 12:08:32 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:08:32 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:08:32 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:08:32 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:08:47 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:08:47 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:08:47 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:08:47 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:02 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:02 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:09:02 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:09:02 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:17 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:17 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:09:17 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:09:17 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:32 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:32 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:09:32 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:09:32 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:47 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:09:47 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:09:47 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:09:47 PM Handling host89.ws.nsrc.org (job: 2171)
05/25/2014 12:10:02 PM Checking host89.ws.nsrc.org (job: 2171)
05/25/2014 12:10:02 PM host89.ws.nsrc.org (job: 2171) done. Status: success
05/25/2014 12:10:02 PM Mailing [email protected] about host89.ws.nsrc.org
05/25/2014 12:10:02 PM Job 4 reserved 31 (> 30) times, burying

I am guessing an exception has occurred because it doesn't say "Mailing managers about ...", but if so the exception has been silently caught, and I can't see in the code where this happens. I think it should be caught and logged

Note: this particular error was caused by no MTA being installed on the host where ganetimgr was running, and installing an MTA fixed the issue, but there were no clues in the log.

05/25/2014 01:13:49 PM Handling lock key cluster:nuc:instance:host88.ws.nsrc.org:lock (job 2203)
05/25/2014 01:13:49 PM Handling host88.ws.nsrc.org (job: 2203)
05/25/2014 01:14:04 PM Checking host88.ws.nsrc.org (job: 2203)
05/25/2014 01:14:13 PM Job 2203 finished, removing lock cluster:nuc:instance:host88.ws.nsrc.org:lock
05/25/2014 01:14:19 PM Checking host88.ws.nsrc.org (job: 2203)
05/25/2014 01:14:19 PM host88.ws.nsrc.org (job: 2203) done. Status: success
05/25/2014 01:14:19 PM Mailing [email protected] about host88.ws.nsrc.org
05/25/2014 01:14:19 PM Mailing managers about host88.ws.nsrc.org

Minor comments on "clear cache"

These are very minor niggles, but:

  • "clear cache" adds a '#' to the end of the URL in the browser URL bar (should be possible for javascript to suppress this?)
  • "clear cache" is not available on a mobile device

Instance creation failures not handled

If you approve a new instance application, but the instance creation fails, then:

  • the web interface returns a 500 error (*)
  • the application moves into the "completed applications" section (although its status is still "submitted")
  • if you click on the application you can see its parameters, but not edit them
  • if you click on the hostname within the application, you get a 404 error (presumably because ganetimgr thinks the instance exists, but it doesn't)

To reproduce: any type of event which causes instance creation to fail will do, e.g. not having enough RAM on the cluster. However an easy-to-reproduce case is where the os-type does not exist, e.g. if you select the "noop" os type but this is not installed.

Desired behaviour: ideally leave the application queued and report the error somewhere (e.g. in the "comments to the user" box), and allow the parameters to be edited and resubmitted. Or else treat it as a rejection, and append the error in the "comments to the user"

(*) ganetimgr.log shows:

2014-03-14 00:44:34 [15454] [DEBUG] POST /application/3/review
ERROR:django.request:Internal Server Error: /application/3/review
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/dist-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/srv/www/ganetimgr/apply/views.py", line 151, in review_application
    application.submit()
  File "/srv/www/ganetimgr/apply/models.py", line 187, in submit
    b = beanstalkc.Connection()
  File "/srv/www/ganetimgr/util/beanstalkc.py", line 49, in __init__
    self.connect()
  File "/srv/www/ganetimgr/util/beanstalkc.py", line 63, in connect
    raise SocketError(e)
SocketError: [Errno 111] Connection refused
2014-03-14 00:44:40 [15454] [DEBUG] Closing connection.
DEBUG:gunicorn.error:Closing connection.

Clusters Info

A new cluster(s) info page could be useful for admins. It could provide details such as:

  • Total number of VMs
  • Number of Running/Shutdown VMs
  • Networks per cluster + some info about them, eg Free IPs per network
  • Number of nodes + node roles in the cluster
  • Used/Free resources per cluster (Disk/RAM)

Allow modification of instance resources

Hi,
It looks like it isn't possible right now to change the vcpu/memory/network ressource allocated to an instance after it has been created in the "configuration options" section

Would it be possible to add that functionnality please ?
Thanks

decouple networks from clusters

Until now a VM creation get's routed to a specific cluster by choosing a network that is attached to a cluster. It would be nice to be able to have cross-cluster networks (common with bridged networks), and to be a able to both select a cluster name/slug and a network upon creation.

This probably needs a major redesign but it's probably worth it since such cases already exist.

[PATCH] Definition of minimum memory

The lower memory limit for a VM is defined in two different places, which makes it awkward if you want to allow a smaller instance. This patch avoids the duplication, so you only have to set VALID_MEMORY_VALUES.

--- a/apply/forms.py
+++ b/apply/forms.py
@@ -36,9 +36,9 @@ from django.utils.html import escape, conditional_escape
 # Taken from ganeti and patched to avoid non-bind9 friendly VM names
 _VALID_NAME_RE = re.compile("^[a-z0-9.-]{1,255}$")

-VALID_MEMORY_VALUES = ['512', '768', '1024', '1500', '2048', '3072', '4096']
+VALID_MEMORY_VALUES = [512, 768, 1024, 1500, 2048, 3072, 4096]

-MEMORY_CHOICES = [(m, filesizeformat(int(m) * 1024**2))
+MEMORY_CHOICES = [(str(m), filesizeformat(m * 1024**2))
                   for m in VALID_MEMORY_VALUES]


@@ -183,7 +183,7 @@ class InstanceApplicationForm(InstanceForm):


 class InstanceApplicationReviewForm(InstanceForm):
-    memory = forms.IntegerField(min_value=512, initial=1024)
+    memory = forms.IntegerField(min_value=min(VALID_MEMORY_VALUES), initial=1024)
     vcpus = forms.IntegerField(min_value=1, initial=1, label="Virtual CPUs")
     disk_size = forms.IntegerField(min_value=2, initial=5,
                                    label=ugettext_lazy("Disk size (GB)"))

Incompatibility with new versions of Django

It seems that ganetimgr don't support new versions of Django.
A quick test on Debian Jessie gives me the following error while initializing the database:

$ python manage.py syncdb --noinput
/usr/lib/python2.7/dist-packages/registration/models.py:91: RemovedInDjango18Warning: commit_on_success is deprecated in favor of atomic.
  create_inactive_user = transaction.commit_on_success(create_inactive_user)

Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/usr/lib/python2.7/dist-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/usr/lib/python2.7/dist-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/usr/lib/python2.7/dist-packages/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "/usr/lib/python2.7/dist-packages/django/contrib/admin/__init__.py", line 23, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/usr/lib/python2.7/dist-packages/django/utils/module_loading.py", line 74, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/srv/www/ganetimgr/apply/admin.py", line 44, in <module>
    class ApplicationAdmin(admin.ModelAdmin):
  File "/srv/www/ganetimgr/apply/admin.py", line 51, in ApplicationAdmin
    actions = make_fast_create_actions()
  File "/srv/www/ganetimgr/apply/admin.py", line 24, in make_fast_create_actions
    for cluster in Cluster.objects.filter(fast_create=True):
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 141, in __iter__
    self._fetch_all()
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 966, in _fetch_all
    self._result_cache = list(self.iterator())
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 265, in iterator
    for row in compiler.results_iter():
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 700, in results_iter
    for rows in self.execute_sql(MULTI):
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 81, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 128, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.ProgrammingError: (1146, "Table 'ganetimgr.ganeti_cluster' doesn't exist")

"Are you sure?" question missing on actions

Actions on VMs through button is really nice and cool but a user may inadvertently press one rebooting or shutting down a VM causing DoS to his own services. A dialog requesting confirmation would go a long way to avoid that

Instance rename fails under certain conditions

Instance rename requires that the instance is turned off. When an instance is shutdown via console or terminal, then ganeti will start it automatically. For rename to work properly, the instance need to be shutdown via ganetimgr web interface.

  • Add a note for this in the disclaimer dialog box
  • Perform an instance oper status check prior to showing the final rename action button

Add disks column to VM table of user info

at /user/info/user/USERNAME there is a table showing the VMs of the user. It would be nice to have the disks column, as it appears in the home page.

or maybe have a common/reusable view/table for both pages ?

no dashes allowed in cluster names

I just figured out what caused my Ganeti Mgr instance to crash on listing VMs under the Nodes submenu and the when clicking on Graphs -> Get Graphs .

The ganetimgr WebGUI does not like if the "cluster_slug" parameter of a Ganeti cluster contains the dash character ("-"). If a cluster_slug contains a slash, the UI (i.e., django) spits out this error message:

""" (when attempting to view cluster graphs)
NoReverseMatch at /graph/all/

Reverse for 'cluster-get-nodes-graphs' with arguments '()' and keyword arguments '{'cluster_slug': u'g-c_demo'}' not found.

Request Method: POST
Request URL: http://127.0.0.1:8088/graph/all/
Django Version: 1.4.5
Exception Type: NoReverseMatch
Exception Value:

Reverse for 'cluster-get-nodes-graphs' with arguments '()' and keyword arguments '{'cluster_slug': u'g-c_demo'}' not found.

Exception Location: /usr/lib/python2.7/dist-packages/django/core/urlresolvers.py in _reverse_with_prefix, line 422
Python Executable: /usr/bin/python
Python Version: 2.7.3
Python Path:

['/var/lib/ganetimgr/ganetimgr/ganetimgr',
'/var/lib/ganetimgr/ganetimgr',
'/usr/bin',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/pymodules/python2.7']

Server time: Wed, 6 May 2015 16:56:34 +0200
"""
When renaming the cluster_slug to something not containing a dash character, the WebUI renders the pages/views just fine.

Allow reinstalling with different os

RAPI now allows passing osparams to the reinstall call. So we can present the user with the option to Reinstall an instance with a different OS

Disk size units

If you create a VM with the default selection of "5GB", you get a disk which is 5242880000 bytes = 5_1000_1024*1024 bytes, so is neither 5GB nor 5GiB.

It looks like this comes from apply/models.py:

                                           disks=[{"size": self.disk_size * 1000}],

Suggest changing this to * 1024

User Actions page

Sometimes both users and admins need to look back at previous actions they've done. It would be nice to keep a record of every user's action so that users of ganetimgr could see their past actions and admins could see a page with a listing of every users' action.

ganetimgr should keep a record of when a user has started/stopped/reinstalled/deleted/etc a VM, when a user has added a co-admin, when an admin locked/isolated a VM and so on.

At the admin "job listing" page we need to have filters though so we can filter by action type, by user, by cluster, by node or by VM name, etc.

Translations of E-mails

It would be really helpful to have English translations of the notification E-mails:

# find /srv/www/ganetimgr/templates -name '*.txt'
/srv/www/ganetimgr/templates/pass_change_notify_mail.txt
/srv/www/ganetimgr/templates/reinstall_mail.txt
/srv/www/ganetimgr/templates/instance_created_mail.txt
/srv/www/ganetimgr/templates/application_rejected_mail.txt
/srv/www/ganetimgr/templates/registration/activation_complete.txt
/srv/www/ganetimgr/templates/registration/activation_complete_subject.txt
/srv/www/ganetimgr/templates/registration/activation_email.txt
/srv/www/ganetimgr/templates/registration/activation_email_subject.txt
/srv/www/ganetimgr/templates/apply_mail.txt
/srv/www/ganetimgr/templates/idle_account.txt

Whilst this could be done fairly easily with the help of Google Translate, there's currently no place to store multiple language versions of each E-mail.

One option might be to rename these to *.el.txt so that *.en.txt can sit alongside. However all the code which calls email = render_to_string("name_of_template.txt", ...) would need to be changed. Would the language have to become a per-user profile setting?

As a short-term fix, these mail bodies could have Greek with the English translation in-line below.

Services icons need tooltips in VM page

In a specific VM's page, the services line icons are being displayed to point out the services (like Mail Server?) available to this. While the icons are nice and quite explanatory, for completeness sake tooltips should be provided as well

[PATCH] NODATA_IMAGE path

The install instructions don't say you need to change NODATA_IMAGE for the graph to display correctly when insufficient data is present.

However a one-line patch makes this automatic.

--- a/settings.py.dist
+++ b/settings.py.dist
@@ -285,7 +285,7 @@ SW_VERSION = _version.VERSION
 # Rapi request timeout in gevent calls in seconds
 RAPI_TIMEOUT = 15

-NODATA_IMAGE = "/path/to/static/nodata.jpg"
+NODATA_IMAGE = STATIC_ROOT + "nodata.jpg"

 WHITELIST_IP_MAX_SUBNET_V4 = 26
 WHITELIST_IP_MAX_SUBNET_V6 = 64

Feature req: Add sha1sums check field for boot-ISO http urls

It would be nice if ganetimgr had an extra field in the instance boot-configuration, for specifying an sha1sum (which could be copy-pasted) to use to verify an ISO image when it's being booted from an http URL. If that's not always possible it could just be an optional field (skipping the check if empty). The local patches to ganeti-instance-image do this under the hood anyway, so it should be
trivially easy to implement in the UI, and would be much safer against MITM attacks.

Input field in my profile chopped

When using the web interface in my profile page with the browser window width less than 1540 px then some input fields might become chopped and not appear in their entirety onscreen. This problem stops when the browsers width is resized below 743 px and the three boxes align vertically instead of horizontally
Using google chrome on Debian wheezy, pixel numbers could vary depending on fonts used I assume

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.